我正在使用 FFMPEG 将 Flash 容器中的 H264/AAC 视频直接重新封装到 MP4 容器中。但是,在传输了几兆字节的数据后,它仅在一秒钟后就退出了。为什么 FFMPEG 在重新封装完成之前就退出了?
$ ffmpeg -i "input.flv" -c copy -copyts "output.mp4"
ffmpeg version N-54803-g454c89d Copyright (c) 2000-2013 the FFmpeg developers
built on Jul 18 2013 20:42:15 with llvm-gcc 4.2.1 (LLVM build 2336.11.00)
configuration: --disable-yasm
libavutil 52. 40.100 / 52. 40.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.102 / 55. 12.102
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 81.101 / 3. 81.101
libswscale 2. 4.100 / 2. 4.100
libswresample 0. 17.102 / 0. 17.102
Input #0, flv, from 'input.flv':
Metadata:
audiosize : 15787550
canSeekToEnd : true
datasize : 82829154
videosize : 65650649
hasAudio : true
hasCuePoints : false
hasKeyframes : true
hasMetadata : true
hasVideo : true
lasttimestamp : 1306
metadatacreator : flvtool++ (Facebook, Motion project, dweatherford)
totalframes : 32659
encoder : Lavf54.6.100
Duration: 00:21:47.32, start: 0.057000, bitrate: 506 kb/s
Stream #0:0: Video: h264 (High), yuv420p, 544x408 [SAR 1:1 DAR 4:3], 400 kb/s, 25 tbr, 1k tbn, 50 tbc
Stream #0:1: Audio: aac, 44100 Hz, stereo, fltp, 96 kb/s
Output #0, mp4, to 'output.mp4':
Metadata:
audiosize : 15787550
canSeekToEnd : true
datasize : 82829154
videosize : 65650649
hasAudio : true
hasCuePoints : false
hasKeyframes : true
hasMetadata : true
hasVideo : true
lasttimestamp : 1306
metadatacreator : flvtool++ (Facebook, Motion project, dweatherford)
totalframes : 32659
encoder : Lavf55.12.102
Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 544x408 [SAR 1:1 DAR 4:3], q=2-31, 400 kb/s, 16k tbn, 1k tbc
Stream #0:1: Audio: aac ([64][0][0][0] / 0x0040), 44100 Hz, stereo, 96 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
frame= 3362 fps=0.0 q=-1.0 Lsize= 8475kB time=00:02:14.45 bitrate= 516.4kbits/s
video:6766kB audio:1575kB subtitle:0 global headers:0kB muxing overhead 1.601224%
答案1
事实证明,这似乎是截断下载。我重新下载了该文件,现在它似乎稍微大一些,并且运行正常。