[MEncoder-users] Status with MEncoder muxrate problem?
Francois Visagie
francois.visagie at gmail.com
Fri May 1 13:24:59 CEST 2009
On Thu, Apr 30, 2009 at 6:50 PM, L Lee <llee040 at sbcglobal.net> wrote:
>
> > mencoder -field-dominance 1 -mc 0 -vf hqdn3d=2:1:2,harddup -oac lavc -ovc
> > lavc -lavcopts
> >
> abitrate=128:acodec=ac3:autoaspect:ilme:ildct:keyint=15:mbd=2:top=0:trell:vbit
> >
> rate=%BITRATE%:vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vstrict=0%
> >
> PSNR%:vmax_b_frames=2%VB_STRAT%:dia=2:preme=2:predia=2:mbcmp=6:precmp=2:cmp=2:
> > subcmp=6:last_pred=2:mv0:mv0_threshold=0
> > -of mpeg -mpegopts format=dvd:tsaf %1 -o %OUTPUT% >%OUTPUT%.%PASS%.txt
> > This problem seems widely reported on the Internet but I haven't found
> any
> > solutions to it. All versions of MEncoder I've tried so far have the
> problem
> > with slight variations in behaviour.
>
> Do you mind my asking where the values for your variables (%[VALUE]) come
> from?
Hi Laine,
They're provided by the rest of the batch file. Here are extracts to give
you an idea:
@echo off
setlocal
set BITRATE=6680
REM set starting command
set CMD=37
set PASS=
set PSNR=:psnr
set VB_STRAT=
REM Check that input file is valid
if exist %1 goto E%CMD%
echo
echo.
echo Invalid input file %1!
echo HINT: If it contains spaces, enclose input filename in quotes
pause
goto EXIT
:OUTNOTOK
echo
echo.
echo %OUTPUT% already exists!
echo Press Ctrl-C to abort, else
pause
goto L%CMD%
REM production encodes
:E37
set PASS=1
set VB_STRAT=:vb_strategy=1
if exist psnr_*.log del psnr_*log
if exist divx2pass.log del divx2pass.log
set CMD=37
set OUTPUT=%1.%CMD%.mpg
if exist %OUTPUT% goto OUTNOTOK
echo Start %CMD% >>%OUTPUT%.time.txt
echo. | date | find /v "Enter the new date: (yy-mm-dd)" >>%OUTPUT%.time.txt
echo. | time | find /v "Enter the new time:" >>%OUTPUT%.time.txt
:L37
mencoder -field-dominance 1 -mc 0 -vf hqdn3d=2:1:2,harddup -oac lavc -ovc
lavc -lavcopts
> abitrate=128:acodec=ac3:autoaspect:ilme:ildct:keyint=15:mbd=2:top=0:trell:vbitrate=%BITRATE%:vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vstrict=0%PSNR%:vmax_b_frames=2%VB_STRAT%:dia=2:preme=2:predia=2:mbcmp=6:precmp=2:cmp=2:su
> bcmp=6:last_pred=2:mv0:mv0_threshold=0 -of mpeg -mpegopts format=dvd:tsaf
> %1 -o %OUTPUT% >%OUTPUT%.%PASS%.txt
> echo End pass %PASS% >>%OUTPUT%.time.txt
> echo. | date | find /v "Enter the new date: (yy-mm-dd)" >>%OUTPUT%.time.txt
> echo. | time | find /v "Enter the new time:" >>%OUTPUT%.time.txt
> if %PASS% == 2 goto END
> set PASS=2
> set VB_STRAT=
> goto L37
>
> :END
> echo
> :EXIT
> if exist psnr_*.log del psnr_*log
> if exist divx2pass.log del divx2pass.log
> set BITRATE= set CMD=
> set OUTPUT=
> set PASS=
> set PSNR=
> set VB_STRAT=
> endlocal
>
BITRATE is calculated by an Excel DVD size calculator I made. The other
values and options I decided upon after reading all the MEncoder
documentation, noting information relevant to DVD-compliant encoding and
then trying various combinations.
> > 1) To your knowledge has this problem been fixed and if so, in what
> > release/SVN?
>
> I know of no fixes.
Thanks.
> I've gotten so accustomed to the buffer underflow message, I just add
> muxrate=36000 to my mpegopts as a reflex. That has always prevented the
> message except in cases for which the video was already known to have
> problems. It's never caused any harm that I'm aware of.
Thanks, it looks like I might have to try that.
> Thanks for your post. I'm interested in trying some of those lavc options,
> although recently I've been relying on "vqscale=1" and a strategy of using
> vrc_minrate, vrc_rate, and vrc_maxrate to insure high quality for most of
> my
> conversions. MEncoder issues warnings when I use those options, but I like
> what I get. I usually try to keep whatever is the current SVN for my
> MEncoder configuration (some might warn me of being a little too haphazard
> that way), and I'm not sure how my strategies have been affected by code
> changes recently, but I'm please that I'm able to combine those options in
> such a way so as to keep high quality at a target bit rate.
>
I have an Excel spreadsheet with the all the various command line options
and values I tried along with PSNR and size results. If it's of any value to
you I can send it on.
Kind regards,
Francois
More information about the MEncoder-users
mailing list