Log in

View Full Version : Help with mencoder configuration profile?


gambrjl
28th January 2008, 01:50
I'm trying to set up a profile for encoding video for my creative zen. There's a scale limitation of 320x240. I've created a config file but it's erroring out saying no audio encoder selected but I have the oac flag set.

I apologize if this a repeat. I've found the gentoo wiki mencoder tutorial and trying to learn by the manpage

here's my config file


[zen]
profile-desc="MPEG4/MP3 encoding"
ovc=lavc=1
oac=lavc=1
lavcopts=vcodec=mpeg4:acodec=mp3:abitrate=128
vf=scale=320:240


I don't know what the =1 means on the end of the oac and ovc option I'm copying that from this gentoo tutorial (http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide#Profiles)

Thanks

BTW.. if anyone knows a tutorial that explains the mencoder configuration flags in laymans terms I'd appreciate it

nm
28th January 2008, 08:04
I'm trying to set up a profile for encoding video for my creative zen. There's a scale limitation of 320x240. I've created a config file but it's erroring out saying no audio encoder selected but I have the oac flag set.
I don't think lavc has an mp3 encoder. You'll need to use Lame for MP3 encoding, as the Gentoo tutorial shows.

I don't know what the =1 means on the end of the oac and ovc option I'm copying that from this gentoo tutorial (http://gentoo-wiki.com/HOWTO_Mencoder_Introduction_Guide#Profiles)
It just means that those encoders are to be enabled. You can also use "yes" instead of 1.

BTW.. if anyone knows a tutorial that explains the mencoder configuration flags in laymans terms I'd appreciate it
See chapters 13 and 14 in the MPlayer/MEncoder HTML documentation: http://www.mplayerhq.hu/DOCS/HTML/en/

Personally, I'd just write shell scripts instead of configuration profiles for MEncoder, but use what you think is best for you.

gambrjl
28th January 2008, 15:57
Thanks nm, appreciate it. I'm not real adept at shell scripting but I'll look into it. I could probably write a python script to do the same thing.

I got the audio settings from the mencoder audio settings in k9copy.. lol

The lame encoding is erroring out, i haven't figure out what is wrong there yet

nm
28th January 2008, 16:41
Thanks nm, appreciate it. I'm not real adept at shell scripting but I'll look into it. I could probably write a python script to do the same thing.
To do the same thing with a simple Bash script, write this to a file (encode.sh) and mark it executable (chmod a+x encode.sh): #!/bin/bash
mencoder -ovc lavc -oac mp3lame -lavcopts vcodec=mpeg4:vqscale=3 -vf scale=320:240 "$@"

Usage examples:
$ ./encode.sh inputfile -o output.avi
$ ./encode.sh -vf crop=704:568,scale=640:-2 -noskip inputfile -o output.avi

(as the second example shows, you can override some parameters specified in the shell script later on the command line)

Multipass encoding is much easier to handle with a script than with MEncoder profiles.

The lame encoding is erroring out, i haven't figure out what is wrong there yet
What error do you get? Maybe MEncoder wasn't built with libmp3lame support? It probably needs to be enabled with a USE flag in Gentoo.

gambrjl
28th January 2008, 17:28
What error do you get? Maybe MEncoder wasn't built with libmp3lame support? It probably needs to be enabled with a USE flag in Gentoo.

I'm at work now but I'll get the exact error tonight. I read somewhere a couple days ago about "--enable-libmp3lame" or something like that in a config file but haven't found it again.

I'm using ubuntu. I just found the gentoo wiki in a google search for mencoder help

And I haven't done any 2 pass encoding yet.. still working on 1

Thanks for the help