How to convert AVI to WMV by MEncoder

MEncoder could convert any to any with a bit tricky options. The most difficult conversion is to produce Microsoft specific output format, e.g., WMV. Don't worry. The recent version of MEncoder lets us solve this situation very easy.

The options I used here is to specify output format using lavf.

-of lavf \
-lavfopts i_certify_that_my_video_stream_does_not_use_b_frames

So the most simple command should be as below.

mencoder input.avi \
         -of lavf \
         -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
         -ovc lavc \
         -lavcopts vcodec=wmv2 \
         -oac lavc \
         -lavcopts acodec=mp3 \
         -o output.wmv

However, it would be better to specify bitrate for both video and audio.

mencoder input.avi \
         -of lavf \
         -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames \
         -ovc lavc \
         -lavcopts vcodec=wmv2:vbitrate=100 \
         -vf scale=176:144 \
         -oac lavc \
         -lavcopts acodec=mp3:abitrate=48 \
         -o output.wmv

Above command is taken from here.

Tags: ,

have you tested it?

The forum where you got the code says that it does not play in Windows Media Player and you need to download TCMP player. Have you tested your code in Windows Media Player?

never

I'm sorry. I don't have window media player to try. You have to make sure that the source media doesn't have any b frames.

It doesnt work.t

It doesnt work.t

Post new comment