VideoHelp Forum




+ Reply to Thread
Results 1 to 6 of 6
  1. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    Hi.


    Is there a program that can convert dts->ac3 all video files of a folder and subfolders and the result file write it at the same folder original file was.


    And that program if it can would be free and run at win7.
    Quote Quote  
  2. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Of course: ffmpeg (in recursive FOR loops in CMD). Just constructing the loops takes a bit of learning.
    Quote Quote  
  3. To convert audio streams from DTS to AC3 in video files on Windows 7, you can use PowerShell and FFmpeg.

    Code:
    # script that will convert the audio streams of all video files in a specified folder from DTS to AC3
    
    # Specify the folder containing the video files
    $folderPath = "C:\path\to\your\folder"
    
    # Get all video files in the folder
    $videoFiles = Get-ChildItem -Path $folderPath -Filter *.mp4
    # or use $videoFiles = Get-ChildItem -Path $folderPath -Include *.mp4, *.avi, *.mkv
    
    # Loop through each video file
    foreach ($videoFile in $videoFiles) {
        $inputFile = $videoFile.FullName
        $outputFile = [System.IO.Path]::ChangeExtension($inputFile, "ac3")
    
        # Run FFmpeg to convert the audio stream from DTS to AC3
        & ffmpeg -i "$inputFile" -c:v copy -c:a ac3 -b:a 192k "$outputFile"
    
        Write-Host "Converted $inputFile to $outputFile"
    }
    Instructions:
    1. Install FFmpeg:
    - Download FFmpeg from [FFmpeg's official website](https://ffmpeg.org/download.html).
    - Extract the downloaded archive to a directory, for example, `C:\ffmpeg`.
    - Add the `bin` directory of the extracted FFmpeg to your system's PATH environment variable.

    2. Save the Script:
    - Open Notepad or any text editor.
    - Copy and paste the above PowerShell script into the editor.
    - Save the file with a `.ps1` extension, for example, `ConvertAudioStreams.ps1`.

    3. Run the Script:
    - Open PowerShell with administrative privileges.
    - Navigate to the directory where you saved the script.
    - Run the script by typing `.\ConvertAudioStreams.ps1` and pressing Enter.

    Notes:
    - Ensure that the folder path in `$folderPath` is correct.
    - The script assumes that the video files have the `.mp4` extension. If your files have different extensions, adjust the `-Filter` parameter accordingly. [$videoFiles = Get-ChildItem -Path $folderPath -Include *.mp4, *.avi, *.mkv]
    - The script uses the `ac3` codec with a bitrate of 192k. You can adjust the bitrate as needed.
    Last edited by videoAI; 30th Jul 2025 at 10:58.
    As always .. there is nothing wrong with my environment
    Quote Quote  
  4. DTS (Digital Theater Systems) and AC3 (Audio Codec 3, also known as Dolby Digital) are both audio coding formats used in multimedia applications, but they have some key differences:

    DTS:
    - Bitrate: Typically higher bitrates, often ranging from 768 kbps to 1536 kbps.
    - Quality: Generally considered to offer higher audio quality due to its higher bitrate and more efficient compression algorithms.
    - Channels: Supports up to 7.1 channels.
    - Use Cases: Commonly used in Blu-ray discs, high-end home theater systems, and some streaming services.
    - File Size: Larger file sizes due to higher bitrates.

    AC3:
    - Bitrate: Typically lower bitrates, ranging from 192 kbps to 640 kbps.
    - Quality: Offers good audio quality but generally not as high as DTS due to lower bitrates.
    - Channels: Supports up to 5.1 channels.
    - Use Cases: Widely used in DVDs, cable TV, satellite TV, and many streaming services.
    - File Size: Smaller file sizes due to lower bitrates.

    Summary:
    - DTS is preferred for higher audio quality and more channels, often used in high-end audio setups.
    - AC3 is more commonly used due to its widespread support and smaller file sizes, making it suitable for many standard applications.
    As always .. there is nothing wrong with my environment
    Quote Quote  
  5. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    Originally Posted by videoAI View Post
    To convert audio streams from DTS to AC3 in video files on Windows 7, you can use PowerShell and FFmpeg.

    Code:
    # script that will convert the audio streams of all video files in a specified folder from DTS to AC3
    
    # Specify the folder containing the video files
    $folderPath = "C:\path\to\your\folder"
    
    # Get all video files in the folder
    $videoFiles = Get-ChildItem -Path $folderPath -Filter *.mp4
    
    # Loop through each video file
    foreach ($videoFile in $videoFiles) {
        $inputFile = $videoFile.FullName
        $outputFile = [System.IO.Path]::ChangeExtension($inputFile, "ac3")
    
        # Run FFmpeg to convert the audio stream from DTS to AC3
        & ffmpeg -i "$inputFile" -c:v copy -c:a ac3 -b:a 192k "$outputFile"
    
        Write-Host "Converted $inputFile to $outputFile"
    }
    Instructions:
    1. Install FFmpeg:
    - Download FFmpeg from [FFmpeg's official website](https://ffmpeg.org/download.html).
    - Extract the downloaded archive to a directory, for example, `C:\ffmpeg`.
    - Add the `bin` directory of the extracted FFmpeg to your system's PATH environment variable.

    2. Save the Script:
    - Open Notepad or any text editor.
    - Copy and paste the above PowerShell script into the editor.
    - Save the file with a `.ps1` extension, for example, `ConvertAudioStreams.ps1`.

    3. Run the Script:
    - Open PowerShell with administrative privileges.
    - Navigate to the directory where you saved the script.
    - Run the script by typing `.\ConvertAudioStreams.ps1` and pressing Enter.

    Notes:
    - Ensure that the folder path in `$folderPath` is correct.
    - The script assumes that the video files have the `.mp4` extension. If your files have different extensions, adjust the `-Filter` parameter accordingly.
    - The script uses the `ac3` codec with a bitrate of 192k. You can adjust the bitrate as needed.
    I prefer a program has gui
    Quote Quote  
  6. Member
    Join Date
    Aug 2013
    Location
    Central Germany
    Search PM
    Then you can try one of so many many many ffmpeg based batch converters with GUI. Like e.g. TEncoder or clever FFmpeg-GUI ... I will not guarantee that they support sub-directories recursively, you may have to add them all manually to the queue.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!