我跑了这个命令
ffmpeg -i v-16418145218d8d7abdaabec46beb22ecffd2f5d1625.flv -y -acodec aac -ac 2 -ab 160k -vcodec libx264 -vpre iPod640 -vpre slow -f mp4 -threads 0 OUTPUT.mp4
得到了这样的答复:
[flv @ 0x10ff670]Estimating duration from bitrate, this may be inaccurate
Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from 'v-16418145218d8d7abdaabec46beb22ecffd2f5d1625.flv':
Metadata:
duration : 14
width : 320
height : 240
videodatarate : 500
framerate : 25
videocodecid : 2
audiodatarate : 0
audiosamplerate : 22050
audiosamplesize : 16
stereo : true
audiocodecid : 2
filesize : 912970
Duration: 00:00:13.92, start: 0.000000, bitrate: 576 kb/s
Stream #0.0: Video: flv, yuv420p, 320x240, 512 kb/s, 25 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: mp3, 22050 Hz, 2 channels, s16, 64 kb/s
File for preset 'iPod640' not found
但是在找到之后,这就是我找到的。
/usr/share/ffmpeg/libx264-ipod320.ffpreset
/usr/share/ffmpeg/libx264-ipod640.ffpreset **** ITS HERE ******
/usr/share/ffmpeg/libx264-lossless_fast.ffpreset
/usr/share/ffmpeg/libx264-lossless_max.ffpreset
/usr/share/ffmpeg/libx264-lossless_medium.ffpreset
/usr/share/ffmpeg/libx264-lossless_slow.ffpreset
/usr/share/ffmpeg/libx264-lossless_slower.ffpreset
/usr/share/ffmpeg/libx264-lossless_ultrafast.ffpreset
/usr/share/ffmpeg/libx264-main.ffpreset
/usr/share/ffmpeg/libx264-max.ffpreset
/usr/share/ffmpeg/libx264-medium.ffpreset
/usr/share/ffmpeg/libx264-medium_firstpass.ffpreset
/usr/share/ffmpeg/libx264-normal.ffpreset
/usr/share/ffmpeg/libx264-placebo.ffpreset
/usr/share/ffmpeg/libx264-placebo_firstpass.ffpreset
/usr/share/ffmpeg/libx264-slow.ffpreset
/usr/share/ffmpeg/libx264-slow_firstpass.ffpreset
/usr/share/ffmpeg/libx264-slower.ffpreset
我尝试使用-vpre libx264-ipod640但仍然没有运气。我得到预设libx264-ipod640未找到....我是否必须以某种方式启用预设? ffmpeg - 启用预设?还是什么?
**编辑:我的ffmpeg版本信息**
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
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-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --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
FFmpeg 0.6.5
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
答案 0 :(得分:1)
在试验时找到解决方案。我有错误的预设顺序。它必须是-vcodec然后-vpre(speed)-vpre(presetprofile [aka ipod640])