[MEncoder-users] Wmv conversion problem

Devendra Rane ranedk at gmail.com
Mon Aug 6 19:57:14 CEST 2007


Hi,

I'm working on a application where I write jpg/gifs to
a wmv(wmv2) file with audio at 5 fps. The last frame is without audio and
stays for 8 seconds (at 5fps).
It runs smoothly with windows media player, but on mplayer, it crashes just
before the last frame with "uninit_vcodec" error.
When i convert it to a flv using mencoder, it converts the whole video
properly except the last frame. It always goofs up the last frame.

$> mencoder input.wmv -ffourcc FLV1 -of lavf -ovc lavc -lavfopts
i_certify_that_my_video_stream_does_not_use_b_frames -lavcopts
vcodec=flv:acodec=mp3:abitrate=56 -srate 22050 -oac mp3lame -o output.flv

I think the problem is with the way mplayer/mencoder handles
keyframe. The last 5 seconds has got just one keyframe and no audio. I think
mplayer/mencoder writes the timestamp only when a keyframe is encountered,
so when it encounters the last frame(8 seconds before the video ends), it
writes its last timestamp and exits.
Please provide me with some pointers or a way to disable mplayer/mencoder's
behaviour with keyframes.

thanks in advance

Regards
Dev

PS: I'm a newbie, the above assumptions are based on my
(ignorant)observations, extremely sorry if they are wrong about the great
mplayer/mencoder :)



More information about the MEncoder-users mailing list