+ Reply to Thread
Results 61 to 77 of 77
-
Could you please elaborate I am not able to understand what you are trying to say.
Or could you please help me out to resolve my concern? -
In the first picture you can see comb artifacts:
[Attachment 73973 - Click to enlarge]
(enlarged 4x so you can more easily see the combing). Those are always seen when there is motion in interlaced video. I chose a part of the image where they were most visible -- but they are visible in many parts of the picture.
In the second image there is a huge loss of detail, lots of blocky artifacts, and bad color splotches:
[Attachment 73974 - Click to enlarge]
(again enlarged 4x) It may be that you just chose a bad frame to upload. But there are no comb artifacts like those in the first image. So the video has been successfully deinterlaced with QTGMC. The other artifacts weren't caused by QTGMC. And if you look at the frame rate it has doubled after QTGMC. -
I have that same video on my PC. It's not good quality, there's a lot of noise and blocking in various places.
qtgmc as coded is accentuating it.
Here it is, I remuxed into mpeg PS
https://www.mediafire.com/file/w0rzv3ae0bdd66l/McCartney-MPEG2_1080-interlaced_sample.mpg/file -
Attached what QTGMC + BasicVSR++ does with that through Vapoursynth (used script),... but at ~1fps on a GeForce 4080 this might be not something really practical.
Last edited by Selur; 23rd Sep 2023 at 08:11.
users currently on my ignore list: deadrats, Stears555, marcorocchini -
As the latest package is from 27-12-2022, I was wondering if there would be a benefit to bring an updated version or there was no real change and this package is still up to the task?
-
Hi !
I made an update of this package on September the 29th but did not had time to upload it.
The main Changes were on Avisynth+ (version 3.7.3), FFMS2 plugin (version 5.0) and FFMPEG (Version 7.02).
I'll try to update it soon.
I don't know if this package has success as it is still very rudimentary and not polished as Hybrid.
Best regardsLast edited by Hunk91; 9th Jan 2025 at 14:33.
-
-
New version available : FFmpeg-QTGMC Easy 2025.01.11
v2025.01.11
===========
In this version, all the plugins, scripts and softwares are updated to their last versions available on 2025.01.11.
LSMAHSource was added as well as all Avisynth's original plugins for more versatility and flexibility
List of all the plugings , scripts and softwares :
- FFmpegSource v5.0 plugin : http://avisynth.nl/index.php/FFMS2
- LSMASHSource v20240408 1194.0.0.0 : http://avisynth.nl/index.php/LSMASHSource
- MaskTools2 v2.2.30 plugin : http://avisynth.nl/index.php/Masktools2
- Rgtools v1.2 plugin : http://avisynth.nl/index.php/RgTools
- MVTools2 v2.7.46 with depans v20240503 plugin : http://avisynth.nl/index.php/MVTools (depans.Dll and DepansEstimate.Dll have been added to the package but may not be needed as only mvtools2.dll is called)
- Nnedi3 v0.9.4.63 Plugin : http://avisynth.nl/index.php/Nnedi3
- Yadifmod2 v0.2.8 Plugin : http://avisynth.nl/index.php/Yadifmod2
- FFT3DFilter v2.10 Plugin : http://avisynth.nl/index.php/FFT3DFilter
- LoadDLL v1.0 Plugin : http://avisynth.nl/index.php/LoadDLL
- Zs_RF_Shared v1.161 script : http://avisynth.nl/index.php/Zs_RF_Shared
- QTGMC v3.384s script : http://avisynth.nl/index.php/QTGMC
- DevIL v0.1.7.8 Dll
- libfftw3f-3.dll (fftw v3.3.5) : https://www.fftw.org/
- AviSynth+ 3.7.3(r4003) 64 bits : https://avs-plus.net/
- FFmpeg 7.1-full_build-www.gyan.dev 2024-09-30 : https://www.gyan.dev/ffmpeg/builds/Last edited by Hunk91; 11th Jan 2025 at 10:27.
-
Hi Hunk91, please can you help a cat thanks?
I like to use your package to apply QTGMC to a file MXF 50P (50fps progressive) this:
https://www.swisstransfer.com/d/e2dda6f1-945a-4785-87ac-6399077c1f3f
I have download FFmpeg-QTGMC Easy 2025.01.11.zip and decompress in a folder, and now what I have do to? thanks -
In case you didn't find an answer yet:
You need to run FFMPEG and call the "qtgmc.avs" file from the zip with your custom parameters.
For example, I would use this FFMPEG command:
.\ffmpeg -i "D:\QTGMC2025\qtgmc.avs" -c:v libx264 -preset veryslow -crf 0 -c:a copy -aspect 4:3 "D:\output.mkv" -
Hi Hunk91
I find your combo practical for the intermediary deinterlacing step w QTGMC. Using v2025.01.11
Easy to run. However in my case it does not interpret field order correctly - the output file is 'jumping' forth and back when played frame by frame.
I am capturing old Video 8 tapes with VirtualDub2. Video 8 is supposed TFF (vs miniDV BFF).
How to explicitly define Input type as TFF (or any other) ? Reading through scripts I could not find the answer.
Thank you fou your answer. -
Hi Milau,
I think you should add after ConvertToYV12(interlaced=true) this line:
Best regardsAssumeTFF() -
Analog video is neither TFF nor BFF. It's simply an alternating sequence of top and bottom fields -- it has no frames. It's the capture device, driver, or software that determines field order of the digital frames. If it starts capturing with a top field, then adds the next field (a bottom field) to produce a frame, the frames are TFF. If it starts capturing with a bottom field then adds the next field (a top field) to produce s frame, the frames are BFF.
As noted, the AVI container has no field order flag so it's up to you to keep track of the field order and specify it while processing. Use AssumeTFF() or AssumeBFF() to do so in AviSynth. AviSynth assumes bff by default if there is no field order flag in the source.Last edited by jagabo; 27th Oct 2025 at 16:46.
-
Thank you Hunk91 for your suggestion - now it works as it should. Thanks to jagabo for clarification.
I need to look other aspects because my 25 FPS PAL is coming out as 49.198 FPS and audio is getting out of sync more and more with video duration... -
I think you may have drop or duplicate frames.
Just try to open the video file with FFMpeg2Source and then check on virtualdub the frame rate. If there are drop or duplicate frames you should read 24.599 fps not 25fps.
You can also try to add AssumeFPS(25) after AssumeTFF to force the frame rate to 25 fps and see if it is better or not.Last edited by Hunk91; 28th Oct 2025 at 14:15.
-
I have always wanted to use QTGMC for higher quality DVDRips but the 'easy' solutions I'd found in the past were either really buggy or simply didn't work and I never wanted to dive-in to researching how to set up and use it the 'real' way (remember setting up avisynth for CinemaCraft MPEG2 Encoder on Win98 back-in-the-day). I finally decided to do just that for a DVDRip project I've got going and I came across FFmpeg-QTGMC Easy 2025.01.11 last weekend. Unlike other solutions I've tried this one works great and the videos look wonderful, but the lack of any user interface makes it difficult to use, so I've whipped up a fancy drop-in batch file that makes it super easy. Snag the archive below and extract it to the FFmpeg-QTGMC Easy folder. Then just drag/drop/copy/paste files or folders onto ezQTGMC.cmd. I think I have all the hiccups worked out as it's been working great for me for a few days now, but as always your mileage may vary.
Requires both ffmpeg.exe and ffprobe.exe, but only ffmpeg.exe is included in Hunk91's archive.
Code::: ezQTGMC.cmd [source\folder[\file.ext] [target\folder]] :: :: a fancy batch frontend for Hunk91's FFmpeg-QTGMC Easy 2025.01.11 :: https://forum.videohelp.com/threads/405720-FFmpeg-QTGMC-Easy%21 :: accepts file or folder as input and will recursively rebuild to target :: simply drag/drop/copy/paste onto the batch file or use the command line :: ::::::::::::::::::::::::::::::::::::::::::::: :: some of the less-obvious user variables :: ::::::::::::::::::::::::::::::::::::::::::::: :: :: iFrames=number of frames required to use QTGMC (TFF+BFF sample of 100) 0=always(default), 101=never :: logFile=filename for text record of processing activity, no logfile if undefined :: modeQTGMC=if undefined set to 'Medium' (Placebo,Very Slow,Slower,Slow,Medium,Fast,Faster,Very Fast,Super Fast,Ultra Fast,Draft) :: numOfCores=number of processor cores to devote to QTGMC, if undefined set to 50% NUM_OF_PROCESSORS :: recursive=if defined source folder is recursively searched, if undefined source subfolders are ignored :: reverse=if defined the sort-order is reversed (z-A,9-0), useful for using 2 computers on 1 folder :: sourceDir=source folder, if undefined set to 1st parameter (%1), if still undefined set to current folder (%CD%) :: sourceExt=space-separated list of video file extensions to search for, if undefined set to all I could think of :: subExt=space-separated list of external subtitle file extensions to search for, if undefined external subtitles are not used :: subLang=space-separated list of allowed subtitle language extensions (.en .eng .sp .spa) :: targetDir=target folder, if undefined set to 2nd parameter (%2), if still undefined set to \_%~n0 in same folder as source :: vClip=simple way to quick preview files; -ss #secondsToSkip -t #secondsToKeep" :: ::::::::::::::::::::::::::::::::::::::::::::: :: v0.1 2026/05/22 CirothUngol :: ::::::::::::::::::::::::::::::::::::::::::::: @SETLOCAL EnableExtensions DisableDelayedExpansion @CALL :init ::::::::::::::::::::::::::::::::::::::::::::::::: :: user variables - choose your settings below :: ::::::::::::::::::::::::::::::::::::::::::::::::: SET "iFrames=" SET "logFile=%~dpn0.log" SET "modeQTGMC=slower" SET "numOfCores=" SET "recursive=1" SET "reverse=" SET "sourceDir=" SET "sourceExt=" SET "subExt=" SET "subLang=.en .eng" SET "targetDir=" ::SET "vClip=-ss 60 -t 30" :: :: variables to make the command line more managable SET "acodec=-c:a copy" SET "vcodec=-c:v libx264" SET "afilter=" ::SET "vfilter=-vf crop=720:360:0:60" ::SET "vfilter=-vf scale=-2:'min(ih,1080)'" SET "preset=-preset veryslow" SET "crf=-crf 19" SET "vbrmax=-maxrate:v 1920K" SET "bufsize=-bufsize 4M" SET "aspect=-aspect 4:3" SET "pixfmt=-pix_fmt yuv420p" :: :: no vbrMax limit ::SET "videoSet=%preset% %crf% %aspect% %pixfmt%" :: with vbrMax limit SET "videoSet=%vcodec% %preset% %crf% %vbrMax% %bufsize% %aspect% %pixfmt% %vfilter%" SET "audioSet=%acodec% %afilter%" :: want a unique logfile for each run? ::FOR /F "tokens=1-8 delims=:/. " %%S IN ("%DATE% %TIME: =0%") DO SET "logFile=%~dpn0.%%V%%T%%U.%%W%%X%%Y.log" ::::::::::::::::::::::::::::::::::::::::::::::::: :: user variables - choose your settings above :: ::::::::::::::::::::::::::::::::::::::::::::::::: :::::::::::::::::::: :: initialize values IF %errlvl% GTR 0 ENDLOCAL & EXIT /B %errlvl% IF NOT DEFINED sourceDir SET "sourceDir=%~1" IF NOT DEFINED sourceDir SET "sourceDir=%CD%" IF NOT DEFINED targetDir SET "targetDir=%~2" IF NOT DEFINED targetDir SET "targetDir=%sourceDir%" IF NOT DEFINED mapStream SET "mapStream=%vClip% -i %%1 -map 0:0 -map 1:1" IF NOT DEFINED ffmpegSet SET "ffmpegSet=-v error -stats -threads 0 -ignore_unknown" IF NOT DEFINED modeQTGMC SET "modeQTGMC=medium" IF NOT DEFINED iFrames SET "iFrames=0" IF NOT DEFINED sourceExt SET "sourceExt=3g2 3gp asf avchd avi cam divx f4v fla flv m1v m2ts m2v m4v mkv mng mov mp4 mpg mpeg mts mxf nsv ogm ogv qt rm rmvb svi ts vob webm wmv" IF NOT DEFINED numOfCores IF DEFINED NoP ( SET /A numOfCores=NoP/2) ELSE (SET "numOfCores=1") IF DEFINED recursive SET "recursive=/S" IF DEFINED reverse SET "reverse=/R" IF NOT EXIST "%~dpn0.avs" CALL :makeAVS :checkDir to remove the trailing '\' IF NOT DEFINED sourceDir ECHO sourceDir not defined & GOTO :stop IF NOT DEFINED targetDir ECHO targetDir not defined & GOTO :stop IF "%sourceDir:~-1%"=="\" SET "sourceDir=%sourceDir:~0,-1%" & GOTO :checkDir IF "%targetDir:~-1%"=="\" SET "targetDir=%targetDir:~0,-1%" & GOTO :checkDir %LOG%%~n0 started at %TIME: =0% on %DATE% %LOG% :: is source a file or folder? IF NOT EXIST "%sourceDir%\" ( REM It's not a folder IF EXIST "%sourceDir%" ( REM It's a file SET totalCnt=1 FOR %%A IN ("%sourceDir%") DO SET "sourceDir=%%~dpA" CALL SET "sourceDir=%%sourceDir:~0,-1%%" IF "%targetDir%"=="%sourceDir%" FOR %%A IN ("%%sourceDir%%") DO SET "targetDir=%%~dpA_%~n0" CALL :ezQTGMC "%sourceDir%" ) ELSE %LOG%"%sourceDir%" could not be found GOTO :stop ) IF "%targetDir%"=="%sourceDir%" FOR %%A IN ("%sourceDir%") DO SET "targetDir=%%~dpA_%~n0" :: scan for media files and call :ezQTGMC for each TITLE %~n0 is scanning for files... FOR %%A IN (%sourceExt%) DO FOR /F "delims=" %%B IN ('DIR /A-D /B %recursive% "%sourceDir%\*.%%A" 2^>NUL') DO ( SET /A totalCnt+=1 %ADD% totalBytes=!totalBytes!+%%~zB) FOR %%A IN (%sourceExt%) DO FOR /F "delims=" %%B IN ('DIR /A-D /B %recursive% "%sourceDir%\*.%%A" 2^>NUL ^| SORT %reverse%') DO ( CALL :ezQTGMC "%%~fB" IF ERRORLEVEL 255 GOTO :stop) IF %totalCnt% LSS 1 %LOG%no files found... :stop %LOG% %LOG%%pct%%% %doneCnt% of %totalCnt% at %TIME: =0% on %DATE% TITLE %pct%%% %doneCnt% of %totalCnt% at %TIME: =0% on %DATE% %POZ% press any key to exit %~n0... ENDLOCAL EXIT /B 0 :ezQTGMC SET /A doneCnt+=1 TITLE %~n0 %pct%%% #%doneCnt% of %totalCnt%: "%~nx1" SET /A pct=doneCnt*100/totalCnt SETLOCAL :: to peruse file data ::CALL :getInfo %1 ::SET & PAUSE & ENDLOCAL & EXIT /B 0 :: generate full target path and exit if file already exists SET "tDir=%~dp1" CALL SET "tDir=%targetDir%%%tDir:%sourceDir%=%%" IF EXIST "%tDir%%~n1.mkv" ( ENDLOCAL %ADD% skipBytes=!skipBytes!+%~z1 SET /A skipCnt+=1 EXIT /B 0) SET "fileTime=%TIME: =0% %DATE%" %BAR% %DATE% %TIME: =0% %LOG%%~n0 @ %pct%%% #%doneCnt% of %totalCnt%: "%~nx1" CALL :getInfo %1 FOR %%X IN ("%vidInfo:$=" "%") DO %LOG%%%~X ECHO. :: create the import.avis file containing settings for ezQTGMC.avs ECHO mode = "%modeQTGMC%">"%~dp0setQTGMC.avsi" ECHO cores = %numOfCores% >>"%~dp0setQTGMC.avsi" ECHO filename = %1>>"%~dp0setQTGMC.avsi" :: check for matching subtitles FOR %%Y IN (%subExt%) DO FOR %%Z IN ("" %subLang%) DO IF EXIST "%~dpn1%%~Z.%%~Y" ( SET mapStream=%vClip% -i %%1 %vClip% -i "%%~dpn1%%~Z.%%~Y" -map 0:0 -map 1:1 -map 2:0) :: use QTGMC or not? IF %tffbff% GEQ %iFrames% (SET "srcFile=%~dpn0.avs" ) ELSE SET "srcFile=%~1" :: call ffmpeg for encoding MD "%tDir%" >NUL 2>&1 %LOG%ffmpeg.exe %ffmpegSet% %vClip% -i "%srcFile%" %mapStream% %audioSet% %videoSet% -metadata title="%~n1" -y "%tDir%%~n1.mkv" ECHO. CALL ffmpeg.exe %ffmpegSet% %vClip% -i "%srcFile%" %mapStream% %audioSet% %videoSet% -metadata title="%~n1" -y "%tDir%%~n1.mkv" SET "errlvl=%ERRORLEVEL% DEL /Q "%~1.ffindex" >NUL 2>&1 RD "%tDir%" >NUL 2>&1 ECHO. IF %errlvl% GEQ 255 ( DEL /Q "%tDir%%~n1.mkv" >NUL 2>&1 %LOG%ErrorLevel is %errlvl%: removed "%tDir%%~n1.mkv" ENDLOCAL & SET /A skipCnt+=1) & EXIT /B %errlvl% IF %errlvl% GEQ 1 %LOG%ErrorLevel is %ERRORLEVEL% :: add times to logfile and exit ::SET /A part=doneCnt-skipCnt,whole=totalCnt-skipCnt %ADD% doneBytes=!doneBytes!+%~z1 %SUB% whole=!totalBytes!-!skipBytes! CALL :timeSince %fileTime% %LOG%file completed in %TS_% on %DATE% at %TIME: =0% CALL :timeSince %startTime% %doneBytes% %whole% %LOG%%pct%%% #%doneCnt% of %totalCnt% completed in %TS_% %LOG%there may be %TR_% remaining to completion %LOG% ( ENDLOCAL SET doneBytes=%doneBytes% EXIT /B %errlvl%) :: import file details into environment :getInfo FileToProbe FOR /F "tokens=*" %%W IN ('ffProbe.exe -v quiet -show_streams -show_format "%~f1" 2^>NUL') DO ( IF /I "%%W"=="[/FORMAT]" SET strFlag= IF /I "%%W"=="[/STREAM]" SET /A strCnt+=1 & SET strFlag= IF DEFINED strFlag FOR /F "tokens=1-2* delims=:=" %%X IN ("%%W") DO ( IF /I "%%X"=="DISPOSITION" ( CALL SET "D_%%Y%%strSuf%%=%%Z" ) ELSE IF /I "%%X"=="TAG" ( CALL SET "T_%%Y%%strSuf%%=%%Z" ) ELSE IF "%%Z"=="" ( CALL SET "%%X%%strSuf%%=%%Y" ) ELSE CALL SET "%%X%%strSuf%%=%%Y:%%Z" ) IF /I "%%W"=="[STREAM]" SET strFlag=1 & CALL SET strSuf=%%strCnt%% IF /I "%%W"=="[FORMAT]" SET strFlag=1 & SET strSuf= ) IF %strCnt% LSS 1 ENDLOCAL & EXIT /B 1 :: convert file duration to 00h00m00s SET /A dur=%duration% 2>NUL SET /A hrs=dur/3600, min=dur %% 3600/60, sec=dur %% 60, strIdx=strCnt-1, kbps=bit_rate/1024 ::IF %sec% LEQ 9 SET sec=0%sec% ::IF %min% LEQ 9 SET min=0%min% IF %hrs% EQU 0 ( IF %min% EQU 0 ( SET dur=%sec%s ) ELSE SET dur=%min%m %sec%s ) ELSE SET dur=%hrs%h %min%m %sec%s :: iterate through streams and build file description SETLOCAL EnableDelayedExpansion FOR /L %%X IN (0,1,%strIdx%) DO ( IF DEFINED channels%%X SET chnls=, !channels%%X!ch IF DEFINED T_language%%X SET lang=, !T_language%%X! IF DEFINED codec_name%%X SET codec=, !codec_name%%X! IF DEFINED sample_rate%%X SET smprt=, !sample_rate%%X!hz IF DEFINED channel_layout%%X SET lyout= !channel_layout%%X! IF DEFINED display_aspect_ratio%%X SET dar=, !display_aspect_ratio%%X! IF /I !codec_type%%X!==video ( SET fps=!r_frame_rate%%X! SET /A fps=!fps:/=00/! SET fps=, !fps:~0,-2!.!fps:~-2! fps SET vidInfo=!vidInfo!$ Str%%X: vid!vs!!codec!!fps!!dar!, !width%%X!x!height%%X!!lang! SET /A vs+=1 ) ELSE IF /I !codec_type%%X!==audio ( SET vidInfo=!vidInfo!$ Str%%X: aud!as!!codec!!chnls!!lyout!!smprt!!lang! SET /A as+=1 ) ELSE IF /I !codec_type%%X!==subtitle ( SET vidInfo=!vidInfo!$ Str%%X: sub!ss!!codec!!lang! SET /A ss+=1 ) ELSE IF /I !codec_type%%X!==data ( SET vidInfo=!vidInfo!$ Str%%X: dat!ds!!codec!!lang! SET /A ds+=1 ) ELSE ( SET vidInfo=!vidInfo!$ Str%%X: oth!xs!!codec!!lang! SET /A xs+=1 ) FOR %%Y IN (lang lyout smprt chnls codec fps dar) DO SET %%Y= ) FOR /F "tokens=*" %%W IN ('ffmpeg.exe -hide_banner -ignore_unknown -i %1 -frames:v 100 -an -vf idet -f null -y - 2^>^&1 ^| find "Multi frame detection:"') DO SET "t1=%%W" FOR /F "tokens=8,10,12,14" %%W IN ("%t1%") DO ( SET vidInfo=$Frames: TFF %%W, BFF %%X, Prg %%Y, Und %%Z!vidInfo! SET /A tffbff=%%W+%%X) SET t1=%~x1 %PWSH%Mb=[math]::Round(%~z1/1048576,2) SET vidInfo=Source: %t1:~1%, %dur%, %kbps% kbit/s, %Mb% Mbytes!vidInfo! ( ENDLOCAL SET "tffbff=%tffbff%" SET "vidInfo=%vidInfo%" EXIT /B 0) :timeSince Time [Date [part whole]] :: input - hh:mm:ss.cc [Day MM/DD/YYYY [intPart intWhole]] :: output - [[[[#wks, ]#day, ]#hrs, ]#min, ]#.#sec :: Returns time lapsed from %TIME% [%DATE%] to present in %TS_% and if given :: part+whole will return estimate of time remaining to completion in %TR_%. :: Raw time and day info for given(1) and current(2) are also available. :: TM1,TM2=# of centiseconds since last midnight. :: DY1,DY2=# of days since noon on January 1, 4713 BCE (Julian calendar). :: usage: :: SET "startTime=%TIME%" or "startTime=%TIME% %DATE%" before event then: :: CALL :timeSince %startTime% - for current elapsed time. :: CALL :timeSince %startTime% %partCnt% %wholeCnt% - to estimate by count. :: CALL :timeSince %startTime% %partKb% %wholeKb% - to estimate by size. :: v0.3 2020/07/29 :: SETLOCAL EnableDelayedExpansion SET inp=%* SET/A p=t=t1=tm1=t2=tm2=d=d1=dy1=d2=dy2=x=y=z=0 IF "!inp:~1,1!"==":" SET inp=0!inp! FOR %%@ IN ("!inp!" "!TIME: =0! !DATE!") DO (SET/A p+=1 FOR /F "tokens=1-10 delims=:./ " %%A IN ("%%~@")DO IF "%%D" NEQ "" ( SET/A"tm!p!=t!p!=(((1%%A*60)+1%%B)*60+1%%C)*100+1%%D-36610100" IF "%%H" NEQ "" (SET/A mm=100%%F%%100,dd=100%%G%%100,yy=10000%%H%%10000 SET/A"dy!p!=d!p!=!dd!-32075+1461*(!yy!+4800+(!mm!-14)/12)/4+367*(!mm!-2-(!mm!-14)/12*12)/12-3*((!yy!+4900+(!mm!-14)/12)/100)/4" IF "%%J" NEQ "" (SET y=%%I)&(SET z=%%J)))) IF !t1! GEQ !t2! SET/A t2+=8640000,d2-=1 IF !d2! LSS !d1! SET/A d2=d1 IF !d1! EQU 0 SET d2=0 SET/A t1=t2-t1,d1=d2-d1,d2=t2=0 IF !z! NEQ 0 ( SET xx=0000000009999999 SET yy=000000000000000!y! SET zz=000000000000000!z! IF "!yy:~-16!" GTR "!zz:~-16!" SET y=!z! FOR /L %%A IN (1,1,8) DO IF "!zz:~-16!" GTR "!xx:~-16!" SET "xx=!xx!9" & SET x=%%A IF !x! NEQ 0 FOR %%A IN (!x!) DO SET "y=!y:~0,-%%A!" & SET "z=!z:~0,-%%A!" IF "!y!"=="" SET y=1 IF !y! LSS 1 SET y=1 SET/A"t2=(z-y)*100/y*((d1*8640000+t1)/100),d2=t2/8640000,t2=t2%%8640000") FOR %%A IN (1 2) DO ( SET res= SET/A"d=d%%A,t=t%%A,w=d/7,d=d%%7,h=t%%8640000/360000,m=t%%360000/6000,s=t%%6000/100,c=t%%100" IF !c! LEQ 9 SET c=0!c! IF !w! GTR 0 SET "res=!w!wks, " IF !d! GTR 0 SET "res=!res!!d!day, " IF !h! GTR 0 SET "res=!res!!h!hrs, " IF !m! GTR 0 SET "res=!res!!m!min, " SET r%%A=!res!!s!.!c!sec) ( ENDLOCAL SET "TS_=%r1%" SET "TR_=%r2%" REM SET "tm1=%tm1%" REM SET "tm2=%tm2%" REM SET "dy1=%dy1%" REM SET "dy2=%dy2%" ) EXIT /B 0 :init @ECHO OFF COLOR 0F MODE 105,10000 CHCP 65001 >NUL :: clear all variables except those selected ( FOR /F "delims==" %%A IN ('SET 2^>NUL') DO SET "%%A=" SET "TEMP=%TEMP%" SET "PATH=%~dp0;%PATH%" SET "SystemRoot=%SystemRoot%" SET "NoP=%NUMBER_OF_PROCESSORS%" ) SET "startTime=%TIME: =0% %DATE%" SET /A doneCnt=pct=skipCnt=strCnt=totalCnt=doneBytes=skipBytes=totalBytes=errlvl=vs=as=ss=ds=xs=0 :: check for required executables ffMpeg.exe >NUL 2>&1 IF %ERRORLEVEL% EQU 9009 (ECHO ffMpeg.exe could not be found) & (SET errlvl=1) & EXIT /B 0 ffProbe.exe >NUL 2>&1 IF %ERRORLEVEL% EQU 9009 (ECHO ffProbe.exe could not be found) & (SET errlvl=1) & EXIT /B 0 :: small macros (SET \n=^^^ %= This defines an escaped Line Feed - DO NOT ALTER =% ) :: pause with custom (or no) message and no carriage return :: %POZ% [displayText] SET POZ=FOR %%# IN (1 2)DO IF %%#==2 (PAUSE^>NUL^&ECHO.)ELSE ^<NUL SET/P= :: echo LogText to both console and filepath in %logFile% if defined :: %LOG% [LogText] SET LOG=FOR %%# IN (1 2)DO IF %%#==2 (%\n% IF DEFINED logFile ECHO.!##!^>^>"!logFile!"%\n% ECHO.!##!%\n% ENDLOCAL%\n% )ELSE SETLOCAL EnableDelayedExpansion^&SET ##= :: display a bar the width of the console window :: %BAR% [DisplayMessage] SET BAR=FOR %%# IN (1 2)DO IF %%#==2 (%\n% FOR /L %%# IN (1,1,8)DO SET b=!b!!b!~~%\n% SET b=!b!!##! %\n% FOR /F tokens^^^=2 %%# IN ('MODE CON ^^^| FIND "Columns"')DO ^<NUL SET/P=!b:~-%%#!%\n% ENDLOCAL%\n% )ELSE SETLOCAL EnableDelayedExpansion^&SET ##= :: use powershell for decimals, large integers, complex math. Slow, use others for simple stuff :: %PWSH% Variable=Expression SET PWSH=FOR %%# IN (1 2)DO IF %%#==2 (%\n% FOR /F "tokens=1* delims==" %%A IN ("!##!")DO (%\n% SET N=%\n% SET V=%%A%\n% FOR /F %%C IN ('powershell.exe -command "& {%%B;}"') DO SET N=%%C)%\n% FOR /F "delims=" %%A IN ("!V!=!N!")DO (%\n% ENDLOCAL%\n% SET "%%A")%\n% )ELSE SETLOCAL EnableDelayedExpansion^&SET ##= :: addition - group values by 8 digits, add values, collect carry, assemble answer :: %ADD% Sum=Integer1+Integer2 SET ADD=FOR %%# IN (1 2)DO IF %%#==2 (%\n% SET N=%\n% SET W=0%\n% SET Z=000000000000000%\n% FOR /F "tokens=1-3 delims==+ " %%A IN ("!##!")DO (%\n% SET V=%%A%\n% SET #1=!Z!%%B%\n% SET #2=!Z!%%C)%\n% FOR /L %%A IN (8,8,16)DO (%\n% SET/A T=W+1!#1:~-%%A,8!+1!#2:~-%%A,8!,W=T/300000000%\n% SET N=!T:~1!!N!)%\n% FOR /F "tokens=1* delims=0" %%A IN ("!V!0!W!!N!")DO (%\n% ENDLOCAL%\n% SET %%A=%%B)%\n% )ELSE SETLOCAL EnableDelayedExpansion^&SET ##= :: subtraction - only subtract lesser from greater, all non-positive results are zero. :: %SUB% Sum=Integer1-Integer2 SET SUB=FOR %%# IN (1 2)DO IF %%#==2 (%\n% SET N=%\n% SET W=0%\n% SET Z=000000000000000%\n% FOR /F "tokens=1-3 delims==- " %%A IN ("!##!")DO (%\n% SET V=%%A%\n% SET #1=!Z!%%B%\n% SET #2=!Z!%%C)%\n% FOR /L %%A IN (8,8,16)DO (%\n% SET/A T=3!#1:~-%%A,8!-1!#2:~-%%A,8!+W,W=T/200000000-1%\n% SET N=!T:~1!!N!)%\n% FOR /F "tokens=1* delims=0" %%A IN ("!V!0!N!")DO (%\n% ENDLOCAL%\n% SET %%A=%%B)%\n% )ELSE SETLOCAL EnableDelayedExpansion^&SET ##= EXIT /B 0 :makeAVS FOR /F "delims=[]" %%A IN ('FIND /N "#####" "%~f0"') DO SET "sl=%%A" FOR /F "usebackq skip=%sl% delims=" %%A IN ("%~f0") DO ECHO(%%A>>"%~dpn0.avs" EXIT /B 0 ##### # QTGMC portable script for ezQTGMC.cmd v0.1 batch frontend # blatently stolen from Hunk91's fantastic FFmpeg-QTGMC Easy 2025.01.11 package # https://forum.videohelp.com/threads/405720-FFmpeg-QTGMC-Easy%21 # # Tested with Avisynth+ 3.7.3(r4003) 64 bits and FFMPEG 7.1-full_build-www.gyan.dev 2024-09-30 # To know more about AviSynth go to : http://avisynth.nl/ # To know more about FFmpeg go to : https://ffmpeg.org/ # # Import filename AVSI Import("setQTGMC.avsi") # # Multi-threading requires 'SetFilterMTMode' and 'prefetch' command at the bottom of qtgmc.avs SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) # # FFmpegSource v5.00 plugin : http://avisynth.nl/index.php/FFMS2 # To know more bout loading video files in Avisynth : http://avisynth.nl/index.php/FAQ_loading_clips LoadPlugin("ffms2.dll") # # MaskTools2 v2.2.30 plugin : http://avisynth.nl/index.php/Masktools2 LoadPlugin("masktools2.dll") # Rgtools v1.2 plugin : http://avisynth.nl/index.php/RgTools LoadPlugin("Rgtools.dll") # MVTools v2.7.46 with depans v20240503 plugin : http://avisynth.nl/index.php/MVTools LoadPlugin("mvtools2.dll") # Nnedi3 v0.9.4.63 Plugin : http://avisynth.nl/index.php/Nnedi3 LoadPlugin("nnedi3.dll") # # Yadifmod2 v0.2.8 Plugin (ONLY for Ultra Fast setting mode in QTGMC) : http://avisynth.nl/index.php/Yadifmod2 #LoadPlugin("yadifmod2.dll") # FFT3DFilter v2.10 Plugin (ONLY for Very Slow and Placebo modes) : http://avisynth.nl/index.php/FFT3DFilter #LoadPlugin("fft3dfilter.dll") # LoadDLL v1.0 Plugin (ONLY for Very Slow and Placebo modes) : http://avisynth.nl/index.php/LoadDLL #LoadPlugin("LoadDLL64.dll") # Loading libfftw3f-3.dll from FFTW v3.3.5(ONLY for Very Slow and Placebo modes) : https://www.fftw.org/ #LoadDLL("libfftw3f-3.dll") # # Zs_RF_Shared v1.159 script : http://avisynth.nl/index.php/Zs_RF_Shared Import("Zs_RF_Shared.avsi") # QTGMC v3.384s script : http://avisynth.nl/index.php/QTGMC Import("QTGMC.avsi") # # Open video file without audio FFMpegSource2(filename) # Open video file with audio track #FFMpegSource2(filename,atrack=1) # # FFMpegSource2 audio and video combined #A = FFAudioSource(filename) #V = FFVideoSource(filename) #AudioDub(V, A) # # Converion to YV12 color format: http://avisynth.nl/index.php/ConvertToYV12 ConvertToYV12(interlaced=true) #ConvertToYV12() # # QTGMC mode (Placebo,Very Slow,Slower,Slow,Medium,Fast,Faster,Very Fast,Super Fast,Ultra Fast,Draft) #QTGMC(preset=mode,Sharpness=0.8) QTGMC(preset=mode) # # Multi-threading requires 'prefetch' and 'SetFilterMTMode' command at the top of qtgmc.avs #Prefetch(#cores) Prefetch(cores)
Similar Threads
-
Qtgmc-GUI. A simple encoder for your Qtgmc scripts.
By ProWo in forum Video ConversionReplies: 17Last Post: 4th Mar 2023, 02:01 -
"Good-Enough" QTGMC/FFMPEG Presets?
By Okiba in forum Video ConversionReplies: 6Last Post: 6th Nov 2020, 12:31 -
Having trouble with probably an embarrassingly easy FFMpeg routine
By CursedLemon in forum Video ConversionReplies: 3Last Post: 6th Oct 2020, 12:48 -
Deinterlacing & saving HD footage from pro cameras (QTGMC ffmpeg question)
By HighDeaf in forum Video ConversionReplies: 8Last Post: 23rd Mar 2020, 20:22 -
I think this just needs QTGMC...
By pooksahib in forum Video ConversionReplies: 2Last Post: 30th May 2019, 03:12




Quote