Skip to content

Instantly share code, notes, and snippets.

@uahim
Last active June 27, 2025 17:46
Show Gist options
  • Save uahim/604447c736b9b066e384823152a0acb0 to your computer and use it in GitHub Desktop.
Save uahim/604447c736b9b066e384823152a0acb0 to your computer and use it in GitHub Desktop.
batch helper for ffmpeg/ffprobe to loop through your mkv video files and convert dts
@echo off
setlocal enabledelayedexpansion
for %%a in (%*) do (
ffprobe -v error -select_streams a -show_entries stream=codec_name -of default=noprint_wrappers=1:nokey=1 "%%~fa" | findstr /i "dts" >nul
if !errorlevel! equ 0 (
set filename="%%~dpna-ac3.mkv"
ffmpeg -i "%%~fa" -vcodec copy -scodec copy -acodec ac3 -b:a 640k %filename%
echo converted %filename%
)
echo loop step through, hit any key to continue...
pause > nul
)
REM drag and drop your files to transcode DTS to Dolby Digital/AC3 if your TV does not support the former
REM (f*ck Samsung!)
REM #
REM via lb4ever and chatgpt ;-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment