Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#2046 closed defect (invalid)

[MEncoder] vbitrate can't be higher than 16000

Reported by: temp0@… Owned by: reimar
Priority: normal Component: mencoder
Version: unspecified Severity: major
Keywords: Cc: compn
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

When I am trying to make MPEG2 video with CBR bitrate, it seems that vbitrate is limited to 16000 only. When higher value is used, video driver will not initialize.
Using this params to get CBR bitrate:


-lavcopts autoaspect=1:vcodec=mpeg2video:vrc_buf_size=1835:vrc_minrate=16000:vrc_maxrate=16000:vbitrate=16000:acodec=ac3:abitrate=448:threads=4:keyint=5:vqscale=1:vqmin=3:vqmax=5


When vbitrate > 16000 I got:


Could not open codec.
FATAL: Cannot initialize video driver.


I need to predict position in file for FF/RW support so CBR is a must for me when transcoding non mpeg2(eg. MKV) files to TV (via UPnP/DLNA).
Please is somehow possible to get CBR MPG2 stream higher than 16000 which is quite low for HD content so "buffer underflow" is generated? Also then it is very very very slow transcoding/reencoding with these parameters used.
This problem is with all MEncoder versions available.
Many thanks!

Change History (4)

comment:1 by compn, 12 years ago

Cc: patriotact@… added

use the -lavcopts o=vbitrate=20000 then.
-lavcopts o=
means to use the ffmpeg options, check ffmpeg manual for list.

comment:2 by temp0@…, 12 years ago

Unfortunately it doesn't work.
Tried to use o=b=20M:o=minrate=20M:o=maxrate=20M:o=bufsize=5000k without success.
So I used fake parameter for test and defined "o=xxx=30" and no error generated so it seems all params used with o= are ignored...
But it seems not fully ignored because when o=maxrate used, it complains with missing bufer size so it parses these params somehow but final bitrate is always same(very low, about 2700kbits) whatever bitrate is set.

comment:3 by reimar, 12 years ago

Resolution: invalid
Status: newclosed

Please read the man page.

vbitrate=<value>

Specify bitrate (default: 800).
WARNING: 1kbit = 1000 bits

4-16000

(in kbit)

16001-24000000

(in bit)

Values above 16000 are in bit/s.
So you want vbitrate=20000000
In addition, each o options will override a previous one.
Thus your command line only tried o=bufsize=5000k which obviously does not set the bit-rate.
As the man-page describes, the syntax is
o=b=20M,minrate=20M,maxrate=20M,bufsize=5000k
Though since I haven't tested myself I'm not promising it will work (though I think it does).
Thus I am closing it in the belief that this is just a usage error, reopen if I am wrong.

comment:4 by temp0@…, 12 years ago

My fault:-(
I read the manual, searched the google for examples for last week but never spotted this vbitrate specifics for values higher than 160000. Also googled for o= parameter and didn't found proper definition anywhere.
Now searched manpage again and found exactly what Reimar posted also with description for o= parameter which I never spotted until Compn suggested it.
Guys many thanks for help and sorry for my blind eyes:-(
I added three nulls and now it works! Will try to experiment also with o= param.
Many thanks for help and sorry for this invalid bug report.
ExSport

Note: See TracTickets for help on using tickets.