Thursday, February 22, 2024
 Popular · Latest · Hot · Upcoming
rated 0 times [  128] [ 0]  / answers: 1 / hits: 68994  / 2 Years ago, sat, january 8, 2022, 7:17:08

I'm looking for a well working audio converter which is able to convert audio files (ogg) to mp3 formate. I tried it with the "sound converter" from software center but it stopped converting after 6 of 12 files.

Can anybody here please help me?

More From » sound


I use ffmpeg for sound conversion:

ffmpeg -i file.ogg file.mp3
ffmpeg -i file.{ogg,mp3} # if only the extension changes

If your filename contains spaces don’t forget to quote it, e.g.:

ffmpeg -i "file with spaces".{ogg,mp3}

To perform batch processing you can either use a for loop like

for i in *.ogg; do ffmpeg -i "$i" "${i%.*}.mp3"; done

or – especially for many and/or large files! – GNU parallel:

parallel ffmpeg -i "{}" "{.}.mp3" ::: *.ogg

This last command will convert every .ogg file in the current directory to .mp3 efficiently using your CPU(s) to perform multiple tasks in parallel.

To set the audio bitrate ffmpeg provides the -b:a BITRATE option, e.g. -b:a 192k.
If you want to include metadata like title, album and so on, you can use these options:

-map_metadata 0:s:0 -id3v2_version 3 -write_id3v1 1

See man ffmpeg and this post for further information.

[#26208] Sunday, January 9, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 110
Total Questions: 109
Total Answers: 100

Location: Mayotte
Member since Mon, Sep 12, 2022
1 Year ago