捕获具有多个帧的流

时间:2016-05-22 03:54:17

标签: ffmpeg

我正在尝试使用FFmpeg并保存到文件来捕获具有多个“帧”的流(不确定这是你所谓的它,但它内部有多个5秒流)。当我把它放入Quicktime播放器并播放它工作正常,但当我把它放入FFmpeg并查看最终文件时,似乎音频和视频不同步,视频经常停止。我想这可能是因为它停止切换到新的5秒视频,但我不确定。这是我正在使用的命令:

ffmpeg \
    -v 9 \
    -loglevel 99 \
    -y \
    -re \
    -hwaccel auto \
    -threads 4 \
    -user-agent "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16" \
    -i "url here" \
    -ac 2 \
    -strict -2 \
    -c:a aac \
    test.mov

在FFmpeg日志中经常发生这种情况:

frame=  242 fps=102 q=29.0 size=     252kB time=00:00:06.33 bitrate= 325.9kbits/
frame=  279 fps= 96 q=29.0 size=     252kB time=00:00:07.57 bitrate= 272.8kbits/
frame=  301 fps= 87 q=29.0 size=     252kB time=00:00:08.30 bitrate= 248.7kbits/
frame=  319 fps= 79 q=29.0 size=     252kB time=00:00:08.90 bitrate= 231.9kbits/
frame=  338 fps= 74 q=29.0 size=     252kB time=00:00:09.54 bitrate= 216.5kbits/
frame=  354 fps= 70 q=29.0 size=     252kB time=00:00:10.07 bitrate= 205.0kbits/
skipping 5 segments ahead, expired from playlists
[https @ 0x7f9d81e10380] No trailing CRLF found in HTTP header.
frame=  355 fps= 51 q=29.0 size=     252kB time=00:00:10.11 bitrate= 204.3kbits/
[hls,applehttp @ 0x7f9d83001000] No longer receiving playlist 6
[hls,applehttp @ 0x7f9d83001000] No longer receiving playlist 7
[hls,applehttp @ 0x7f9d83001000] No longer receiving playlist 8
skipping 3 segments ahead, expired from playlists
[https @ 0x7f9d81f006a0] No trailing CRLF found in HTTP header.

我将非常感谢任何有关如何平滑最终文件的想法。

0 个答案:

没有答案