周梦康 发表于 2020-11-09 3570 次浏览 标签 : ffmpeg

https://www.ffmpeg.org/ffmpeg-all.html

默认情况下,ffmpeg尝试以尽可能快的速度读取输入。
-re这个选项会将输入的读取速度降低到输入的本地帧速率。它对于实时输出(例如直播流)很有用。

Larger timestamp than 24-bit: 0xffffff8akB time=00:29:37.60 bitrate= 994.9kbits/s speed=  18x
[flv @ 0x7fc65882de00] Failed to update header with correct duration.
[flv @ 0x7fc65882de00] Failed to update header with correct filesize.
frame=44806 fps=452 q=-1.0 Lsize=  216401kB time=00:29:52.26 bitrate= 989.1kbits/s speed=18.1x
video:186111kB audio:28133kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.006796%
[aac @ 0x7fc658830200] Qavg: 1554.103

看到的直播流就跳帧严重,半小时的视频,1分钟就播完了。加上-re之后,推流的速度(speed=0.999x ~ 1x)

frame=12760 fps= 25 q=-1.0 size=   61839kB time=00:08:30.28 bitrate= 992.8kbits/s speed=   1x

评论列表