1

I used the silencedetect of ffmpeg with noise value of -30dB to get the silent parts of a small video file & used those timestamps to trim(remove) & re-encode the silent parts of the video.

I had used the audio peak meter in Shotcut(a video editor software) to see that anything below -30dB can be considered as silence.

When I opened the re-encoded output video file in Shotcut, I saw that there were still some sections of video that were below -30dB which must have been removed by the silenceremove method(these were also longer in duration than the silence duration value I had into ffmpeg).

On closer inspection, I realized that the audio peak meter shown in Shotcut measures in dBFS & the noise value I entered in ffmpeg is in dB.

My knowledge of audio signal is very basic & hence I looked up what's dBFS. I understood that dBFS stands for dB Full Scale & is somehow related to the maximum possible volume in a WAV format.

My question is, how to pass the value in dBFS to ffmpeg instead of in dB? I checked the ffmpeg documentation & it does not say that we can pass values in dBFS.

OR

If there is any method to get the relation between the dBFS value in the video file and the dB value that must be entered into the ffmpeg command, that would also be helpful.

2
  • According to this question the silencedetect command only detects silence and doesn’t remove it. See these answers stackoverflow.com/questions/25697596/… Feb 20 at 8:27
  • Yes, Thankyou @Timinycricket. But I never I said I used silencedetect to directly trim the silent portions. I used it to get the timestamps of the silent portions & then used a second ffmpeg command to trim the silent portions.
    – icyGuy
    Feb 22 at 12:42
2

The trouble is, there's no such thing as 'dB'… well, of course there is but dB on its own is a measure of relative loudness, not absolute.

See https://en.wikipedia.org/wiki/Decibel#Suffixes_and_reference_values for just how many flavours of dB there are.

Internally for an audio app, dBFS could be argued as being the only sensible scale to use, as we're up against a digital audio structure in which 0dBFS is "all the ones". Floating point audio can exceed this, but not fixed point.

FFmpeg themselves don't seem to use any rational value, just this open concept of "dB" - see https://trac.ffmpeg.org/wiki/AudioVolume

All you could assume is that they do mean dBFS, but your -30 value is a bit high. "Silence" is considered to be -60. I'm not sure there's a lot you can do except experiment.
This is the kind of task I'd be doing 'live' in a DAW or video editor, so I could hear the result as I tweaked the values.

2
  • Thanks @Tetsjin. For the video I tested it upon, -30dB entered into the ffmpeg command was able to trim silent portions, but I felt the value was a bit less. As in I wanted more of the audio to be trimmed rather than less which would have been the case if I had entered -60dB instead. Anyway, I read somewhere that ffmpeg audio aspects have been referenced from the sox utility. If we can comprehend how sox interprets dB parameters, maybe that will solve the dilemma about ffmpeg too. But the docs for sox seem too complicated for me to understand.
    – icyGuy
    Feb 22 at 12:50
  • Sorry, both ffmpeg & sox are way outside my area of expertise. I'd never dream of using a CLI tool to do an audio job ;) I like to be able to see & hear what I'm doing as I do it.
    – Tetsujin
    Feb 22 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.