Hi, you added "REM" lines to this script, not too much, not too little, just right:…
- User
Hi, you added "REM" lines to this script, not too much, not too little, just right:
@echo off setlocal
REM =========================== REM Configuration REM ===========================
REM Destination directory set "DEST_DIR=D:\Video\MKVConvert"
REM Path to mkvmerge.exe set "MKVMERGE=C:\Program Files\MKVToolNix\mkvmerge.exe"
REM =========================== REM Setup REM ===========================
REM Create destination directory (suppress error if it already exists) mkdir "%DEST_DIR%" 2>nul
REM Change to the directory where the script resides pushd "%~dp0"
REM =========================== REM Processing Loop REM ===========================
REM Iterate over each MKV file in the current directory for %%a in ("*.mkv") do ( echo Processing: %%~nxa
"%MKVMERGE%" ^ --ui-language en --priority highest ^ --video-tracks 0 --audio-tracks 1 --subtitle-tracks 2 ^ --no-attachments --no-global-tags --no-track-tags --no-chapters ^ --language 0:en --track-name 0: --default-track-flag 0:yes ^ --language 1:en --track-name 1: --default-track-flag 1:yes ^ --sub-charset 2:UTF-8 --language 2:en --track-name 2: --default-track-flag 2:yes ^ --title "" --track-order 0:0,0:1,0:2 ^ --output "%DEST_DIR%\%%~nxa" ^ "%%~fa")
REM Return to the original directory popd
pause
Can you do the same for this script as well:
@echo off setlocal enabledelayedexpansion
set "input=NEW.flac" for %%F in ("%input%") do set "base=%%~nF" set "bitrates=640k"
echo Converting FLAC to AC3... for %%b in (%bitrates%) do ( set "output=!base!_%%b.ac3" ffmpeg -i "%input%" -c:a ac3 -b:a %%b -dialnorm -31 ^ -center_mixlev 0.707 -surround_mixlev 0.707 ^ -ltrt_cmixlev 0.707 -ltrt_surmixlev 0.707 ^ -loro_cmixlev 0.707 -loro_surmixlev 0.707 ^ "!output!" echo Created: "!output!"
echo Generating spectrogram... ffmpeg -i "!output!" ^ -filter_complex "showspectrumpic=s=1920x1080" ^ -update 1 -frames:v 1 "!base!_spectrogram.png" echo Created spectrogram: "!base!_spectrogram.png!")
echo All AC3 conversions and spectrogram generations are complete. pause
- Assistant