Output bitrate significantly less than vbitrate
Hi, I am trying to produce valid mpeg2 video for use in dvd players. The problem is that I keep ending up with undersized video. I am trying to encode 22 minutes of PAL ogg video into a 700mb mpeg2. mencoder -of mpeg -vf scale=720:576,harddup -oac lavc -ovc lavc -lavcopts acodec=ac3:abitrate=192:vcodec=mpeg2video:keyint=25:vbitrate=4251648:aspect=4/3:vrc_maxrate=9800:vrc_buf_size=1835:vpass=1 -mpegopts format=dvd -srate 48000 -passlogfile 'video.pass' -o 'video.mpg' 'video.ogm' For the second pass I just change it to pass=2 (I assume it doesn't hurt to leave the other options there.) The vbitrate of 4152kbps (k = 1024) combined with a 192kbit abitrate should produce a total average bitrate of 4344kbps. For 22 minutes of video this should produce a 700mb file. However I get a ~400mb file. I thought I would tell it to use a higher bitrate (like 9000kbps) to test it and hope that it would average out higher, but it was only just more than 400mb. I have read that this has to do with vqmin/vqmax/lmax/lmin and vqscale/vqcomp but I have no idea which, if any, of those I should try to change. Searching the list archives, I was able to find a few references to a similar problem, but with several conflicting ideas (some say don't touch vqscale, some say changing vqscale will reduce video quality in high motion scenes, some say don't use vbitrate at all but instead use vqscale, etc.) I am also concerned that changing these values might create something that isn't playable on dvd players. In essence, how do I get mencoder to produce dvd-complient mpeg2 video with an average bitrate equal to my vbitrate setting. I am needing to automate this for an unknown number of files (I have a script that produces the mencoder command from values it parses from a test run of mplayer), so I would rather not have to do too much trial and error (I can program the script to automatically adjust certain values given the output file size and try again, but I would rather it got it right 1st try.) n0dalus.
On Fri, 23 Sep 2005 17:05:22 +0930 n0dalus <n0dalus@gmail.com> wrote:
For 22 minutes of video this should produce a 700mb file. However I get a ~400mb file.
It's obvious that your source is being encoded at the maximum possible quality, and simply not needing a bitrate of 4000. What would you like it to do with the bits it doesn't need, throw some random data in there? If you want to increase the size, you could set vqmin to 1, or use "-vf noise" to add some random noise that will be more difficult to encode and require a higher bitrate...
On 9/24/05, RC <rcooley@spamcop.net> wrote:
On Fri, 23 Sep 2005 17:05:22 +0930 n0dalus <n0dalus@gmail.com> wrote:
For 22 minutes of video this should produce a 700mb file. However I get a ~400mb file.
It's obvious that your source is being encoded at the maximum possible quality, and simply not needing a bitrate of 4000. What would you like it to do with the bits it doesn't need, throw some random data in there?
If you want to increase the size, you could set vqmin to 1, or use "-vf noise" to add some random noise that will be more difficult to encode and require a higher bitrate...
Ok, I guess that makes sense since the source is already compressed. Thanks. n0dalus.
participants (2)
-
n0dalus -
RC