我有一个 Web 应用程序,可以使用 转换视频并分割视频FFMPEG
。它一直运行良好,直到最近我注意到视频转换所花的时间比预期的要多得多。我运行了命令 FFMPEG
,发现FFMPEG
在达到标记点后继续转换。
这是我运行的命令:
[root@myserver ~]# ffmpeg -y -ss 00:00:00.0 -t 00:01:00.0 -ar 44100 -i INPUT.wmv -qscale 5 -acodec libmp3lame -async 1 OUTPUT.flv
以下是我得到的结果:
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 23:55:02 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.11. 0 / 0.11. 0
libpostproc 51. 2. 0 / 51. 2. 0
[asf @ 0x1e7ae8b0]max_analyze_duration reached
Input #0, asf, from 'INPUT.wmv':
Metadata:
WMFSDKVersion : 12.0.7601.17514
WMFSDKNeeded : 0.0.0.0000
IsVBR : 0
Duration: 04:01:40.81, start: 5.000000, bitrate: 245 kb/s
Stream #0.0: Audio: wmapro, 44100 Hz, stereo, flt, 96 kb/s
Stream #0.1: Video: vc1, yuv420p, 1364x768, 30.30 fps, 29.97 tbr, 1k tbn, 29.97 tbc
Output #0, flv, to 'OUTPUT.flv':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: flv, yuv420p, 1364x768, q=2-31, 200 kb/s, 1k tbn, 29.97 tbc
Stream #0.1: Audio: libmp3lame, 44100 Hz, stereo, s16, 64 kb/s
Stream mapping:
Stream #0.1 -> #0.0
Stream #0.0 -> #0.1
Press [q] to stop encoding
Multiple frames in a packet from stream 0
frame= 58 fps= 56 q=5.0 size= 873kB time=9.98 bitrate= 716.6kbits/s dup=0
frame= 85 fps= 55 q=5.0 size= 1197kB time=16.95 bitrate= 578.2kbits/s dup=0
frame= 114 fps= 55 q=5.0 size= 1515kB time=23.90 bitrate= 519.3kbits/s dup=0
frame= 135 fps= 53 q=5.0 size= 1817kB time=29.21 bitrate= 509.7kbits/s dup=0
frame= 155 fps= 50 q=5.0 size= 1985kB time=33.57 bitrate= 484.5kbits/s dup=0
frame= 179 fps= 50 q=5.0 size= 2417kB time=39.42 bitrate= 502.3kbits/s dup=0
frame= 203 fps= 50 q=5.0 size= 2596kB time=44.77 bitrate= 474.9kbits/s dup=0
frame= 224 fps= 49 q=5.0 size= 2886kB time=49.08 bitrate= 481.7kbits/s dup=0
frame= 253 fps= 50 q=5.0 size= 3385kB time=55.48 bitrate= 499.8kbits/s dup=0
frame= 292 fps= 52 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 339 fps= 55 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 379 fps= 57 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 441 fps= 62 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 496 fps= 65 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 542 fps= 67 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 578 fps= 67 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 612 fps= 67 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 657 fps= 68 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 710 fps= 70 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 756 fps= 71 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 801 fps= 72 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 865 fps= 74 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 922 fps= 76 q=5.0 size= 3839kB time=59.90 bitrate= 525.0kbits/s dup=0
frame= 968 fps= 76 q=5.0 Lsize= 13851kB time=60.06 bitrate=1889.3kbits/s dup=0 drop=2
video:13330kB audio:469kB global headers:0kB muxing overhead 0.372018%
Received signal 2: terminating.
请注意,我必须按Ctrl+C来终止该过程;否则它将继续运行,直到到达原始视频帧的末尾。
输出视频应该是 1 分钟长,但实际会更长,这取决于我按下Ctrl+ 的速度C;但 1 分钟后就没有视频或音频了,只有 1 分钟视频最后一帧的静止图像。