我正在做一个mp4转换为FLV在一个GUIless服务器,我只有SSH访问(我试过WINFX和X转发已经挂起,而这样的转换,所以WINFF是不可能的)
我不知道这个mp4video的编解码器,比特率。 有人从m4v转换到mp4,然后上传到服务器上。
当我尝试转换命令行如下
ffmpeg -i stats_estimation.mp4 out.flv FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --extra-version=4:0.5.1-1ubuntu1 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-vdpau --enable-bzlib --enable-libgsm --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-libdc1394 --enable-shared --disable-static libavutil 49.15. 0 / 49.15. 0 libavcodec 52.20. 1 / 52.20. 1 libavformat 52.31. 0 / 52.31. 0 libavdevice 52. 1. 0 / 52. 1. 0 libavfilter 0. 4. 0 / 0. 4. 0 libswscale 0. 7. 1 / 0. 7. 1 libpostproc 51. 2. 0 / 51. 2. 0 built on Mar 4 2010 12:41:55, gcc: 4.4.3 Seems stream 0 codec frame rate differs from container frame rate: 29.94 (5000/167) -> 44.92 (539/12) Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'stats_estimation.mp4': Duration: 02:47:05.56, start: 0.000000, bitrate: 237 kb/s Stream #0.0(eng): Video: h264, yuv420p, 320x240, 44.92 tbr, 14.97 tbn, 29.94 tbc Stream #0.1(eng): Audio: aac, 32000 Hz, stereo, s16 Output #0, flv, to 'out.flv': Stream #0.0(eng): Video: flv, yuv420p, 320x240, q=2-31, 200 kb/s, 90k tbn, 44.92 tbc Stream #0.1(eng): Audio: adpcm_swf, 32000 Hz, stereo, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Stream #0.1 -> #0.1 [adpcm_swf @ 0xa4ef60]Sample rate must be 11025, 22050 or 44100 Error while opening codec for output stream #0.1 - maybe incorrect parameters such as bit_rate, rate, width or height
我有上面的错误。 我检查了这个页面http://www.ffmpeg.org/ffmpeg-doc.html,但我不明白。 有人可以帮助弄清楚,在这种情况下,我应该怎么做才能让这个videoflv? 操作系统是Ubuntu 10.04 64位服务器版本,aptitude install winff是我用来获取ffmpeg或其他东西的东西。
尝试使用“-ar 44100”来启动FFmpeg来更正audio速率,如果质量很重要,请使用“-sameq”。 如下面的行。
ffmpeg -i stats_estimation.mp4 -sameq -ar 44100 out.flv