Log in

View Full Version : avisynth -> mpeg2 which encoder etc.


hanfrunz
21st April 2010, 13:41
Hello everyone,

i have quicktime files of a lot of tapes, 30-40 min each. I use a batchfile to create an avisynthscript for each mov that burns in a timecode. That works very well. After that i encode each avs to mpeg2 for dvd authoring (~4.5Mbit/s). Right now i use the old mainconcept encoder to do this. But you can't do batch processing very well, i always have to load the avs, choose a preset add to list. I'd like to use a commandline encoder like mencoder, ffmpeg,... for the encoding. Can anybody recommend an encoder/presets? My goal is to encode as fast as possible, the quality must only be "okay", because it's just for preview. I use a quadcore intel machine with win xp. Right now i can get about 3x22fps with three encoders running at once. I tried mencoder with very simple settings from the manual, but i only got about 3x17fps. Are there encoders optimized working with avisynth? Would it help to convert the colorspace from yuy2 to yv12 in the avs-script or should i let the encoder do the work?

Maybe someone made the tests, i would have to do, before :)

regards
hanfrunz

smok3
21st April 2010, 13:54
i have used hcenc, i think yv12 must be done in script.

here is my ancient bat script - action part (loop is separated and avsgenerator as well);

@Echo off

echo.
echo ...............make avs...............

start /WAIT HCavsmaker %1

echo.
echo ...............HC022 encoding...............


:: hc ini file is hardcoded, change that for different encoding modes

"t:\utility\HC022\HCenc_022.exe" -i "%~n1_HC.avs" -o "%~n1.m2v" -ini "t:\utility\HC022\43_progresive.ini"


echo.
echo ...............vdub extract audio to pcm...............

echo VirtualDub.Open(VirtualDub.params[0]); > "%~n1_HC.avs.script"
echo VirtualDub.SaveWAV(VirtualDub.params[1]); >> "%~n1_HC.avs.script"
@vdub /i "%~n1_HC.avs.script" "%~n1_HC.avs" "%~n1_vdub.wav"

echo.
echo ...............encode audio to mp2 using twolame...............

twolame.exe -b 384 "%~n1_vdub.wav" "%~n1_vdub.mp2"

echo.
echo ...............muxing with mplex...............

mplex -f 8 -o "%~n1.mpg" "%~n1_vdub.mp2" "%~n1.m2v"

echo.
echo ...............deleting tmp files...............
@Echo on

del "%~n1_vdub.mp2"
:: only delete unmuxed video file if the muxed file exist
if exist "%~n1.mpg" (
del "%~n1.m2v"
)
del "%~n1_HC.avs.script"
del "%~n1_vdub.wav"
del "%~n1_HC.avs"

speed depends on whatever you have in the encoder ini file (i believe that with latest versions of hcenc there is actually no need for an ini, since you can stuff everything to the command line).

p.s. twolame and mplex steps are not usefull, if your next step is dvd authoring.