LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Mencoder toubles (https://www.linuxquestions.org/questions/linux-software-2/mencoder-toubles-146285/)

PhaseSpace 02-15-2004 04:35 AM

Mencoder toubles
 
Not sure if this is the best place to post this question, but hopefully someone will know.

I am trying to encode a DVD to avi file. I do this without any problems on linux with the following command:

mencoder -dvd 1 -dvd-device /mnt/cdrom -ovc lavc
-lavcopts vcodec=mpeg4:vhq:vbitrate=880
-vop scale -zoom -xy 640 -oac mp3lame
-lameopts abr:br=128 -o file.avi

This brings down a DVD to a 650MB avi file and I can play the movie on linux no problem.

However, when I try to play the file under windows, real player and Microsoft Player do not work and crash.

Why? Is this becaise I am using the wrong video or audio codec? If so, which ones are good to use? Or is this something i am doing wrong when I burn the CD?

Hope somone has some advice.

PhaseSpace 02-15-2004 06:16 PM

no one has any ideas on this topic?

snacky 02-15-2004 06:30 PM

You need to give some more info -- for example, what version you are using, and what exactly you are doing when you create the ISO and burn the CD.

Meanwhile I have some complaints about your options.

You should upgrade to 1.0pre3 if you're not already using it. Do not use the "vhq" lavc option. Just take it out and use "mbd=2" instead. For good quality, you should also use trell and cbp as lavc options; they add a tiny amount to the encoding time but may make a noticeable difference in visual quality.

"-vop scale -zoom xy 640" is a little confusing to me, and I suspect it doesn't do what you think it does.

Maybe the windows machine doesn't have DivX codecs on it? I can verify that DivX files created with mencoder play just fine with pretty much any other player...

PhaseSpace 02-18-2004 04:12 AM

Thanks for the reply.

I think the problem stems from the fact that i am using the mencoder options incorrectly.

Could you give me an example command that you would use to convert a DVD to an avi file. Using whatever codec you think is good. I will take that and read thought documentation to figure it out.

snacky 02-25-2004 08:33 PM

hmm, sorry for the LONG wait between replies, but just in case anyone cares, here's something you might try:

First, upgrade to mplayer 1.0pre3 if you haven't already.

mencoder dvd://1 -oac mp3lame -lameopts vbr=3:br=128:q=0 -ovc lavc \
-lavcopts vcodec=mpeg4:vme=5:mbd=2:v4mv:precmp=2:cmp=2:mbcmp=2:trell:\
cbp:mv0:vbitrate=880 -o file.avi

Should turn out fairly well. I consider 880 to be a little on the low side so I would also use -vf hqdn3d=6:4:7 (or so) as well. Finally, you save some bitrate-per-quality by cropping off black borders from the top and bottom, then rescaling so the height is still a multiple of 16. Use mplayer -vf cropdetect to help with this.

If it really matters, you can experiment and tweak a bit more. Good candidates for experimentation include the hqdn3d parameters (higher numbers make the video more compressible but also add blurriness and, for the third option, ghosting); playing with vmax_b_frames (vmax_b_frames=1 or 2 might sometimes be better); adding "predia=2:dia=2" to lavcopts (sometimes 3 is good); and possibly using the lumi_mask and dark_mask in lavcopts. These last two are debatable; they can make some parts more compressible but the loss in image quality often isn't worth it (making the image either too washed out at times, or too dark at times). It all depends on the source material! For certain unusual source material, much different options might make more sense.


All times are GMT -5. The time now is 07:45 PM.