VideoHelp Forum




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


    Is there any program that it can scan a folder with subfolders and in all video files(Mkv, divx, avi e.t.c.) and find all files has dts or dts-hd sound?
    And inform us where and which is these files?
    And if it can this program would be free and run at win7.
    Quote Quote  
  2. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I'm sure you ought to be able to do that with a batch script ("for %% in....") using ffprobe, mediainfo, and perhaps a regex filter, but I don't have the time to devote to creating something like that.


    Scott
    Quote Quote  
  3. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    I don't know to create regex
    Quote Quote  
  4. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    Reply not relevant to the question
    Last edited by Subtitles; 30th Jul 2025 at 03:00.
    Quote Quote  
  5. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    So the basic question still remains.
    Is there a program that can scan a folder and all sub folders and inform us witch file has dts sound?
    Quote Quote  
  6. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    How many files do you have?
    Quote Quote  
  7. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    I don't know. AS many it has.
    Quote Quote  
  8. Member
    Join Date
    Mar 2021
    Location
    Israel
    Search Comp PM
    Find out using DOS CMD
    Move cmd to the folder with all the files and do
    dir/s > allfiles.txt
    This will create a text file with all the file names in the folder and subfolders.
    Quote Quote  
  9. Here is a PowerShell script to achieve this:

    Code:
    # This script will output the paths of videos that have a DTS audio stream.
    # Define the folder to scan
    $folderPath = "C:\Path\To\Your\Folder"
    
    # Get all video files in the folder and subfolders
    $videoFiles = Get-ChildItem -Path $folderPath -Recurse -Include *.mp4, *.mkv, *.avi, *.mov
    
    # Loop through each video file
    foreach ($file in $videoFiles) {
        # Use ffmpeg to check for DTS audio stream
        $ffmpegOutput = & ffmpeg -i "$file.FullName" 2>&1
    
        # Check if the output contains "DTS"
        if ($ffmpegOutput -match "DTS") {
            Write-Output "File: $($file.FullName) has DTS audio stream."
        }
    }
    Explanation:
    1. Define the folder to scan: Set the `$folderPath` variable to the path of the folder you want to scan.
    2. Get all video files: Use `Get-ChildItem` to recursively get all files with common video extensions (`.mp4`, `.mkv`, `.avi`, `.mov`).
    3. Loop through each video file: Iterate through each video file and use `ffmpeg` to analyze the file.
    4. Check for DTS audio stream: Use a regular expression to check if the `ffmpeg` output contains "DTS".
    5. Output the result: If a DTS audio stream is found, print the file path.

    Prerequisites:
    - Ensure `ffmpeg` is installed and added to your system's PATH.
    - Adjust the `$folderPath` variable to the directory you want to scan.
    - Modify the list of video file extensions if needed.
    As always .. there is nothing wrong with my environment
    Quote Quote  
  10. Member
    Join Date
    Aug 2008
    Location
    Greece
    Search PM
    I prefer a gui program.
    Quote Quote  
  11. Originally Posted by fits79 View Post
    I prefer a gui program.
    then you should consider paying somebody to make a script for you.

    Also, since a solution is given - I'd suspect if someone really did make you a script that pops a GUI, you'd just put up some new reason it isn't good enough.

    I'd advice anyone considering making a script for money to take payment in advance from this user.
    Quote Quote  
  12. @fits79 You could at least have said 'thanks' .. but ..

    @Prototype .. thank you, really appreciate you comment

    Originally Posted by Prototype v1.0 View Post
    Originally Posted by fits79 View Post
    I prefer a gui program.
    then you should consider paying somebody to make a script for you.
    Also, since a solution is given - I'd suspect if someone really did make you a script that pops a GUI,
    you'd just put up some new reason it isn't good enough.
    I'd advice anyone considering making a script for money to take payment in advance from this user.
    As always .. there is nothing wrong with my environment
    Quote Quote  
  13. some crude gui version how to get a pattern from a ffmpeg info readings
    Image
    [Attachment 88034 - Click to enlarge]
    ,
    do not forget to include spaces (before or after a pattern) to exclude not desired hits
    search pattern gui in zip
    send me a link to collect $100 thru pm , thanks
    Quote Quote  
  14. @videoAI I would like to thank you for your script. The solution is very elegant.


    Believe it or not, but before Cornucopia posted on the 29, I had a solution script (Similar to yours but using dos cmd ... sed and grep). Took me a while to figure out that 2>&1 is required for the ffmpeg output. I was about to post my solution when I reread what the OP had written. No where was mentioned please, appreciate or thanks. So I did not post my solution.


    I have stopped trying to help people who show no appreciation while feeling entitled. Hard to believe that this person has 400 posts.


    Anyway, I just wish to thank you for your post. Great job.
    Quote Quote  
  15. @Gromyko
    Appreciate your kind words .. thank you.

    Originally Posted by Gromyko View Post
    @videoAI I would like to thank you for your script. The solution is very elegant.
    Believe it or not, but before Cornucopia posted on the 29, I had a solution script (Similar to yours but using dos cmd ... sed and grep). Took me a while to figure out that 2>&1 is required for the ffmpeg output. I was about to post my solution when I reread what the OP had written. No where was mentioned please, appreciate or thanks. So I did not post my solution.
    I have stopped trying to help people who show no appreciation while feeling entitled. Hard to believe that this person has 400 posts.
    Anyway, I just wish to thank you for your post. Great job.
    As always .. there is nothing wrong with my environment
    Quote Quote  



Similar Threads

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