Ffmpeg commands for audiofile conversion to ulaw/alaw, g722, opus

Hi All,

I’m setting up one of my systems to support 3 audio codecs natively: (ulaw/alaw, g722, opus). I crafted some ffmpeg commands to convert files to the appropriate codecs. I’m moving away from sox. They’re working great for me so far. I thought I’d share them.

However, if anyone has any critiques for the commands/audiofile formats, I appreciate it. Feel free to try them out as well and let me know if you run into any issues!

## ULAW/ALAW
ffmpeg -i <any_file> -ar 8000 -ac 1 -acodec pcm_s16le -f s16le Output.sln

## OPUS
ffmpeg -i <any_file> -map_metadata -1 -ar 48000 -b:a 64k -ac 1 -acodec libopus -f opus Output.opus

## G722
ffmpeg -i <any_file> -ar 16000 -acodec g722 -b:a 64k Output.g722

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.