I found a thread with this subject, but was 2 years old, so thought best I start a new one.
I have several video files with DTS audio, which my TV won’t play, have tried a couple of scripts to convert them to AC3
The first one uses two folders in the same directory, and worked perfectly yesterday, but today I get errors, that is confusing
The second offering was written for me, so I could use different directories for source and target, but that gives errors before running.
I don’t know enough to correct these, I hope someone on here can help me.
First script
$source = Get-ChildItem -path "F:\Convert*" -Recurse -Include *.mkv
$ffpath = "C:\ProgramData\chocolatey\lib\ffmpeg\tools\ffmpeg\bin\ffmpeg.exe"
$DirOut = "F:\Converted"
$output = Join-Path $DirOut -ChildPath ((Get-Item $source).basename + "_out.mkv")
& $ffpath -i $source -map 0 -vcodec copy -scodec copy -acodec ac3 -b:a 640k $output -loglevel 8 -stats
Second script
:: convert all mkv files in a source Folder to mkv with AC3 using ffmpeg
:: eg. source T:\Old mkvs and eg.destination D:\New mkvs
:-----------------------------------------------------------------------------------------------------------------------------------
:: first edit the two Directory values for the Source and Destination "and" the path of ffmpeg
:-----------------------------------------------------------------------------------------------------------------------------------
SET Source_Files_Dir=T:\Old mkvs
SET Converted_Files_Dir=D:\New mkvs
SET ffmpeg=C:\mp4v\ffmpeg\ffmpeg.exe
cd /d %Converted_Files_Dir%
for /F "delims=" %%a in ('dir /b /s "%Source_Files_Dir%"\*.mkv') do (
"%ffmpeg%" -i "%%a" -map 0 -an -vcodec copy -scodec copy -acodec ac3 -b:a 640k "%%~na_out.mkv" -loglevel 8 -stats
)
pause
exit
+ Reply to Thread
Results 1 to 1 of 1
Similar Threads
-
batch convert DTS to Ac3 using ffmpeg
By Mishari in forum Newbie / General discussionsReplies: 7Last Post: 7th Apr 2022, 16:23 -
How to Batch Process 768kbps DTS .m4a Audio Files to AC3 5.1ch 640Kbps
By askfriends in forum AudioReplies: 5Last Post: 4th Aug 2021, 06:17 -
Convert DTS to AC3/E-AC3
By craigyy in forum AudioReplies: 5Last Post: 23rd Jan 2021, 08:20 -
Hi. I look a program that convert dts to ac3 EASY AND FAST
By fits79 in forum Video ConversionReplies: 11Last Post: 16th Dec 2020, 12:04 -
How to convert only Audio (DTS to AAC/AC3) for Video File in MKVToolNix GUI
By brijeshkumarsingh in forum Video ConversionReplies: 1Last Post: 28th Nov 2018, 07:11