View Full Version : Mencoder Ignoring Bitrate?
The Bridge
5th December 2009, 21:14
Hi,
I'm completely new to this so bare with. I have ripped a copy of one of my blu ray disc films with AnyDVD HD, which gave me a .m2ts file.
I then used TsMuxer to take out all the streams I didn't need leaving me with a .m2ts file with one h264 video stream and one ac3 audio stream.
I'm now trying to convert this to an avi using mencoder.
My plan was to just convert the video, ignoring the audio, then mux the audio back into the avi file.
Here is the mencoder command I am using:
mencoder movie.m2ts -nosound -ofsp 23.976 -ovc lavc vcodec=mpeg4:vbitrate=9600 -o movie.avi
The output from running this command is a file, movie.avi, which is ~900MB. So is it ignoring the bitrate settings?
I'm not sure if it possible to check the bitrate of the movie.avi file? Or is it just that my mencoder command is nonsense?
Any help appreciated.
Thanks
manono
6th December 2009, 05:04
Hello, and welcome to the forum,
You can check the bitrate of an AVI in Bitrate Viewer:
http://www.videohelp.com/tools/Bitrate_Viewer_2
Are you saying it's undersized? That 9600 bitrate you set is pretty high for an AVI, so I suspect the file size can't go any higher - it can't use all the bits you requested. The AVI looks pretty good, doesn't it? I don't use mencoder though, so I can't help with the specifics. I'm sure someone else around here can.
The Bridge
6th December 2009, 14:05
Hi,
Thanks for the reply.
I believe that its well undersized. The m2ts file is roughly 23GB, so I was expecting a file in the region of 8GB-9GB, so as you can see quite a bit off that!
As for the video itself, its looks awful, like it is using a different bitrate than that specified.
So could it be that I'm over some sort of maximum and it is falling back to a default bitrate?
I'll check the bitrate viewer you supplied, thanks for that.
The Bridge
6th December 2009, 14:09
Ok I went to try the bitrate viewer, but it is for windows.
Apologies I should have said that I was running linux (Ubuntu karmic x64 if it make a difference).
Thanks again.
manono
6th December 2009, 15:19
I don't guess I was much help at all then. We do have a forum devoted to other operating systems, but it's pretty quiet. Maybe someone will come along to help with the mencoder settings.
Brazil2
6th December 2009, 17:21
I'm now trying to convert this to an avi using mencoder.
Since you want to use AVI container I assume you want to encode to MPEG4 ASP. So I suggest you to use Xvid with the following command:
mencoder -noskip -vf-add harddup -ofps 24000/1001 -ovc xvid -xvidencopts bitrate=9600:max_bframes=2:me_quality=6:vhq=4:bvhq=1 -o movie.avi
Notice that bitrate=9600 is overkill and may cause troubles with many standalone DVD players. The playback should be fine on a computer though. You can also try to encode with a fixed quantizer such as 4 or 3: replace bitrate=9600 with fixed_quant=4.
You may also want to try Avidemux (http://avidemux.sourceforge.net) which includes both Xvid and Lavc MPEG4 ASP encoders.
The Bridge
6th December 2009, 18:39
Thanks Brazil2,
I'm off to give that a try. I'll let you know how I get on.
The Bridge
15th December 2009, 20:57
Hi,
I've just got round to giving this a go as I was on holiday recently.
The video converts fine with the code Brazil gave (though I had to add -nosound to make it work)
However when I mux the audio back to the created avi there are sync issues with the movie being a couple of seconds ahead of the audio.
Is this due to the conversion process, or something else?
Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.