Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.
Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.
Source=ImageSource("C:\LossLess\images\%05d.png", start=1, end=15691, fps=23.976)
Source=ConvertToYV12(source, matrix="Rec709")
return source
# --> Source Opening <--
Source=ImageSource("C:\LossLess\images\%05d.png", start=1, end=15691, fps=24)
Source=ConvertToYV12(source, matrix="Rec709")
# --> Video Opening <--
video=Mpeg2Source("D:\...\MPEG2_24Mbps.d2v",idct=2)
# --> PSNR analysis <--
compareYV12(video,source,"YUV","OPSNR_MPEG2_24Mbps.log")
# --> Source Opening <--
Source=ImageSource("C:\LossLess\images\%05d.png", start=1, end=15691, fps=24)
Source=ConvertToYV12(source, matrix="Rec709")
# --> Video Opening <--
video=Mpeg2Source("D:\...\MPEG2_24Mbps.d2v",idct=2)
# --> SSIM analysis <--
return SSIM(source,video,"results.csv","SSIM_MPEG2_24Mbps.txt",lumimask=2)
|--------------|---------|---------|----------|---------|---------| | Codec | PProc | Bitrate | Size | OPSNR | SSIM 2 | |--------------|---------|---------|----------|---------|---------| | MPEG2 | No | 5999 | 479233 | 43.08 | 82.55 | | VC-1 | No | 5994 | 479405 | 44.15 | 85.85 | | H264 | No | 6007 | 479766 | 46.35 | 89.54 | |--------------|---------|---------|----------|---------|---------| | MPEG2 | No | 12001 | 958666 | 46.38 | 91.27 | | VC-1 | No | 11987 | 957575 | 47.30 | 92.25 | | H264 | No | 12008 | 959329 | 49.11 | 94.18 | |--------------|---------|---------|----------|---------|---------| | MPEG2 | No | 18002 | 1438146 | 47.17 | 93.26 | | VC-1 | No | 18005 | 1438379 | 49.00 | 94.60 | | H264 | No | 18009 | 1438862 | 50.53 | 95.74 | |--------------|---------|---------|----------|---------|---------| SSIM 0: Lumimask Off SSIM 1: Lumimask On (Original Lumimask) SSIM 2: Lumimask On (One2Tech Patch)
@echo off @REM ----------------------------------------------------------------------------------------------- @REM @REM 18Mbps MPEG2 Mencoder Profil @REM @REM ----------------------------------------------------------------------------------------------- @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM >> Output and Input files @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM Input file name set E_SRC=HDDVD-ntsc.avs @REM Output file name set E_VID=MPEG2_18Mbps.m2v @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM >> Rate control settings @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM Set of bitrates set E_BR=18000000 @REM Set of max bitrates (use 9800 max for DVD compliant stream) set VBV_MBR=28000 @REM Set of max buffer size (use 1835 max for DVD compliant stream) set VBV_MBS=9781 @REM Set of ratio initial buffer occupency (0.9 is good value) set VBV_IBO=0.9 @REM Set of first pass quantizer (2 is good value for high bitrate) set E_IQ=3 @REM Set of min quantizer (1 is good value for high bitrate) set E_MinQ=1 @REM Set of max quantizer (9 is good value for high bitrate) set E_MaxQ=31 @REM Set of quantizer variability [0.00;1.00] (0.75 is good value) set E_VQ=0.25 @REM Set of inter quantizer masking [0.00;1.00] (0.00-0.50 is good interval) set E_PMSK=0.10 @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM >> GOP structure @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM Set of max interval KFrame (use 15 for DVD PAL and 18 for DVD NTSC) set E_MIK=14 @REM Set of max BFrames [0;4] (use 2 max for DVD compliant stream) set E_MBF=2 @REM Set of Adaptative BFrames [0;2] (desactived is 0, fast is 1 and slow is 2) set E_ABF=2 @REM Set of Slow Adaptative BFrames Refine [0;10] (0 is full search, higher is faster) set E_SBF=1 @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM >> Motion estimation settings @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM Set of ME range [0;9999] (use 128 for DVD compliant stream) set E_RME=128 @REM Set of Rate Distortion Optimisation [0;2] (2 is the best) set E_RDO=2 @REM Set of diamond size [-99;6] (negatives values are adaptative diamond) set E_DIA=-4 @REM Set of comparison function for ME [0;2000] (0 is SAD, 1 is SSE, 2 is SADT, +256 for chroma ME) set E_CMP=2 @REM Set of previous ME [0;2] set E_PME=2 @REM Set of BFrame refinements [0;4] (Bframe Quality, 4 is best quality) set E_BFR=4 @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM >> VUI settings @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM Display Aspect Ratio (4/3 or 16/9 for DVD compliant stream) set E_DAR=16/9 @REM DC precision [8;10] set E_DC=8 @REM Framerate (use 25 for PAL and 24000/1001 or 30000/1001 for NTSC) set E_FPS=24000/1001 @REM Set intra matrix (use coef > 8 for DVD compliant stream with mencoder) set E_INTRA=8,16,16,16,17,18,21,24,16,16,16,16,17,19,22,25,16,16,17,18,20,22,25,29,16,16,18,21,24,27,31,36, 17,17,20,24,30,35,41,47,18,19,22,27,35,44,54,65,21,22,25,31,41,54,70,88,24,25,29,36,47,65,88,115 @REM Set inter matrix (use coef > 8 for DVD compliant stream with mencoder) set E_INTER=16,17,18,18,19,20,21,22,17,18,18,18,19,20,21,23,18,18,18,19,20,22,24,26,18,18,19,20,22,24,27,30, 19,19,20,22,25,28,32,37,20,20,22,24,28,34,40,46,21,21,24,27,32,40,48,58,22,23,26,30,37,46,58,76 @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @REM >> Mencoder CLI @REM >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ECHO.--------------------------------------------------------------- ECHO.First pass ... ECHO.--------------------------------------------------------------- @REM mencoder.exe -priority idle %E_SRC% -o NUL -ovc lavc -ofps %E_FPS% -passlogfile MPEG2_18Mbps.log -lavcopts vcodec=mpeg2video :vpass=1:vqscale=%E_IQ%:keyint=%E_MIK%:vqcomp=0.0:vmax_b_frames=%E_MBF%:vb_strategy=%E_ABF%:brd_scale=%E_SBF% :vb_qfactor=1.25:vb_qoffset=0.00:vi_qfactor=1.00:vi_qoffset=0.00:me_range=%E_RME%:preme=%E_PME%:dia=1:predia=1:mbd=%E_RDO% :precmp=0:cmp=0:subcmp=0:mv0:last_pred=0:dc=%E_DC%:psnr:aspect=%E_DAR%:inter_matrix=%E_INTER%:intra_matrix=%E_INTRA% :scplx_mask=%E_PMSK%:vqmin=%E_MinQ%:lmin=%E_MinQ%:mblmin=%E_MinQ%:vqmax=%E_MaxQ%:lmax=%E_MaxQ%:mblmax=%E_MaxQ% :vrc_strategy=0 -of rawvideo -ffourcc MPG2 @REM @CLS ECHO.--------------------------------------------------------------- ECHO.Second pass ... ECHO.--------------------------------------------------------------- @REM mencoder.exe -priority idle %E_SRC% -o NUL -ovc lavc -ofps %E_FPS% -passlogfile MPEG2_18Mbps.log -lavcopts vcodec=mpeg2video :vpass=3:vbitrate=%E_BR%:keyint=%E_MIK%:vqcomp=%E_VQ%:vmax_b_frames=%E_MBF%:vb_qfactor=1.25:vb_qoffset=0.00 :vi_qfactor=1.00:vi_qoffset=0.00:me_range=%E_RME%:preme=%E_PME%:dia=1:predia=1:mbd=%E_RDO%:precmp=0 :cmp=0:subcmp=0:mv0:last_pred=0:trell:cbp:qprd:dc=%E_DC%:psnr:aspect=%E_DAR%:inter_matrix=%E_INTER%:intra_matrix=%E_INTRA% :scplx_mask=%E_PMSK%:vqmin=%E_MinQ%:lmin=%E_MinQ%:mblmin=%E_MinQ%:vqmax=%E_MaxQ%:lmax=%E_MaxQ%:mblmax=%E_MaxQ% :vrc_strategy=0 -of rawvideo -ffourcc MPG2 @REM @CLS ECHO.--------------------------------------------------------------- ECHO.Last pass ... ECHO.--------------------------------------------------------------- mencoder.exe -priority idle %E_SRC% -o %E_VID% -ovc lavc -ofps %E_FPS% -passlogfile MPEG2_18Mbps.log -lavcopts vcodec=mpeg2video :vpass=2:vbitrate=%E_BR%:keyint=%E_MIK%:vqcomp=%E_VQ%:vmax_b_frames=%E_MBF%:bidir_refine=%E_BFR% :vb_qfactor=1.25:vb_qoffset=0.00:vi_qfactor=1.00:vi_qoffset=0.00:me_range=%E_RME%:preme=%E_PME%:dia=%E_DIA% :predia=%E_DIA%:mbd=%E_RDO%:precmp=%E_CMP%:cmp=%E_CMP%:subcmp=%E_CMP%:mv0 :last_pred=3:trell:cbp:qprd:dc=%E_DC%:psnr:aspect=%E_DAR%:inter_matrix=%E_INTER%:intra_matrix=%E_INTRA% :scplx_mask=%E_PMSK%:naq:vqmin=%E_MinQ%:lmin=%E_MinQ%:mblmin=%E_MinQ%:vqmax=%E_MaxQ% :lmax=%E_MaxQ%:mblmax=%E_MaxQ%:vrc_maxrate=%VBV_MBR%:vrc_buf_size=%VBV_MBS%:vrc_strategy=0 -of rawvideo -ffourcc MPG2 pause @REM Set intra matrix (use coef > 8 for DVD compliant stream with mencoder) set E_INTRA=8,8,8,8,9,10,11,12,8,8,8,8,9,11,11,13,8,8,9,9,10,12,14,15,8,8,9,10,12,14,16,18,9,9,10,12,15,17,20,23, 10,11,12,14,17,22,27,33,11,11,14,16,20,27,35,44,12,13,15,18,23,33,44,64 @REM Set inter matrix (use coef > 8 for DVD compliant stream with mencoder) set E_INTER=10,10,10,10,11,11,12,12,10,10,10,10,11,11,12,12,10,10,10,11,11,12,12,13,10,10,11,11,12,12,13,15, 11,11,11,12,13,14,15,17,11,11,12,12,14,16,18,22,12,12,12,13,15,18,23,27,12,12,13,15,17,22,27,34
|
|