Hello.
I am having difficulty trying to get ffmpeg to encode mpeg2 interlaced and would appreciate advice on how to do it.
No matter what I try, ffmpeg always treats the avisynth input as progressive and refuses to encode mpeg2 interlaced.
I had thought this on the ffmpeg commandline would force it:
-flags +ilme+ildct -top 1 -alternate_scan 1
As a test, I tried a native interlaced source file (not avisynth) and it re-encoded as interlaced OK.
My source is an mp4 720p 30fps - trying to convert to DVD, interlaced 576i (interlaced for "motion smoothness").
Commandline and output:
Avisynth "test_a.avs":Code:"C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\ffmpeg.exe" -v verbose -f avisynth -top 1 -i "test_a.avs" -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -vf "setdar=16/9" -f dvd -video_format pal -b:v 8999999 -target pal-dvd -flags +ilme+ildct -top 1 -alternate_scan 1 -g 15 -strict experimental -an -y "test_a.dvd.mpg" ffmpeg version git-2021-06-19-2cf95f2-Hydra3333/python_cross_compile_script_v100/3333 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.3.0 (GCC) configuration: --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git_3333.installed --disable-shared --enable-static --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100/3333 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --disable-fontconfig --disable-libfontconfig --disable-libfreetype --disable-libfribidi --disable-libbluray --disable-libcdio --enable-avisynth --enable-vapoursynth --disable-librtmp --disable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --disable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --disable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --disable-libmfx --disable-amf --disable-opencl --extra-libs='-lpsapi -liconv -lssp' --enable-nonfree --enable-libfdk-aac --disable-decklink --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --disable-frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --disable-libgme --disable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --disable-libmodplug --disable-schannel --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DLIBXML_STATIC --extra-cflags=-DGLIB_STATIC_COMPILATION --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git_3333.installed --disable-shared --enable-static libavutil 57. 0.100 / 57. 0.100 libavcodec 59. 1.102 / 59. 1.102 libavformat 59. 3.100 / 59. 3.100 libavdevice 59. 0.100 / 59. 0.100 libavfilter 8. 0.102 / 8. 0.102 libswscale 6. 0.100 / 6. 0.100 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100 Routing option strict to both codec and muxer layer Input #0, avisynth, from 'test_a.avs': Duration: 00:00:04.00, start: 0.000000, bitrate: 10 kb/s Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 720x576, 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native)) Press [q] to stop, [?] for help [graph 0 input from stream 0:0 @ 00000237d5f23e40] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 [scaler_out_0_0 @ 00000237d5f24280] w:720 h:576 flags:'bicubic' interl:0 [Parsed_setdar_0 @ 00000237d4578900] w:720 h:576 dar:5/4 sar:0/1 -> dar:16/9 sar:64/45 [scaler_out_0_0 @ 00000237d5f24280] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 h:576 fmt:yuv420p sar:64/45 flags:0x4 Output #0, dvd, to 'test_a.dvd.mpg': Metadata: encoder : Lavf59.3.100 Stream #0:0: Video: mpeg2video (Main), 1 reference frame, yuv420p(progressive), 720x576 (0x0) [SAR 64:45 DAR 16:9], q=2-31, 8999 kb/s, 25 fps, 90k tbn Metadata: encoder : Lavc59.1.102 mpeg2video Side data: cpb: bitrate max/min/avg: 9000000/0/8999999 buffer size: 1835008 vbv_delay: N/A No more output streams to write to, finishing.=00:00:00.00 bitrate=N/A speed= 0x frame= 100 fps=0.0 q=2.0 Lsize= 520kB time=00:00:03.92 bitrate=1086.7kbits/s speed=22.9x video:489kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.235934% Input file #0 (test_a.avs): Input stream #0:0 (video): 100 packets read (62208000 bytes); 100 frames decoded; Total: 100 packets (62208000 bytes) demuxed Output file #0 (test_a.dvd.mpg): Output stream #0:0 (video): 100 frames encoded; 100 packets muxed (501224 bytes); Total: 100 packets (501224 bytes) muxed [AVIOContext @ 00000237d5f1af40] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 00000237d5ec8500] Statistics: 5197 bytes read, 0 seeks
Code:LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DGDecodeNV.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DGDecode.dll") # no x32 LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\masktools2.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\mvtools2.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\fft3dfilter.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\dctfilter.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\RemoveDirt.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\RgTools.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\dfttest.dll") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Zs_RF_Shared.avsi") # SUPPORT functions for for QTGMC,srestore,YAHR etc etc Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\RemoveDirt.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\srestore.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\mt_xxpand_multi.avsi") # # input is 720p 30fps video = DGSource("G:\DVD\Ted-Funeral\2021.06.23-Funeral-TedJackson-ready.dgi",deinterlace=0).killaudio() video = video.trim(0,-100) # # make double-framerate PAL progressive 50p #video = JohnFPS(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) # # resize down to PAL SD (progressive) for DVD video = video.Spline36Resize(720,576) # # make interlaced PAL 576i #video = video.AssumeFrameBased().AssumeTFF().separatefields().selectevery(4,0,3).weave() # make TFF interlaced 25fps, i.e. TFF 576i, for motion smoothness (could have converted to 576p instead but more jerky) video = video.AssumeFrameBased().AssumeTFF().AssumeFPS(25) # test just do assumes ... yields same result through, ffmpeg does not encode interlaced # video #--------------------------------------------------------------------------------------------------------------- # change FPS like # JohnFPS(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) Function JohnFPS(clip c,Val "num", int "den",int "Sharp",int "rFilter",Int "BlkSize",int "Search",int "dct",Float "ml",Int "Mask",Bool "Blend") { /* https://forum.doom9.org/showthread.php?p=1847109#post1847109 Motion Protected FPS converter script by JohnMeyer from Doom9 Slightly modified interface by Manolito, and a smidgen more by ssS. Requires MVTools V2 and RemoveGrain Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0 Specify FrameRate using num (Numerator) and den (Denominator) num only, eg num=25.0, FrameRate = 25.0 FPS num & den, eg num=24000 den=1001, FrameRate = 23.976 FPS (Both should be type Int). neither specified FrameRate = Double input framerate. */ def = num.Defined ? (den.Defined ?1:0) : (!den.Defined) ? 2 : -1 # 0=NumOnlyDef, 1=BothDef, 2=NoneDef, -1=DenOnlyError Assert(0<=def,"JohnFPS: Cannot specify framerate using den only") # Rate=num : Rate=num/den : Rate=DoubleRate n=(def==0) ? Round(num * 1000): (def==1) ? Int(num) : 2*c.FrameRateNumerator d=(def==0) ? 1000 : (def==1) ? den : c.FrameRateDenominator Sharp = Default(Sharp,1) # MSuper default = 2 rFilter= Default(rFilter,4) # MSuper default = 2 BlkSize= Default(BlkSize,8) # Manalyse default 8, Maybe 32 for HD # h3333 down to default 8 from 16 Search = Default(Search,3) # Manalyse default 4 dct = Default(dct,0) # Manalyse default 0, 1=Slow ml = Default(ml,200.0) # MFlowFps default 100.0 Mask = Default(Mask,2) # MFlowFps default 2 Blend = Default(Blend,False) # MFlowFps default True prefilt = c.RemoveGrain(22) super = c.MSuper(hpad=16,vpad=16,levels=1,sharp=Sharp,rfilter=rFilter) # One level is enough for MRecalculate #super = c.MSuper(hpad=16,vpad=16,sharp=Sharp,rfilter=rFilter) # h3333, All levels for MRecalculate, just to see superfilt= prefilt.MSuper(hpad=16,vpad=16,sharp=Sharp,rfilter=rFilter) # All levels for MAnalyse bv = superfilt.MAnalyse(isb=true ,blksize=BlkSize,overlap=4,search=Search,dct=dct) fv = superfilt.MAnalyse(isb=false,blksize=BlkSize,overlap=4,search=Search,dct=dct) bv = super.MRecalculate(bv,blksize=BlkSize/2,overlap=2,thSAD=100) fv = super.MRecalculate(fv,blksize=BlkSize/2,overlap=2,thSAD=100) return c.MFlowFps( super,bv,fv,num=n,den=d,blend=Blend,ml=ml,mask=Mask) }
+ Reply to Thread
Results 1 to 20 of 20
-
-
I don't know what your source looks like but motion interpolation often doesn't work well.
The output of your AVS script is progressive, 25p. The output of your ffmpeg encoding is interlaced, 25i, but the frames are progressive. So you won't have smooth video. You've commented out the parts of the code that convert 30p to 50p and then interlace 50p to 25i.Last edited by jagabo; 24th Jun 2021 at 19:45.
-
Thank you. OK. It's a funeral, fairly static. I am open to other methods of 720p30 -> 576i25 and would value your expertise in that.
OK.
I have HCEnc, however avisynth is not "installed" (no registry keys and nothing copied into system folders, ffmpeg works if in the same folder as avisynth.dll), however I have not been able to get HCEnc to work in the same way, hence use of ffmpeg.
Looks like I may have to install avisynth to use HCEnc I guess.Last edited by hydra3333; 24th Jun 2021 at 19:44.
-
yes that is so. Use this one
https://www.videohelp.com/download/AviSynthPlus_3.7.0_20210111_vcredist.exe -
Thank you. I just tried again before I saw your post.
Using AVISynth-Universal-Installer (edited to not install registry keys or copy files into system folders) https://forum.doom9.org/showthread.php?t=172124 item 9 (Avisynth+ x86) if I pop HCEnc into the same folder as that avisynth.dll and run the gui, it says "Warning, Avisynth not installed" ... HOWEVER, if I press on, by loading a .ini and an avs script, it all loads and works fine (saying "Avisynth.dll loaded. Avisynth successfully initialized.") after all providing that I find and use all x86 filters. -
-
-
Ah, ok took another look at your post.
Yes I commented them out just to test, since the ffmpeg log for the Output kept saying yuv420p(progressive).
I changed the script back to look like
Code:# input is 720p 30fps video = DGSource("G:\DVD\Ted-Funeral\2021.06.23-Funeral-TedJackson-ready.dgi",deinterlace=0).killaudio() video = video.trim(0,-100) # # make double-framerate PAL progressive 50p video = JohnFPS(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) # # resize down to PAL SD (progressive) for DVD video = video.Spline36Resize(720,576) # # make interlaced PAL 576i video = video.AssumeFrameBased().AssumeTFF().separatefields().selectevery(4,0,3).weave() # make TFF interlaced 25fps, i.e. TFF 576i, for motion smoothness (could have converted to 576p instead but more jerky) video = video.AssumeTFF().AssumeFPS(25) # test just do assumes ... same result through, ffmpeg does not encode interlaced # video
Code:"C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\ffmpeg.exe" -v verbose -f avisynth -top 1 -i "test_a.avs" -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -vf "setdar=16/9" -f dvd -video_format pal -b:v 8999999 -target pal-dvd -flags +ilme+ildct -top 1 -alternate_scan 1 -g 15 -strict experimental -an -y "test_a.dvd.mpg" ffmpeg version git-2021-06-19-2cf95f2-Hydra3333/python_cross_compile_script_v100/3333 Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.3.0 (GCC) configuration: --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git_3333.installed --disable-shared --enable-static --arch=x86_64 --target-os=mingw64 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static --disable-shared --enable-static --disable-w32threads --enable-pthreads --enable-cross-compile --target-exec=wine --enable-runtime-cpudetect --enable-gpl --enable-version3 --extra-version=Hydra3333/python_cross_compile_script_v100/3333 --enable-pic --enable-bzlib --enable-zlib --enable-lzma --disable-fontconfig --disable-libfontconfig --disable-libfreetype --disable-libfribidi --disable-libbluray --disable-libcdio --enable-avisynth --enable-vapoursynth --disable-librtmp --disable-libcaca --enable-iconv --enable-libxml2 --enable-gmp --enable-gnutls --enable-libzimg --enable-libx264 --enable-libx265 --enable-libvpx --enable-libdav1d --disable-libaom --enable-libxvid --enable-gray --enable-libopus --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libspeex --enable-libsoxr --enable-librubberband --disable-libass --enable-libwebp --enable-ffnvcodec --enable-cuvid --enable-cuda-llvm --disable-opengl --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --disable-libmfx --disable-amf --disable-opencl --extra-libs='-lpsapi -liconv -lssp' --enable-nonfree --enable-libfdk-aac --disable-decklink --enable-libtwolame --enable-libzvbi --enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-libsnappy --disable-frei0r --enable-libsrt --enable-libbs2b --enable-libilbc --disable-libgme --disable-libflite --enable-sdl2 --enable-libopenmpt --enable-libmysofa --enable-libvidstab --disable-libmodplug --disable-schannel --extra-cflags=-DLIBTWOLAME_STATIC --extra-cflags=-DMODPLUG_STATIC --extra-cflags=-DLIBXML_STATIC --extra-cflags=-DGLIB_STATIC_COMPILATION --prefix=/home/u/Desktop/_working/workdir/win64_output/ffmpeg_git_3333.installed --disable-shared --enable-static libavutil 57. 0.100 / 57. 0.100 libavcodec 59. 1.102 / 59. 1.102 libavformat 59. 3.100 / 59. 3.100 libavdevice 59. 0.100 / 59. 0.100 libavfilter 8. 0.102 / 8. 0.102 libswscale 6. 0.100 / 6. 0.100 libswresample 4. 0.100 / 4. 0.100 libpostproc 56. 0.100 / 56. 0.100 Routing option strict to both codec and muxer layer Input #0, avisynth, from 'test_a.avs': Duration: 00:00:04.00, start: 0.000000, bitrate: 10 kb/s Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 720x576, 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native)) Press [q] to stop, [?] for help [graph 0 input from stream 0:0 @ 0000028c5ba33e40] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 [scaler_out_0_0 @ 0000028c5ba34280] w:720 h:576 flags:'bicubic' interl:0 [Parsed_setdar_0 @ 0000028c59d88900] w:720 h:576 dar:5/4 sar:0/1 -> dar:16/9 sar:64/45 [scaler_out_0_0 @ 0000028c5ba34280] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 h:576 fmt:yuv420p sar:64/45 flags:0x4 Output #0, dvd, to 'test_a.dvd.mpg': Metadata: encoder : Lavf59.3.100 Stream #0:0: Video: mpeg2video (Main), 1 reference frame, yuv420p(progressive), 720x576 (0x0) [SAR 64:45 DAR 16:9], q=2-31, 8999 kb/s, 25 fps, 90k tbn Metadata: encoder : Lavc59.1.102 mpeg2video Side data: cpb: bitrate max/min/avg: 9000000/0/8999999 buffer size: 1835008 vbv_delay: N/A No more output streams to write to, finishing.=00:00:00.00 bitrate=N/A speed= 0x frame= 100 fps=0.0 q=2.0 Lsize= 520kB time=00:00:03.92 bitrate=1086.7kbits/s speed=14.5x video:489kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 6.235934% Input file #0 (test_a.avs): Input stream #0:0 (video): 100 packets read (62208000 bytes); 100 frames decoded; Total: 100 packets (62208000 bytes) demuxed Output file #0 (test_a.dvd.mpg): Output stream #0:0 (video): 100 frames encoded; 100 packets muxed (501224 bytes); Total: 100 packets (501224 bytes) muxed [AVIOContext @ 0000028c5ba2af40] Statistics: 0 seeks, 3 writeouts [AVIOContext @ 0000028c5b9d8500] Statistics: 5197 bytes read, 0 seeks
-
OK, thanks. Having multiple versions of AviSynth (I usually use x64, or vapoursynth) available seemed easier with AVISynth-Universal-Installer, as I try not to used Admin priv or to install stuff where I can avoid it.
I wonder if I missed seeing an x64 version of HCEnc ? -
I don't believe there is a 64 bit version of HCenc. One of the good things about Avisynth Plus, 32 and 64 bit environments enabled
-
It's working fine for me with (essentially) your AVS script and ffmpeg command line.
Code:# # input is 720p 30fps video = LWlibavVideoSource("source.mkv").Info() # # make double-framerate PAL progressive 50p video = JohnFPS(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) # # resize down to PAL SD (progressive) for DVD video = video.Spline36Resize(720,576) # # make interlaced PAL 576i video = video.AssumeFrameBased().AssumeTFF().separatefields().selectevery(4,0,3).weave() # make TFF interlaced 25fps, i.e. TFF 576i, for motion smoothness (could have converted to 576p instead but more jerky) #video = video.AssumeFrameBased().AssumeTFF().AssumeFPS(25) # test just do assumes ... yields same result through, ffmpeg does not encode interlaced # return(video) #--------------------------------------------------------------------------------------------------------------- # change FPS like # JohnFPS(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) Function JohnFPS(clip c,Val "num", int "den",int "Sharp",int "rFilter",Int "BlkSize",int "Search",int "dct",Float "ml",Int "Mask",Bool "Blend") { /* https://forum.doom9.org/showthread.php?p=1847109#post1847109 Motion Protected FPS converter script by JohnMeyer from Doom9 Slightly modified interface by Manolito, and a smidgen more by ssS. Requires MVTools V2 and RemoveGrain Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0 Specify FrameRate using num (Numerator) and den (Denominator) num only, eg num=25.0, FrameRate = 25.0 FPS num & den, eg num=24000 den=1001, FrameRate = 23.976 FPS (Both should be type Int). neither specified FrameRate = Double input framerate. */ def = num.Defined ? (den.Defined ?1:0) : (!den.Defined) ? 2 : -1 # 0=NumOnlyDef, 1=BothDef, 2=NoneDef, -1=DenOnlyError Assert(0<=def,"JohnFPS: Cannot specify framerate using den only") # Rate=num : Rate=num/den : Rate=DoubleRate n=(def==0) ? Round(num * 1000): (def==1) ? Int(num) : 2*c.FrameRateNumerator d=(def==0) ? 1000 : (def==1) ? den : c.FrameRateDenominator Sharp = Default(Sharp,1) # MSuper default = 2 rFilter= Default(rFilter,4) # MSuper default = 2 BlkSize= Default(BlkSize,8) # Manalyse default 8, Maybe 32 for HD # h3333 down to default 8 from 16 Search = Default(Search,3) # Manalyse default 4 dct = Default(dct,0) # Manalyse default 0, 1=Slow ml = Default(ml,200.0) # MFlowFps default 100.0 Mask = Default(Mask,2) # MFlowFps default 2 Blend = Default(Blend,False) # MFlowFps default True prefilt = c.RemoveGrain(22) super = c.MSuper(hpad=16,vpad=16,levels=1,sharp=Sharp,rfilter=rFilter) # One level is enough for MRecalculate #super = c.MSuper(hpad=16,vpad=16,sharp=Sharp,rfilter=rFilter) # h3333, All levels for MRecalculate, just to see superfilt= prefilt.MSuper(hpad=16,vpad=16,sharp=Sharp,rfilter=rFilter) # All levels for MAnalyse bv = superfilt.MAnalyse(isb=true ,blksize=BlkSize,overlap=4,search=Search,dct=dct) fv = superfilt.MAnalyse(isb=false,blksize=BlkSize,overlap=4,search=Search,dct=dct) bv = super.MRecalculate(bv,blksize=BlkSize/2,overlap=2,thSAD=100) fv = super.MRecalculate(fv,blksize=BlkSize/2,overlap=2,thSAD=100) return c.MFlowFps( super,bv,fv,num=n,den=d,blend=Blend,ml=ml,mask=Mask) }
Code:ffmpeg.exe -v verbose -f avisynth -top 1 -i "test.avs" -sws_flags lanczos+accurate_rnd+full_chroma_int+full_chroma_inp -vf "setdar=16/9" -f dvd -video_format pal -b:v 8999999 -target pal-dvd -flags +ilme+ildct -top 1 -alternate_scan 1 -g 15 -strict experimental -an -y "test_a.dvd.mpg"
-
Well blow me down and tickle me pink with a feather duster.
I'll replicate your post exactly on this PC and try again.
Thank you very much. -
You are a saint
A CKI issue by the looks. You pointed it out before and I did not understand it.
ffmpeg reports "yuv420p(progressive)" below, which to me is misleading.
Code:Routing option strict to both codec and muxer layer Input #0, avisynth, from 'test_a.avs': Duration: 00:00:30.00, start: 0.000000, bitrate: 1 kb/s Stream #0:0: Video: rawvideo, 1 reference frame (I420 / 0x30323449), yuv420p, 720x576, 25 fps, 25 tbr, 25 tbn Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg2video (native)) Press [q] to stop, [?] for help [graph 0 input from stream 0:0 @ 000001cf03097e40] w:720 h:576 pixfmt:yuv420p tb:1/25 fr:25/1 sar:0/1 [scaler_out_0_0 @ 000001cf03098280] w:720 h:576 flags:'bicubic' interl:0 [Parsed_setdar_0 @ 000001cf016f8840] w:720 h:576 dar:5/4 sar:0/1 -> dar:16/9 sar:64/45 [scaler_out_0_0 @ 000001cf03098280] w:720 h:576 fmt:yuv420p sar:64/45 -> w:720 h:576 fmt:yuv420p sar:64/45 flags:0x4 Output #0, dvd, to 'test_a.dvd.mpg': Metadata: encoder : Lavf59.3.100 Stream #0:0: Video: mpeg2video (Main), 1 reference frame, yuv420p(progressive), 720x576 (0x0) [SAR 64:45 DAR 16:9], q=2-31, 8999 kb/s, 25 fps, 90k tbn Metadata: encoder : Lavc59.1.102 mpeg2video Side data: cpb: bitrate max/min/avg: 9000000/0/8999999 buffer size: 1835008 vbv_delay: N/A
-
That makes sense (now you have pointed it out).
I'm happy enough with the output from this process
The script I ended up with for 720p30 -> 576i25 for PAL DVD :
Code:SetMemoryMax(4096) # 4096 8192 16834 #SetWorkingDir("D:\TEMP") # his is primarily for easy loading of source clips, importing scripts, etc. SetLogParams("G:\DVD\Ted-Funeral\2021.06.23-Funeral-TedJackson-ready.dgi.debug.log", LOG_INFO) LogMsg(Time("%Y-%m-%d %I:%M:%S %p, %z") + ": Start of debug logging", LOG_INFO) # #--------------------------------------------------------------------------------------------------------------- LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DGDecodeNV.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DGDecode.dll") # no x32 # LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\masktools2.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\mvtools2.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\CNR2_x64.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\ColorMatrix64.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\fft3dfilter.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\dctfilter.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Deblock-x64.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\SmoothAdjust.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Deflicker.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\AutoLevels_x64.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\AutoAdjust.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DePan.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DeSpot64.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DeScratch64.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\DePanEstimate") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\RemoveDirt.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\RgTools.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\warpsharp.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\aWarpsharpMT.dll") # awarpsharp2 LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\aSharp.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Average.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\grunt.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\nnedi3.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\EEDI2.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\eedi3.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\AddGrainC.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\dfttest.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\neo-dfttest.dll") # see https://github.com/HomeOfAviSynthPlusEvolution/neo_DFTTest/issues/2 LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\neo-fft3d.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\MedianBlur2.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\ColorYUV2.dll") # not quite the latest, but is x64 LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\TCannyMod.dll") LoadPlugin("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\vsLGhost.dll") # Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Zs_RF_Shared.avsi") # SUPPORT functions for for QTGMC,srestore,YAHR etc etc Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Deblock_QED_MT2Mod.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\ChromaShiftSP.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\FixChromaBleedingMod.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\RemoveDirt.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\srestore.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Spotless-1.07Beta.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\QTGMC.avsi") #Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\MinBlur.avsi") # a BIGGER miniblur already in Zs_RF_Shared ?? Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\YAHR-YAHR2.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\Dehalo_alpha_MT2.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\FineDehalo.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\mt_xxpand_multi.avsi") #Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\QTGMC_3.382_hacked_dfttest.avsi") Import("C:\SOFTWARE\AVISynth\AvisynthRepository\AVSPLUS370_x64\plugins-to-choose-from\YLevels_mt.avsi") # from realfinder github # video = DGSource("G:\DVD\Ted-Funeral\2021.06.23-Funeral-TedJackson-ready.dgi",deinterlace=0).killaudio() # # change to SD colour ??? video = video.ColorMatrix(mode="Rec.709->Rec.601",clamp=0) # no interlaced handling needed # # light denoise the progressive 720p clip #video = process_MDegrain1(video, blksize=8, overlap=4, dct=0, thSAD=250, thSADC=250, plane=4) #video = process_MDegrain2(video, blksize=8, overlap=4, dct=0, thSAD=250, thSADC=250, plane=4) video = process_MDegrain3(video, blksize=8, overlap=4, dct=0, thSAD=100, thSADC=100, plane=4) # # make double-framerate PAL progressive 50p video = JohnFPS_h3333(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) # # resize down to PAL SD (progressive) for DVD video = video.Spline36Resize(720,576) # # make interlaced PAL 576i video = video.AssumeFrameBased().AssumeTFF().separatefields().selectevery(4,0,3).weave() # processed_video = video # #global global_string_for_scriptclip_only_1 = "Processed " #processed_video = processed_video.ScriptClip("subtitle(global_string_for_scriptclip_only_1 + string(current_frame),size=20)").Info() # processed_video # #--------------------------------------------------------------------------------------------------------------- #--------------------------------------------------------------------------------------------------------------- # change FPS like # JohnFPS_h3333(video, num=50, den=1, Sharp=1, rFilter=4, BlkSize=8, Search=3, dct=0, ml=200.0, Mask=2, Blend=False) Function JohnFPS_h3333(clip c,Val "num", int "den",int "Sharp",int "rFilter",Int "BlkSize",int "Search",int "dct",Float "ml",Int "Mask",Bool "Blend") { /* https://forum.doom9.org/showthread.php?p=1847109#post1847109 Motion Protected FPS converter script by JohnMeyer from Doom9 Slightly modified interface by Manolito, and a smidgen more by ssS. Requires MVTools V2 and RemoveGrain Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0 Specify FrameRate using num (Numerator) and den (Denominator) num only, eg num=25.0, FrameRate = 25.0 FPS num & den, eg num=24000 den=1001, FrameRate = 23.976 FPS (Both should be type Int). neither specified FrameRate = Double input framerate. */ def = num.Defined ? (den.Defined ?1:0) : (!den.Defined) ? 2 : -1 # 0=NumOnlyDef, 1=BothDef, 2=NoneDef, -1=DenOnlyError Assert(0<=def,"JohnFPS: Cannot specify framerate using den only") # Rate=num : Rate=num/den : Rate=DoubleRate n=(def==0) ? Round(num * 1000): (def==1) ? Int(num) : 2*c.FrameRateNumerator d=(def==0) ? 1000 : (def==1) ? den : c.FrameRateDenominator Sharp = Default(Sharp,1) # MSuper default = 2 rFilter= Default(rFilter,4) # MSuper default = 2 BlkSize= Default(BlkSize,8) # Manalyse default 8, Maybe 32 for HD # h3333 down to default 8 from 16 Search = Default(Search,3) # Manalyse default 4 dct = Default(dct,0) # Manalyse default 0, 1=Slow ml = Default(ml,200.0) # MFlowFps default 100.0 Mask = Default(Mask,2) # MFlowFps default 2 Blend = Default(Blend,False) # MFlowFps default True prefilt = c.RemoveGrain(22) #super = c.MSuper(hpad=16,vpad=16,levels=1,sharp=Sharp,rfilter=rFilter) # One level is enough for MRecalculate ... commented out h3333 super = c.MSuper(hpad=16,vpad=16,sharp=Sharp,rfilter=rFilter) # h3333, All levels for MRecalculate, just to see superfilt= prefilt.MSuper(hpad=16,vpad=16,sharp=Sharp,rfilter=rFilter) # All levels for MAnalyse bv = superfilt.MAnalyse(isb=true ,blksize=BlkSize,overlap=4,search=Search,dct=dct) fv = superfilt.MAnalyse(isb=false,blksize=BlkSize,overlap=4,search=Search,dct=dct) bv = super.MRecalculate(bv,blksize=BlkSize/2,overlap=2,thSAD=100) fv = super.MRecalculate(fv,blksize=BlkSize/2,overlap=2,thSAD=100) return c.MFlowFps( super,bv,fv,num=n,den=d,blend=Blend,ml=ml,mask=Mask) } # DeGraining WITHOUT pre-filtered clip - Progressive clip (non-Interlace handling) version function do_MDegrain1i2(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) fields=source.SeparateFields() # separate by fields super = fields.MSuper(pel=2,chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct) return fields.MDegrain1(super, backward_vec2,forward_vec2,thSAD=400,plane=plane).Weave() } function do_MDegrain2i2(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) fields=source.SeparateFields() # separate by fields super = fields.MSuper(pel=2,chroma=True) backward_vec4 = super.MAnalyse(isb = True, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec4 = super.MAnalyse(isb = False, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) return fields.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=thSAD,plane=plane).Weave() } function do_MDegrain3i2(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) fields=source.SeparateFields() # separate by fields super = fields.MSuper(pel=2,chroma=True) backward_vec6 = super.MAnalyse(isb = True, delta = 6, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec4 = super.MAnalyse(isb = True, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec4 = super.MAnalyse(isb = False, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec6 = super.MAnalyse(isb = False, delta = 6, blksize=blksize, overlap=overlap, dct=dct, chroma=True) return fields.MDegrain3(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,backward_vec6,forward_vec6,thSAD=thSAD,plane=plane).Weave() } # # 2. DeGraining WITHOUT pre-filtered clip - Progressive clip (non-Interlace handling) version function process_MDegrain1_fields_already_separated(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "thSADC", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) super = source.MSuper(pel=2,chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct) return source.MDegrain1(super, backward_vec2,forward_vec2,thSAD=thSAD,thSADC=thSADC,plane=plane) } function process_MDegrain2_fields_already_separated(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "thSADC", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) super = source.MSuper(pel=2,chroma=True) backward_vec4 = super.MAnalyse(isb = True, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec4 = super.MAnalyse(isb = False, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) return source.MDegrain2(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,thSAD=thSAD,thSADC=thSADC,plane=plane) } function process_MDegrain3_fields_already_separated(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "thSADC", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) super = source.MSuper(pel=2,chroma=True) backward_vec6 = super.MAnalyse(isb = True, delta = 6, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec4 = super.MAnalyse(isb = True, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec4 = super.MAnalyse(isb = False, delta = 4, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec6 = super.MAnalyse(isb = False, delta = 6, blksize=blksize, overlap=overlap, dct=dct, chroma=True) return source.MDegrain3(super, backward_vec2,forward_vec2,backward_vec4,forward_vec4,backward_vec6,forward_vec6,thSAD=thSAD,thSADC=thSADC,plane=plane) } # function process_MDegrain1(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "thSADC", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) super = source.MSuper(pel=2,chroma=True) backward_vec1 = super.MAnalyse(isb = True, delta = 1, blksize=blksize, overlap=overlap, dct=dct) forward_vec1 = super.MAnalyse(isb = False, delta = 1, blksize=blksize, overlap=overlap, dct=dct) return source.MDegrain1(super, backward_vec1,forward_vec1,thSAD=thSAD,thSADC=thSADC,plane=plane) } function process_MDegrain2(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "thSADC", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) super = source.MSuper(pel=2,chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec1 = super.MAnalyse(isb = True, delta = 1, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec1 = super.MAnalyse(isb = False, delta = 1, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) return source.MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=thSAD,thSADC=thSADC,plane=plane) } function process_MDegrain3(clip "source", int "blksize", int "overlap", int "dct", int "thSAD", int "thSADC", int "plane") { blksize=default(blksize,8) # overlap=default(overlap,4) # overlap value (0 to 4 for blksize=8) dct=default(dct,0) # use dct=1 for clip with light flicker thSAD=default(thSAD,400) plane=default(plane,4) super = source.MSuper(pel=2,chroma=True) backward_vec3 = super.MAnalyse(isb = True, delta = 3, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec2 = super.MAnalyse(isb = True, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) backward_vec1 = super.MAnalyse(isb = True, delta = 1, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec1 = super.MAnalyse(isb = False, delta = 1, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec2 = super.MAnalyse(isb = False, delta = 2, blksize=blksize, overlap=overlap, dct=dct, chroma=True) forward_vec3 = super.MAnalyse(isb = False, delta = 3, blksize=blksize, overlap=overlap, dct=dct, chroma=True) return source.MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=thSAD,thSADC=thSADC,plane=plane) }
Last edited by hydra3333; 28th Jun 2021 at 06:00. Reason: trivia
Similar Threads
-
FFMPEG Not Flagging Interlaced Video Properly
By ENunn in forum Video ConversionReplies: 3Last Post: 21st Jan 2021, 12:28 -
How to pipe interlaced content from mencoder to ffmpeg?
By Selur in forum Newbie / General discussionsReplies: 1Last Post: 2nd Dec 2020, 02:15 -
FFMPEG Interlaced MPEG2 video to x264 Issue
By Rizoko in forum Video ConversionReplies: 20Last Post: 16th May 2020, 22:39 -
ffmpeg changes interlaced to progressive
By SF01 in forum Video ConversionReplies: 12Last Post: 30th Mar 2020, 09:51 -
Encode x264 Interlaced from VirtualDub
By skatingrocker17 in forum Video ConversionReplies: 1Last Post: 17th Jun 2018, 15:43