Using mencoder to convert wmv3 to flv
I know ffmpeg can't decode wmv3, but I found that mencoder can do it with the codec dll's. I've successfully compiled the latest non-CVS release with the codecs and was able to convert a wmv3 to flv. Unfortunately there are problems. The resulting flv file plays, but the sound cuts out after about 2 seconds while the video plays in fast foward. I'd like to figure out what the problem is. I tried the CVS version of MPlayer, but that didn't work too well at all. I think the latest release version works better. Here is the command I'm using: mencoder movie.wmv -o movie.flv -of lavf -ovc lavc -oac lavc -lavcopts vcodec=flv:vbitrate=250:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3: predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3: abitrate=56 -vf scale=320:240 -srate 22050 -af lavcresample=22050 -endpos 02:00 This works beautifully converting an mpg to flv, but it just refuses to produce a proper flv based on wmv3. I've tried a ton of combinations of these parameters with no luck. I've even tried to covert the wmv to an mpg, avi or mov. None of these worked at all. It would actually encode the file, but the resulting mpg or avi errored out in my players, so it basically produced a bad file. If I could convert to mpg then conver that to flv that would be fine. I just want to end up with an flv version of any wmv3 that's thrown at me. Any tips will be greatly appreciated! Thank you, - Scott
Scott <scott <at> hawkee.com> writes: Getting so close! I added -fps 25 to the end of my input and the audio played perfectly to the end of the flv. Now my problem is with the video playing in double time. Here's my new command line: mencoder movie.wmv -o movie.flv -of lavf -ovc lavc -oac lavc -lavcopts vcodec=flv:vbitrate=250:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 :predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate=56 -vf scale=320:240 -srate 22050 -af lavcresample=22050 -fps 25 I tried messing with the vbitrate but that didn't seem to help. I think it has something to do with the video frames per second or bitrate. Thank you, - Scott
Scott <scott <at> hawkee.com> writes:
Scott <scott <at> hawkee.com> writes:
Getting so close! I added -fps 25 to the end of my input and the audio played perfectly to the end of the flv. Now my problem is with the video playing in double time. Here's my new command line:
mencoder movie.wmv -o movie.flv -of lavf -ovc lavc -oac lavc -lavcopts vcodec=flv:vbitrate=250:autoaspect:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 :predia=2:dia=2:precmp=2:cmp=2:subcmp=2:preme=2:turbo:acodec=mp3:abitrate=56 -vf scale=320:240 -srate 22050 -af lavcresample=22050 -fps 25
I tried messing with the vbitrate but that didn't seem to help. I think it has something to do with the video frames per second or bitrate.
Thank you, - Scott
I finally got it to work by replacing -fps 25 with -ofps 15. The video would play too fast if I did -ofps of anything higher than 15 and -fps seemed to cause troubles, so I found out it's not necessary. This works pretty well for most wmv3 files, but I still get Segmentation Faults with a couple of them. I'm not exactly sure why, but there has to be a way to make this work with every single wmv3 file. If anybody has some experience with this, I'd love to hear from you!! Thank you, - Scott
participants (1)
-
scott@hawkee.com