ffmpeg
yangops
这个作者很懒,什么都没留下…
展开
-
ffmpeg error:Application provided invalid, non monotonically increasing dts to muxer in stream
报错描述ffmpeg进行rtmp推流、录制flv、MP4文件时报错: Application provided invalid, non monotonically increasing dts to muxer in stream x: xxx>= xxx 导致 av_interleaved_write_frame 或 av_write_frame 失败。 所以在av_write_frame 前对AVPacket进行检查。// 代码片段// 函数调用:av_read_frame >原创 2021-07-06 16:58:54 · 2077 阅读 · 0 评论 -
ffmpeg命令:合并拼接视频文件
ffmpeg.exe -i "concat:1.ts|2.ts|3.ts" -c:v copy -c:a copy ./t.mp4原创 2021-06-30 14:19:45 · 427 阅读 · 0 评论 -
ffmpeg命令:rtp音频推流拉流
-re : 循环输出音频输出# pcmffmpeg -re -f s16le -ac 1 -ar 8000 -i .\test_8000.pcm -f rtp rtp://192.168.1.101:29000# pcm 转码 g711affmpeg -re -f s16le -ac 1 -ar 8000 -i .\test_8000.pcm -c:a pcm_alaw -f alaw -ac 1 -ar 8000 -ab 64000 -f rt原创 2020-12-24 11:10:40 · 3722 阅读 · 10 评论 -
ffmpeg error:mp4 stream error: no moov before mdat and the stream is not seekable
VLC播放器报错mp4 stream error: no moov before mdat and the stream is not seekable解决方法ffmpeg生成moov是在mdat写完成之后写入,可以通过参数faststart将moov容器移动至mdat前面;ffmpeg -i "rtmp://192.168.1.115:1935/live/camera_152?authedkey=ABC23 timeout=1 " -vcodec copy -acodec copy原创 2020-11-20 19:23:26 · 548 阅读 · 0 评论 -
ffmpeg命令:ffmpeg rtmp拉流截图、录制
99.70 表示从开始播放到现在的时间以秒为单位A-V 表示既有音频流又有视频流-0.010 音视频时间戳的差fd= frame dropped 丢帧数量aq= 当前音频帧大小vq= 当前视频帧大小sq= 当前字幕帧大小f timestamp error correction rate(not 100% sure)...原创 2020-10-23 12:09:19 · 3617 阅读 · 2 评论 -
ffmpeg代码:swr_convert 音频重采样产生噪音的原因记录
音频重采样产生噪音的原因1. 输入原始音频采样数不足// 当 inLen < m_avframe->nb_samples时,会产生噪音噪音int ret = swr_convert(m_swr_ctx, m_avframe->extended_data, // out:重采样数据存储缓存区 m_avframe->nb_samples, // out:重采样样本数原创 2020-07-21 16:39:35 · 3189 阅读 · 14 评论 -
ffmpeg命令:ffplay 播放.pcm .g711a .g711u
ffplay -i test.pcm -f s16le -ac 1 -ar 8000ffplay -i test.g711a -f alaw -ac 1 -ar 8000ffplay -i test.g711u -f mulaw -ac 1 -ar 8000-ac: 音频通道数-ar:音频采样率-f: 文件格式原创 2020-07-17 18:10:15 · 5014 阅读 · 0 评论 -
ffmpeg命令:拉流截图
1. 实时流截图ffmpeg -i rtmp://192.168.1.115:1935/live/camera_152 -ss 0 -f image2 -vframes 5 imge_%3d.jpg原创 2019-09-05 08:06:00 · 902 阅读 · 0 评论 -
ffmpeg命令:推流和拉流
1. rtsp推流rtmpffmpeg -i rtsp://admin:[email protected]:554 -rtsp_transport tcp -vcodec h264 -acodec aac -strict -2 -f flv rtmp://localhost:1935/myapp/012.拉流ffplay -x 320 -y 240 -vcodec h264 -a...原创 2019-05-21 09:00:28 · 11224 阅读 · 1 评论 -
ffmpeg代码:推流降低延迟的优化
ffmpeg推流降低延迟的优化一.针对编码器上下文的参数配置AVCodecContext *vc = NULL; // AV_CODEC_FLAG_GLOBAL_HEADER -- 将全局头文件放在引渡文件中,而不是每个关键帧中。 //AV_CODEC_FLAG_LOW_DELAY --较低延迟 vc->flags |= AV_CODEC_FLAG_GLOBAL_...原创 2019-03-20 14:22:21 · 9650 阅读 · 0 评论