TOOL » FFMPEG » AUDIO
Raw
Sample formats
Get a list of supported sample formats with:
shell
ffmpeg -formats | grep PCMRaw encode
Specify the sample format -f and the respective codec.
shell
ffmpeg -f pulse -i recording.monitor -ac 2 -f s16le -acodec pcm_s16le audio.rawRaw decode
As the data is raw, you need to specify the audio information manually.
- Choose the same sample format
-fas recorded - Set the audio frequency
-arin Hz as shown when recording - Set the number of channels
-acas recorded
shell
ffmpeg -f s16le -ar 48000 -ac 2 -i audio.raw raw_to_opus.opus