Log in

View Full Version : mencoder not encoding in average bitrate mode


liquidator87
22nd June 2010, 10:33
Hi, I'm having a problem with a recent build of mencoder (r31515), which seems unable to encode in vbr mode with libx264.

I run the first pass with the following options: pass=1 level_idc=41 tune=film preset=placebo me=umh bitrate=11781

Shouldn't the bitrate set the vbr mode?

From the log of the first pass I see the crf mode used instead...

Lam3rD
22nd June 2010, 10:39
Why would you want to use ABR and not CRF or 2 pass? And why do you use it via MEncoder and not directly x264 via CLI or some GUI?

Obviously bitrate alone isn't enough, you probably need to add rc=abr

nm
22nd June 2010, 10:41
Hi, I'm having a problem with a recent build of mencoder (r31515), which seems unable to encode in abr mode with libx264.

I run the first pass with the following options: pass=1 level_idc=41 tune=film preset=placebo me=umh bitrate=11781

x264 presets don't work in MEncoder.

liquidator87
22nd June 2010, 11:26
@Lam3rD : rc=abr won't work, already tried... x264 alone is not an option, since I need to crop the video, and I'm on linux

@nm : they are well documented in the man pages, so I think they will work, since they generate the right settings (exept the crf mode)

abr was actually a typo, I meant vbr (normal 2-pass mode)

nm
22nd June 2010, 11:55
@nm : they are well documented in the man pages, so I think they will work, since they generate the right settings (exept the crf mode)
Ah, I have missed the addition of a preset system.

bnshrdr
22nd June 2010, 16:31
liquidator87
x264 alone is not an option, since I need to crop the video, and I'm on linux

There's a patch for x264 you can apply that gives it some different types of filtering.

x264_filtering_r1612 (http://pastebin.com/AZdGNwMv) <kemuri-_9>
x264_filtering_changes_r1602 (http://pastebin.com/QU9Xwxy6) <J_Darnley>

I'm not sure if you need to apply both; it seems to me anything having to do with crop is in the second patch listed.

If your not sure how to compile x264, I'm sure you can request a build from someone.

kemuri-_9
22nd June 2010, 23:44
A) you'll need to apply both
B) those patches are not going to apply cleanly.

I have updated the patch i originally stopped, which now includes crop from the get-go,
so i can offer a temporary build if necessary for ubuntu and compatible systems,
though resize is currently incomplete now for the changes that Dark_Shikari requested.

foxyshadis
23rd June 2010, 10:42
Alternately, you can just use: mencoder <options> -ovc raw -of y4m -o - | x264 <options> -

liquidator87
23rd June 2010, 10:48
@foxyshadis : Thanks, I'll try that... Is that "lossless" (has the same effects as encoding entirely with mencoder)?

The original questions still stands, I wonder why the recent builds of mencoder have this "strange" behaviour...

foxyshadis
23rd June 2010, 11:06
Yes, it passes the video over to x264 in exactly the same raw format that it would encode it from internally. A recent svn update probably broke something, I'm prevented from viewing svn where I am but you can always file a bug report over at mplayerhq.hu.

nm
23rd June 2010, 14:40
Alternately, you can just use: mencoder <options> -ovc raw -of y4m -o - | x264 <options> -
Is there an up-to-date patch that adds Y4M output support to MEncoder since this is not supported in vanilla SVN?

I only know this one, but it probably doesn't apply cleanly to current SVN tree: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2004-December/032130.html

foxyshadis
23rd June 2010, 19:26
I guess not, I've been using a build with it included for so long that I just assumed it was part of mencoder. Sorry about that, then. I wonder if it would be tough to update the patch, if there's even any interest in it.