This show has been flagged as Clean by the host.
In this episode Kevie does a step-by-step approach to record an episode of HPR using the FFMPEG tool on the Linux command line.
Before beginning please ensure that FFMPEG is installed, it is available in the vast majority of Linux repositories.
Start by making a new folder to keep all your files in and move into the new folder (these will be numerous by the end of your recording):
mkdir Podcast cd Podcast
To start recording audio use the command:
ffmpeg -f pulse -i default file01.flac
and finish the recording by pressing ctrl+c. I would recommend recording a test piece of audio to ensure that you are recording from your desired microphone and that the levels are to your liking.
To listen to the audio file we use ffplay:
ffplay file01.flac
Once all of the files have been recorded, to reduce the need for editing I would recommend recording several short segments, we need to put these together using:
ffmpeg -i file01.flac -i file02.flac -i file03.flac -i file04.flac -i file05.flac -filter_complex "[0:a][1:a][2:a][3:a][4:a]concat=n=5:v=0:a=1" filedone.flac
Not that the number of sets squared brackets [] should be the same as the number of files (these start at zero) and the number after n= should be the actual number of files you wish to combine.
To remove any extended periods of silence then we can use:
ffmpeg -i filedone.flac -af silenceremove=stop_periods=-1:stop_duration=1:stop_threshold=-45dB filefinished.flac
Please note that this is a bit flaky at the time of recording (my results have been mixed) and it will re-encode the audio file so never do this with a lossy file such as ogg or mp3 as this will reduce the quality, keep this for lossless versions such as flac or wav files.
If you want to spend a bit more time editing the files and getting a better final audio file then the most effective way (but not quick) is to trim the audio from the end and beginning. Listen to the audio files and note the times of any periods of silence. As these normally are at the beginning and end, especially when we are recording in short segments then I will limit the instructions to avoid these becoming silly in length.
Firstly clip off the end silences first, if you start with the beginning then it will change the starting position of the end silences. To remove audio from the end of a track use:
ffmpeg -i file01.flac -vn -acodec copy -to 00:01:30 file01cut.flac
In this example anything after 1 minute and 30 seconds will be removed. The edited audio file will then be saved as file01cut.flac. This method does not re-encode the audio so there is no loss of quality.
To remove audio from the start of a track use:
ffmpeg -ss 30 -i file01.flac -c copy file01cut.flac
In the above example the first 30 seconds of the file will be removed and saved as file01cut.flac
Once you have edited each audio file then they will need to be merged together again to make a complete show.
Unless otherwise stated, our shows are released under a Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) license.
The HPR Website Design is released to the Public Domain.