[FFmpeg-user] ffmpeg convert mp3 to opus codec (contained in ogg format)?

Reino Wijnsma rwijnsma at xs4all.nl
Thu Jul 18 16:05:00 EEST 2019

On 18-7-2019 14:37, Robert Keir <robertk at smithpower.co.za> wrote:
> I need to convert an MP3 to OGG (opus codec). I need to execute this (below)
> in PHP.
> ffmpeg -i filename.mp3 c:a libopus newfilename.ogg
> Is this correct?

Except for the dash you forgot ( -c:a libopus) this is indeed a very basic conversion to opus.

In general converting a lossy format to another (mp3 to opus) is frowned upon.
It's recommended to convert the original lossless format (wav, flac, etc) if you still have it.

-- Reino

More information about the ffmpeg-user mailing list