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!
References
- http://howto-pages.org/ffmpeg/
- http://wiki.quakeworld.nu/Mencoder_howto
- mencoder webm: http://wiki.samat.org/WebMv
- list dvd information, http://savvyadmin.com/dvd-to-xvid-encoding-with-mencoder/
- Mcodec How to, http://wiki.quakeworld.nu/Mencoder_howto
- Extracting DVD subtitles to a Vobsub file, http://web.njit.edu/all_topics/Prog_Lang_Docs/html/mplayer/encoding.html
- VP8 Encoder Parameter Guidelines, http://www.webmproject.org/tools/encoder-parameters/
- LGPL project covering MPEG video compression technology - User discussions, http://comments.gmane.org/gmane.comp.video.ffmpeg.user/32907 .. for mpeg 2 webm