LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mencoder & x264 help (https://www.linuxquestions.org/questions/linux-software-2/mencoder-and-x264-help-727151/)

steve51184 05-19-2009 07:03 PM

mencoder & x264 help
 
hi all i'm trying to get mencoder working to convert a video along with an intro video (so essentially joining two videos but this will be for many files all with the same intro file) but i can't seem to find any good guides out there

here's what i want:

video: x264 @ 200kbs
audio: lame mp3 22050 Hz stereo @ 64kbs cbr
resolution: 512:384
framerate: 23.976
container: avi

and i want to mp3 converting and video converting to be as fast as possible (i know there are options to speed it up) and also to have multi-core support if available

please help

steve51184 05-20-2009 11:32 AM

can i get some help on this please?

H_TeXMeX_H 05-20-2009 11:49 AM

What you want to do may be more complicated, so you may have to take it step by step, to join files see here:
http://www.misterhowto.com/index.php..._with_mencoder
Also see some howtos on converting the videos:
http://wiki.quakeworld.nu/Mencoder_howto

You may need to first convert all videos to a common format and settings and then join them. I've never done all that in one step, but you can try.

I can't really provide you with a specific example because I usually use ffmpeg to encode videos, then if I need to join them (rarely) I use mencoder.

steve51184 05-20-2009 01:12 PM

can't i just combine the two following commands?

Quote:

mencoder -oac copy -ovc copy -idx -o output.avi video1.avi video2.avi video3.avi
Quote:

mencoder input.avi -o output.avi -ovc x264 -x264encopts bitrate=3000 pass=1 nr=2000
into something like:

Quote:

mencoder -oac copy input1.avi input2.avi -o output.avi -ovc copy -idx x264 -x264encopts bitrate=200 pass=1 nr=2000
that should work right? now i just need the mp3 audio settings and the resolution/framerate :)

i think the mp3 setting go like this:
Quote:

-oac mp3lame -lameopts cbr:br=64 -srate 22050
and the resolution like this:
Quote:

-vf scale=512:384
please advise

H_TeXMeX_H 05-20-2009 01:48 PM

I would try this command:

Code:

mencoder -o output.avi -oac mp3lame -lameopts cbr:br=64 -srate 22050 -ovc x264 -x264encopts bitrate=200 threads=auto -ofps 23.976 input1.avi input2.avi
You can also do 2 pass encoding if you want better quality as the tutorial says, but it takes at least twice as long.

steve51184 05-20-2009 01:53 PM

thank you i'll try that now.. also will that work on windows and linux as i use both?

steve51184 05-20-2009 02:11 PM

hey where can i get mencoder from without mplayer? or at least without smplayer?

H_TeXMeX_H 05-20-2009 02:15 PM

It should work on both OSs. You cannot get mencoder without mplayer, it's a part of it. Just download it from the main site, they suggest using svn especially when using newer dependencies:
http://www.mplayerhq.hu/design7/dload.html

Then compile it. smplayer is not necessary, it's just a GUI frontend.

steve51184 05-20-2009 02:18 PM

if i get it from the svn will it be windows binary's or source as i don't know how to compile it on windows only linux :\

H_TeXMeX_H 05-20-2009 02:19 PM

On window$ just use the binary:
http://oss.netfarm.it/mplayer-win32.php

steve51184 05-20-2009 02:25 PM

hmm i can't get the svn to work lol not a good day :P

Quote:

Command: Checkout from E:/Users/username/AppData/Local/Temp/svn checkout svn:/svn.mplayerhq.hu/mplayer/trunk mplayer, revision HEAD, Fully recursive, Externals included
Error: Can't check path 'E:\Users\username\AppData\Local\Temp\svn checkout
Error: svn:\svn.mplayerhq.hu\mplayer\trunk mplayer': The filename, directory name, or
Error: volume label syntax is incorrect.
Finished!:

steve51184 05-20-2009 02:28 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 3547289)
On window$ just use the binary:
http://oss.netfarm.it/mplayer-win32.php

what do i use on my intel g6600?

MPlayer-p4-svn-29312.7z
mplayer-r29312.tar.bz2
MPlayer-rtm-svn-29312.7z

H_TeXMeX_H 05-20-2009 03:22 PM

Try the p3 or p4 or rtm (whatever that means). These were likely compiled to support at least pentium 3 = p3, pentium 4 = p4, and whatever rtm is.

I can't help with this too much because I don't use Window$, haven't used it in quite some years.

steve51184 05-20-2009 06:25 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 3547249)
I would try this command:

Code:

mencoder -o output.avi -oac mp3lame -lameopts cbr:br=64 -srate 22050 -ovc x264 -x264encopts bitrate=200 threads=auto -ofps 23.976 input1.avi input2.avi
You can also do 2 pass encoding if you want better quality as the tutorial says, but it takes at least twice as long.

just tried that but i get this error:

Quote:

MEncoder Sherpya-SVN-r29312-4.5.0 (C) 2000-2009 MPlayer Team
File not found: 'threads=auto'
Failed to open threads=auto.
Cannot open file/device.

Exiting...
so i changed it to this and it works 100%

Code:

mencoder -o output.avi -oac mp3lame -lameopts cbr:br=64 -srate 22050 -ovc x264 -x264encopts bitrate=200:threads=auto -ofps 23.976 input1.avi input2.avi
but the quality it lower then when i use the same settings in mediacoder so is there an option to use 2 pass or anything else that will improve the quality?

i've tried this but still no luck:

Code:

mencoder -o output.avi -oac mp3lame -lameopts cbr:br=64 -srate 22050 -ovc x264 -x264encopts pass=2:bitrate=200:threads=auto -ofps 23.976 input1.avi input2.avi
also it works if i change pass=2 to pass=1

H_TeXMeX_H 05-21-2009 04:58 AM

You need to do them in order, first run it with pass=1, then with pass=2. If you want better quality you can also remove the threads option, it may affect motion estimation. However, you said you wanted a multithreaded way of encoding. You can also add the 'nr=' option back in, but it's mostly for noisy input videos, nr = noise reduction filter.


All times are GMT -5. The time now is 03:19 PM.