Recherche avancée

Médias (0)

Mot : - Tags -/masques

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (50)

Sur d’autres sites (9112)

  • How to detect the silence at the end of an audio file ?

    1er janvier 2024, par Ali Akber

    I am trying to detect silence at the end of an audio file.
    
I have made some progress with ffmpeg library. Here I used silencedetect to list all the silences in an audio file.

    



    ffmpeg -i audio.wav -af silencedetect=n=-50dB:d=0.5 -f null - 2> /home/aliakber/log.txt


    



    Here is the output of the command :

    



    —With silence at the front and end of the audio file—

    



    [silencedetect @ 0x1043060] silence_start: 0.484979
[silencedetect @ 0x1043060] silence_end: 1.36898 | silence_duration: 0.884
[silencedetect @ 0x1043060] silence_start: 2.57298
[silencedetect @ 0x1043060] silence_end: 3.48098 | silence_duration: 0.908
[silencedetect @ 0x1043060] silence_start: 4.75698
size=N/A time=00:00:05.56 bitrate=N/A


    



    —Without silence at the front and end of the audio file—

    



    [silencedetect @ 0x106fd60] silence_start: 0.353333
[silencedetect @ 0x106fd60] silence_end: 1.25867 | silence_duration: 0.905333
[silencedetect @ 0x106fd60] silence_start: 2.46533
[silencedetect @ 0x106fd60] silence_end: 3.37067 | silence_duration: 0.905333
size=N/A time=00:00:04.61 bitrate=N/A


    



    But I want something more flexible so that I can manipulate the output and do further task depending on the result.
    
I want to get the output something like true or false. If there is a certain period of silence exists at the end of the audio file it will return true and false otherwise.

    



    Can someone suggest me an easy way to achieve this ?

    


  • aacdec : Lower the number of frames required to detect ADTS

    11 mars 2014, par Martin Storsjö
    aacdec : Lower the number of frames required to detect ADTS
    

    For live audio streams, requiring 500 frames for a stream to
    be detected is a bit overkill.

    This allows live ADTS streams that don’t start nicely at
    a frame boundary to start up more quickly, e.g.
    http://mp3.streampower.be/radio1.aac.

    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DBH] libavformat/aacdec.c
  • avutil/intmath : use AV_HAS_BUILTIN to detect builtin availability

    31 mars, par Kacper Michajłow
    avutil/intmath : use AV_HAS_BUILTIN to detect builtin availability
    

    Fixes use of bultins on clang x86_64-pc-windows-msvc which does not
    define any __GNUC__. Also on other targets __GNUC__ is defined to 4 by
    default, so any feature testing based on version is not really valid.

    Signed-off-by : Kacper Michajłow <kasper93@gmail.com>
    Signed-off-by : Martin Storsjö <martin@martin.st>

    • [DH] libavutil/intmath.h
    • [DH] libavutil/x86/intmath.h