pixop / video-compare

Split screen video comparison tool using FFmpeg and SDL2
GNU General Public License v2.0
889 stars 41 forks source link

Hi I Created Multi File Comparer Without Command :) #32

Open DarkFrost1989 opened 1 year ago

DarkFrost1989 commented 1 year ago

Hi Firstly Thank You For Created Awsome Comparer, I Also Wanted To Contribute This Good Project,And I Created Multi File Comparer Without Any Command Just Create video-compare.exe Folder, Folder Named "Input" And Put 2 Video Files Here Like This HEIZ4Qn.md.png After Paste This Command For Batch File And Start Batch This Command Automatically Get File And Compare 2 Video This Code Tested Win 11 22H2 22621.819 Code İs Here And Share For Free :

@echo off
setlocal EnableDelayedExpansion
echo --------------------------------------------------------------
echo               Dark Frost \ Dark Blade
echo --------------------------------------------------------------
set CompareOptions=-m split
set CompareWindowsize=-w 1920x1080
set Supportedformat="*.*"
set InputFolder="Input\"
set InputFolderCD=%cd%\Input\
echo --------------------------------------------------------------
echo            Start File Checking Please Wait
echo --------------------------------------------------------------
:: commandA && commandB Run commandA, if it succeeds then run commandB
:: commandA || commandB Run commandA, if it fails then run commandB
dir /b /s "Input\" | findstr .>nul && (goto :Compare)
dir /b /s "Input\" | findstr .>nul || (goto :Error)
::::: -------------------------------------------------------------
:Compare
echo --------------------------------------------------------------
echo            Start Video Compare Please Wait
echo --------------------------------------------------------------
:: Thanks "jeb" For Folder Line Reader "https://stackoverflow.com/questions/31035636/batch-store-command-output-to-a-variable-multiple-lines"
@echo on 
set "output_cnt=0"
for /F "delims=" %%f in ('dir /b "%InputFolder%\%Supportedformat%"') do (
    set /a output_cnt+=1
    set "output[!output_cnt!]=%%f"
)
for /L %%n in (1 1 !output_cnt!) DO echo !output[%%n]!
set Out1=!output[1]!
set Out2=!output[2]!
video-compare %CompareWindowsize% %CompareOptions% "%InputFolderCD%%Out1%" "%InputFolderCD%%Out2%"
@echo off
echo --------------------------------------------------------------
echo            Video Compare Complete
echo --------------------------------------------------------------
Goto :Finish
:Error
echo --------------------------------------------------------------
echo      File Not Found Please Put File "Input" Folder
echo --------------------------------------------------------------
Goto :Finish
:Finish
Pause

Best Regards Fatih Çakır