ubuntu下用ffmpeg/mencoder做视频转换

转载时请注明出处和作者联系方式:http://blog.csdn.net/mimepp
作者联系方式:YU TAO <yut616 at sohu dot com>

你可以用mencoder来转换用mplayer能播放的各种格式为另一个格式,如下面的说明。
mencoder的说明:
MPlayer ' s Movie Encoder
A simple movie encoder, designed to encode MPlayer - playable movies
(AVI
/ ASF / OGG / DVD / VCD / VOB / MPG / MOV / VIV / FLI / RM / NUV / NET) to other
MPlayer
- playable formats. It can encode with various codecs, like DivX4 ( 1
or 
2  passes), libavcodec, PCM / MP3 / VBRMP3 audio. Also has stream copying and
video resizing abilities.
 
例子:
mencoder 神奇手机a.rmvb
- o test.flv  - of lavf   - oac mp3lame  - lameopts abr:br = 56   - ovc lavc
- lavcopts vcodec = flv:vbitrate = 200 :mbd = 2 :mv0:trell:v4mv:cbp:last_pred = 3 :dia = 4 :cmp = 6 :
vb_strategy
= 1   - vf scale = 320 : 240   - ofps  12   - srate  22050                          

生成截图:
# file test.flv
test.flv: Macromedia Flash Video

# ffmpeg  - i test.flv  - - f image2  - ss  8   - 0.001   - s 32 0x240 test.jpg
用mplayer如何播放rmvb请看本人的另一篇文章:
ubuntu下用mplayer播放rmvb
http://blog.csdn.net/mimepp/archive/2008/04/13/2289218.aspx

ffmpeg不支持rmvb/rm/wmv9。
用ffmpeg转换的例子:
# file test.avi
test.avi: RIFF (little-endian) data, AVI, 320 x 240, 12.00 fps, video: FFMpeg MPEG-4, audio: MPEG-1 Layer 1 or 2 (stereo, 22050 Hz)

# ffmpeg  - i test.avi  - - ab  56   - ar  11025   - ac  2   - 1500   - qscale  9   - 15   - 320 * 240  test2.flv

你可能感兴趣的:(video,ubuntu,File,flv,audio,avi)