Follow

My cheap bluetooth headphones like to save energy on pauses, which turns listening to audiobooks (not all) into a test of nerves:)
A quick search for a way to add background noise to keep them awake with ffmpeg yielded no results: you can add sound to video, you can add video to sound, you can delete sound, you can delete video.
I'll look for more later, but for now there are other things to do.

· · Web · 2 · 0 · 1

@yrabbit

I think you want ffmpeg-filters rather than ffmpeg itself. For instance you can use 'amerge' to mix in noise generated by 'anoisesrc', both of which are explained in the ffmpeg-filters man page (along with several other ways of generating white noise).

Alternative I guess you could use 'silence-remove' to just eliminate the pauses!

@yrabbit

The way the options are laid out, it looks as though you could trim all silences long enough to pause your headphones to just shorter than the critical value. That should avoid weird pacing problems if you're listening to a story.

@yrabbit

From 'man ffmpeg-filters' :

stop_periods
Set the count for trimming silence from the end of audio. To remove silence from the middle of a file, specify a stop_periods that is negative. This value is then treated as a positive value and is used to indicate the effect should restart processing as specified by start_periods, making it suitable for removing periods of silence in the middle of the audio. Default value is 0.

@yrabbit

stop_duration
Specify a duration of silence that must exist before audio is not copied any more. By specifying a higher duration, silence that is wanted can be left in the audio. Default value is 0.

leave_silence
This indicates that stop_duration length of audio should be left intact at the beginning of each period of silence. For example, if you want to remove long pauses between words but do not want to remove the pauses completely. Default value is 0.

@publius

Thank you! Line for bulletproof pause cutting (I'm still experimenting to leave some pauses, but it's headphone-dependent😀 ):

ffmpeg -i Recursion.mp3 -af silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-50dB ~/tmp/Recursion.mp3

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko