使用FFmpeg将.mov转换为.ogg文件时遇到了一些麻烦。
此命令应该有效,对吧?
ffmpeg -i test.mov -s 640x320 -vcodec libtheora -acodec libvorbis out.ogv
它给了我这个输出
[0] => FFmpeg version SVN-r0.5.9-4:0.5.9-1, Copyright (c) 2000-2009 Fabrice Bellard, et al.
[1] => configuration: --extra-version=4:0.5.9-1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libdirac --enable-libgsm --enable-libopenjpeg --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --disable-stripping --disable-vhook --enable-runtime-cpudetect --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libfaad --enable-libdc1394 --enable-shared --disable-static
[2] => libavutil 49.15. 0 / 49.15. 0
[3] => libavcodec 52.20. 1 / 52.20. 1
[4] => libavformat 52.31. 0 / 52.31. 0
[5] => libavdevice 52. 1. 0 / 52. 1. 0
[6] => libavfilter 0. 4. 0 / 0. 4. 0
[7] => libswscale 0. 7. 1 / 0. 7. 1
[8] => libpostproc 51. 2. 0 / 51. 2. 0
[9] => built on Jun 10 2012 08:33:06, gcc: 4.4.5
[10] =>
[11] => Seems stream 0 codec frame rate differs from container frame rate: 1200.00 (1200/1) -> 30.00 (30/1)
[12] => Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test.mov':
[13] => Duration: 00:00:06.26, start: 0.000000, bitrate: 809 kb/s
[14] => Stream #0.0(und): Video: h264, yuv420p, 480x360, 30 tbr, 600 tbn, 1200 tbc
[15] => Stream #0.1(und): Audio: aac, 44100 Hz, mono, s16
[16] => Output #0, ogg, to 'out.ogv':
[17] => Stream #0.0(und): Video: libtheora, yuv420p, 640x320, q=2-31, 200 kb/s, 90k tbn, 30 tbc
[18] => Stream #0.1(und): Audio: vorbis, 44100 Hz, mono, s16, 64 kb/s
[19] => Stream mapping:
[20] => Stream #0.0 -> #0.0
[21] => Stream #0.1 -> #0.1
[22] => Press [q] to stop encoding
看来是对的,对吧?
但电影只有1秒钟左右。 那是为什么?
我无法访问ffmpeg2theora,所以请不要建议:)
答案 0 :(得分:3)
输入文件有一个奇怪的错误帧速率(1200 fps)
尝试强制输入文件的帧速率:
ffmpeg -r 30 -i test.mov -s 640x320 -vcodec libtheora -acodec libvorbis out.ogv
(参数的顺序很重要)