VideoHelp Forum

+ Reply to Thread
Results 1 to 13 of 13
Thread
  1. Hello to all. I have a 3 hour audio file where there are very small mute audio gaps caused by microphone problems. They are really short, less than 10 milliseconds, but clearly noticeable and very annoying.
    Image
    [Attachment 61304 - Click to enlarge]

    My problem is none of the programs I have used, including Reaper, Audition and Audacity, are capable of detecting silence gaps of less than 10 milliseconds ...
    How can I do?
    I don't want something that automatically eliminates these gaps because I want to fill them manually to keep the file length unchanged, I just want something that tells me where they are. I hope someone can help me. Thanks
    Quote Quote  
  2. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    try 'ffmpeg silentdetect...' for a list of silences. adjust duration(d) and level(-xxdb)

    Code:
    ffmpeg -i "input.mp4" -af silencedetect=noise=-30dB:d=0.5 -f null -
    Yields:

    Stream #0:1(und): Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s (default) Metadata:
    handler_name : SoundHandler
    encoder : Lavc58.93.100 pcm_s16le
    [silencedetect @ 09cac540] silence_start: 0.306531
    [silencedetect @ 09cac540] silence_end: 1.36218 | silence_duration: 1.05565
    [silencedetect @ 09cac540] silence_start: 1.70256
    [silencedetect @ 09cac540] silence_end: 2.64018 | silence_duration: 0.937619
    [silencedetect @ 09cac540] silence_start: 7.6212
    [silencedetect @ 09cac540] silence_end: 8.12229 | silence_duration: 0.501088
    [silencedetect @ 09cac540] silence_start: 19.031
    [silencedetect @ 09cac540] silence_end: 19.7772 | silence_duration: 0.746281
    frame= 602 fps=0.0 q=-0.0 Lsize=N/A time=00:00:20.06 bitrate=N/A speed=53.6x
    Quote Quote  
  3. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    If your background noise is consistent, you can easily fill the gaps, without having to do it one at a time.

    Use something like Budman's script to catch those gaps, and then delete them using a mode where subsequent clips don't snap to fill the gap. So you end up with segments separated by empty space.
    Then lay down long loops of just the background noise, on a separate track.

    Then select all on the 1st track, move down to the 2nd and do an overwrite paste.


    Now you have clip+bkgd+clip+bkgd, etc. with the timings still synced correctly. Then tab through and adjust crossfades. Done.
    Have done this in ProTools more times than I care to count (it can detect short gaps, but is in a different class of apps, which you didn't mention, so I was trying to stick w that)..


    Scott
    Quote Quote  
  4. Thanks to both of you. What interests me is only to find the position of these gaps, I already have my system to correct them.
    To find gaps shorter than 10 milliseconds I tried to adapt the script in this way:
    Code:
    ffmpeg -i "input.wav" -af silencedetect=noise=-40dB:d=0.005 -f null -
    I've written it in a .bat file and launched in the folder where is located my .wav file. While processing the file I see that ffmpeg finds gaps but then at the end of the scan the window closes and I can't copy the information .... How do I get a textual log file from that script?

    p.s. i don't know anything about ffmpeg so please don't take anything for granted ...
    Quote Quote  
  5. Try to append
    > log.txt
    at the end of your commandline
    Quote Quote  
  6. Unfortunately "> log.txt" only creates an empty text file. Anyway.. I solved it by starting the script with windows powershell from the audio file directory. Now the window doesn't disappear and I have my gaps list. Thanks a lot to everyone and especially to Bodman1. The problem is solved.
    Just one last crazy question ....
    The script returns the results in seconds while the program I use has the timeline in "hours:minuteseconds.milliseconds". Is it possible to get the script results in this format? Right now I'm using a "seconds to minutes" online converter and it's not the most comfortable workflow...
    Quote Quote  
  7. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    You will probably have to add 2> something.txt or 1> something.txt because is is being originally piped to null.
    Also ffmpeg will accept seconds instead of the usual time format (hh:mms.xxx). Output however is sometimes only in seconds.
    Quote Quote  
  8. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    You will probably have to add 2> something.txt or 1> something.txt because is is being originally piped to null.
    Quote Quote  
  9. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Ffmpeg works with all seconds but I'm not familiar with what you are using. Do you needs seconds changed to HH:MM:SS.mmm or HH:MM:SS.mmm changed to seconds? Are you looking for a batch file or EXE to do this?
    Quote Quote  
  10. Thanks again. "2>" worked perfectly. As for the rest I would need ffmpeg to give me the gaps time in the format HH: MM: SS.mmm. But if it is not possible directly in "ffmpeg" I will continue to do it by hand with this site https://www.inchcalculator.com/convert/second-to-minute/
    Quote Quote  
  11. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    I have no life.... LOL Quick view... Actual conversion to complete.. Anyone see anything missing that would be needed for time conversion?

    Image
    [Attachment 61360 - Click to enlarge]



    OOOPS... Yes final would be in HH:MM:SS.mmm
    Last edited by Budman1; 20th Oct 2021 at 03:40.
    Quote Quote  
  12. Sorry I don't understand ... What is that? Are you creating a software?
    Quote Quote  
  13. Member Budman1's Avatar
    Join Date
    Jul 2012
    Location
    NORTHWEST ILLINOIS, USA
    Search Comp PM
    Yes, i just created that to drop your video at the top and it uses silencedetect to find the gaps you requested and convert them to standard HH:MM:SS.mmm format in one fell swoop.

    When its dont it will also have an interactive dynamic conversion from/to either seconds or formatted entries. That is you enter seconds and it coverts or you enter formatted to convert to seconds.
    This program i wrote to do all you requested just by drag/drop video in filename box. Finds gaps, lists them, converts to formatted dates.
    Just bored so thought I'd give it a shot.
    Quote Quote  



Similar Threads