LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2009, 08:03 PM   #1
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Rep: Reputation: 30
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
 
Old 05-20-2009, 12:32 PM   #2
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
can i get some help on this please?
 
Old 05-20-2009, 12:49 PM   #3
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-20-2009, 02:12 PM   #4
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
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

Last edited by steve51184; 05-20-2009 at 02:20 PM.
 
Old 05-20-2009, 02:48 PM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-20-2009, 02:53 PM   #6
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
thank you i'll try that now.. also will that work on windows and linux as i use both?
 
Old 05-20-2009, 03:11 PM   #7
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
hey where can i get mencoder from without mplayer? or at least without smplayer?
 
Old 05-20-2009, 03:15 PM   #8
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-20-2009, 03:18 PM   #9
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
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 :\
 
Old 05-20-2009, 03:19 PM   #10
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
On window$ just use the binary:
http://oss.netfarm.it/mplayer-win32.php
 
Old 05-20-2009, 03:25 PM   #11
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
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!:
 
Old 05-20-2009, 03:28 PM   #12
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by H_TeXMeX_H View Post
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
 
Old 05-20-2009, 04:22 PM   #13
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
Old 05-20-2009, 07:25 PM   #14
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by H_TeXMeX_H View Post
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

Last edited by steve51184; 05-20-2009 at 07:28 PM.
 
Old 05-21-2009, 05:58 AM   #15
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing FFMPEG & MENCODER completely with all codecs and tools jjrjr1 Linux - Software 2 05-16-2009 09:03 PM
Green screen after video conversion, AVI to MP4 using Mencoder,Mplayer,FFmpeg,x264, manuken Linux - Newbie 4 10-29-2008 07:40 PM
Mencoder: x264 [error]: no ratecontrol method specified PsypherPunk Linux - Software 1 01-12-2008 09:45 AM
x264 Streaming media server & client decompressing on server-side? Pearlseattle Linux - General 2 12-12-2007 12:04 PM
Converting DVD to x264 w/ Mencoder out of sync? carl0ski Linux - Desktop 1 01-12-2007 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration