Vict0r Meldrew
18th October 2008, 18:10
This is a question about undersized video files and a discrepancy between the file size produced by Mencoder Xvid 2-pass versus Xvid VfW 2-pass. I'm trying to make a 2CD .avi backup of a film called Walk The Line, desired video filesize 1260Mb.
I'm encoding directly from the original VOB file, using the same bitrate, crop and resize parameters for both Mencoder and XviD VfW (Koepi's build 1.1.3). For Mencoder, I have put together a small batch file which takes care of both passes - see below:
@echo off
REM Change the variable values below.
REM crop[=w:h:x:y]
set volpath=C:\WTL
set infile=VTS_04_PGC_01_1.VOB
set outfile=Walk-The-Line-xvid-vidonly.avi
set crop=0:424:0:76
set res=688:288
set bitrate=1351
echo Encoding "%volpath%\%infile%"...(first pass started at %time%).
START /W /MIN /LOW C:\PROGRA~1\MPlayer-1.0rc2\mencoder.exe "%volpath%\%infile%" -passlogfile "%volpath%\mencoder.2passlog" -vf crop=%crop%,scale=%res% -nosound -ovc xvid -xvidencopts bitrate=%bitrate%:me_quality=6:nointerlacing:max_bframes=1:noqpel:trellis:quant_type=mpeg:chroma_opt:vhq=4:pass=1 -ffourcc XVID -o "%volpath%\%outfile%"
echo First pass finished at %time%
echo Encoding "%volpath%\%infile%"...(second pass started at %time%)
echo Second pass start time is %time%
START /W /MIN /LOW C:\PROGRA~1\MPlayer-1.0rc2\mencoder.exe "%volpath%\%infile%" -passlogfile "%volpath%\mencoder.2passlog" -vf crop=%crop%,scale=%res% -nosound -ovc xvid -xvidencopts bitrate=%bitrate%:me_quality=6:nointerlacing:max_bframes=1:noqpel:trellis:quant_type=mpeg:chroma_opt:vhq=4:pass=2 -ffourcc XVID -o "%volpath%\%outfile%"
echo Second pass finished at %time%
if exist "%volpath%\mencoder.2passlog" del /q "%volpath%\mencoder.2passlog"
pause
For Xvid VfW, I am opening the VOB file in VirtualDub 1.8.4 with help from fccHandler's MPEG-2 plugin, and using the native crop/resize filters present in VirtualDub.
When I encode the video with mencoder, and specify the bitrate as 1351, I always end up with an undersized file (1020Mb). However, when I encode using Xvid VfW and 2-pass "Home" profile, specifying the same bitrate value, the desired filesize is correctly achieved (1260Mb). I have tried using two different mencoder builds - MEncoder 1.0rc2-4.2.1 and MEncoder Sherpya-SVN-r27323-4.2.4 (supplied with Automen), but still an undersized file is generated.
I have also tried feeding mencoder an AVS file (frameserved via DGDecode), but the file is still undersized.
Is it likely that mencoder is maxed out on bitrate? ..and that the way Xvid is implemented within mencoder differs from VfW - which would explain the file size differential? Or could it be that the mencoder mpeg2 decoder decodes the source differently (which doesn't go very far to explain why mencoder undersized the AVS script). Maybe my mencoder "-xvidencopts"'s need adjustment?
The quality of both files appears indiscernible, at least to my eyes. I've ready the sticky on Oversized/Undersized explanations, but I'm not sure if it applies here..
Thanks in advance.
I'm encoding directly from the original VOB file, using the same bitrate, crop and resize parameters for both Mencoder and XviD VfW (Koepi's build 1.1.3). For Mencoder, I have put together a small batch file which takes care of both passes - see below:
@echo off
REM Change the variable values below.
REM crop[=w:h:x:y]
set volpath=C:\WTL
set infile=VTS_04_PGC_01_1.VOB
set outfile=Walk-The-Line-xvid-vidonly.avi
set crop=0:424:0:76
set res=688:288
set bitrate=1351
echo Encoding "%volpath%\%infile%"...(first pass started at %time%).
START /W /MIN /LOW C:\PROGRA~1\MPlayer-1.0rc2\mencoder.exe "%volpath%\%infile%" -passlogfile "%volpath%\mencoder.2passlog" -vf crop=%crop%,scale=%res% -nosound -ovc xvid -xvidencopts bitrate=%bitrate%:me_quality=6:nointerlacing:max_bframes=1:noqpel:trellis:quant_type=mpeg:chroma_opt:vhq=4:pass=1 -ffourcc XVID -o "%volpath%\%outfile%"
echo First pass finished at %time%
echo Encoding "%volpath%\%infile%"...(second pass started at %time%)
echo Second pass start time is %time%
START /W /MIN /LOW C:\PROGRA~1\MPlayer-1.0rc2\mencoder.exe "%volpath%\%infile%" -passlogfile "%volpath%\mencoder.2passlog" -vf crop=%crop%,scale=%res% -nosound -ovc xvid -xvidencopts bitrate=%bitrate%:me_quality=6:nointerlacing:max_bframes=1:noqpel:trellis:quant_type=mpeg:chroma_opt:vhq=4:pass=2 -ffourcc XVID -o "%volpath%\%outfile%"
echo Second pass finished at %time%
if exist "%volpath%\mencoder.2passlog" del /q "%volpath%\mencoder.2passlog"
pause
For Xvid VfW, I am opening the VOB file in VirtualDub 1.8.4 with help from fccHandler's MPEG-2 plugin, and using the native crop/resize filters present in VirtualDub.
When I encode the video with mencoder, and specify the bitrate as 1351, I always end up with an undersized file (1020Mb). However, when I encode using Xvid VfW and 2-pass "Home" profile, specifying the same bitrate value, the desired filesize is correctly achieved (1260Mb). I have tried using two different mencoder builds - MEncoder 1.0rc2-4.2.1 and MEncoder Sherpya-SVN-r27323-4.2.4 (supplied with Automen), but still an undersized file is generated.
I have also tried feeding mencoder an AVS file (frameserved via DGDecode), but the file is still undersized.
Is it likely that mencoder is maxed out on bitrate? ..and that the way Xvid is implemented within mencoder differs from VfW - which would explain the file size differential? Or could it be that the mencoder mpeg2 decoder decodes the source differently (which doesn't go very far to explain why mencoder undersized the AVS script). Maybe my mencoder "-xvidencopts"'s need adjustment?
The quality of both files appears indiscernible, at least to my eyes. I've ready the sticky on Oversized/Undersized explanations, but I'm not sure if it applies here..
Thanks in advance.