2012年3月5日 星期一

[transcode] Convert your video files to WebM format using FFmpeg/mencoder

Convert your video files to WebM format using FFmpeg/mencoder
Jing (mqJing@gmail.com)



一直搞不定 blogger 的設定, 你可以看我在 Google doc 上寫的完整文章:



---------------------------------------------------------------------------------
A Basic Flow (A Bad Solution for DVD2WebM )
1. Extract the subtitles
2. Copy the video stream
3. Transcode to WebM

Commands
Step 1: Extract the Subtitle
mencoder dvd://1 -dvd-device video.ISO -o output.xxx -ovc frameno -oac mp3lame -lameopts vbr=3 -vobsubout video -vobsuboutindex 0 -vobsuboutid zh -sid 11
Step 2: Copy the A/V stream
mencoder dvd://1 -dvd-device video.ISO -o video.mpg -ovc copy -oac mp3lame -lameopts q=0:aq=0

Step 3: Transcode (mpeg -> webm)
ffmpeg -i video.mpg -b 1500k -acodec libvorbis -ab 160k -ac 2 -f webm video.webm


Enjoy!
by Jing.


A Better Solution:
I known that the mencoder can transcode the video into WebM format by following command.

mencoder dvd://2 -dvd-device video.iso -o output.webm -ovc lavc -oac lavc -of lavf -lavfopts format=webm -lavcopts acodec=vorbis:vcodec=libvpx -ffourcc VP80


The output video file playback is fine but the audio is silence. If somebody knows the answer, please tell me how to solve this issue.


Thank you!