Hacker News new | ask | show | jobs
by buckleyc 1207 days ago
If you already have 'ffmpeg' (which he uses to convert the audio to .wav), then you could keep going and use this for most all the process. Looking at the related audio filters (i.e., -filter:audio, or -filter:a, or -af): - to remove silence : -af silenceremove=1:0:-50dB:detection=peak - to shorten duration : -af rubberband=tempo=4 - if you wanted to quickly/easily normailze the audio : -af loudnorm

This leads to: ffmpeg -i happy_book.mp3 -af loudnorm -af silenceremove=1:0:-50dB:detection=peak -af rubberband=tempo=4 happy_book_out.mp4

You could roll all those options into one filter command, but leaving like this for newer-users to digest. I also tend to re-encode using libfdk (though you need to be sure that your ffmpeg is compiled with this enabled) for a better mp4 (or .m4a or .m4b), so : ffmpeg -i happy_book.mp3 -af loudnorm -af silenceremove=1:0:-50dB:detection=peak -af rubberband=tempo=4 -c:a libfdk_aac happy_book_out.m4a