Convert audio file into smaller file for podcast / voice

Elvis Ciotti
2 min readJun 26, 2024

--

ffmpeg command to compress to OGG mono channel

Convert first 60 seconds using this command

ffmpeg -i input.m4a -vn -c:a libopus -b:a 64k -ac 1 -t 60 sample.ogg

Adjust the bitrate e.g. to 48k or 96k if the quality seems too low. When you are happy and you wish to convert the whole file, relaunch without the -t 60

Explanation (chatGPT)

Input and Output:

  • -i input.m4a: This specifies the input file as "input.m4a". Replace this with the actual filename and extension of your podcast file.
  • output.ogg: This sets the name of the output file as "output.ogg". You can choose any desired filename with the .ogg extension, which indicates the Ogg Vorbis container format.

Processing Options:

  • -vn: This option tells ffmpeg to discard any video stream present in the input file. Podcasts typically don't contain video, so this saves processing time and output file size.
  • -c:a libopus: This specifies the audio codec to be used for the output file. Here, libopus indicates the Opus codec, a good choice for compressing voice content at lower bitrates while maintaining quality.
  • -b:a 64k: This sets the audio bitrate to 64 kilobits per second (kb/s). This is a common bitrate for voice-focused audio, like podcasts, as it offers a balance between file size and audio quality. You can experiment with different bitrates (e.g., 96 kb/s for slightly better quality) to suit your needs.
  • -ac 1: This forces the output audio to be mono (single channel). Podcasts are often recorded in stereo (two channels), but converting to mono can significantly reduce the file size without a significant impact on the spoken content's intelligibility.
  • -t 60: This limits the output to the first 60 seconds of the audio stream using the -t option. The value following -t specifies the duration in seconds. In this case, it extracts only the first minute of your podcast.

--

--

Elvis Ciotti
Elvis Ciotti

Written by Elvis Ciotti

Software Contractor — Java, Spring, k8s, AWS, Javascript @ London - hire me at https://elvisciotti.github.io/

No responses yet