4

I want to convert a lot of *.flac and some high bitrate *.mp3 files to *.m4a files. I want to use a fixed bitrate of 192kb (stereo) and want to keep the audiotags (except of, obviously, the tag "bitrate" - this sshould nbe set to the correct 192kb.).

I'm using 64-bit Maverick.

I tried about every program I could find.

Including

  • Sound Converter

  • soundKonverter (KDE)

  • WinFF

  • Arista Transcoder, Handbrake, Transmageddon (fails, seems only video works)

  • ffmpeg (tried "-acodec libfaac -ab 192k -map_meta_data outfile.m4a:infile.mp3")

But either they don't transfer the tags or they don't offer any way to set the bitrate to fixed 192kb or the resulting file doesn't show the new bitrate in any audio program (for example: nautilus saying "bitrate" n.a.")!

9
  • 4
    Would you please edit your question to list the programs from the Ubuntu repository that you've tried? That would help us narrow which apps to suggest (and even assist in crafting a script). Dec 22, 2010 at 3:16
  • Sry, you're right. I thought if anyone knows a working one we don't have to fiddle around with fixing my vain efforts ... but anyway: see above now. thx, p.
    – piedro
    Dec 22, 2010 at 10:19
  • 1
    Nautilus might just not know how to read the bitrate using gstreamer. Dec 22, 2010 at 11:59
  • @Nightwishfan: Maybe, but Amarok, banshee or guayadeque show "bitrate n.a." also ...
    – piedro
    Dec 22, 2010 at 15:19
  • 1
    @dkeikyb: sry I won't get into any discussion about my motivation. But: I never asked about mp3 to m4a. I ripped my cds in flac, I have some raw wavs, a few high quality mp3 (320kb, a bit too bloated considering file size) and some files in ape. 192kb m4a has good enough quality for our purposes, can be used by all our devices and don't worry, we won't transcode 128kb, 160kb or 192kb mp3 in 192kb m4a ...If you're really interested in why m4a (aac) might be superior to mp3 plz open a new thread. I guess you'll get a lot of lively discussion on that topic. cya
    – piedro
    Mar 5, 2011 at 21:49

2 Answers 2

5

I'd stick with ffmpeg. You weren't far off. Here's what I've just used to convert a load of 50-meg flacs to 5-meg m4as, complete with metadata:

find -name "*.flac" -exec ffmpeg -ab 192k -i "{}" -map_meta_data "{}.m4a":"{}" "{}.m4a" \;

You could expand that to clean up the original files or save them somewhere else (I was actually struggling with that bit).

For some reason, mine was crawling along at 190kbits/s so there might be a better encoding string (I should hope there is, this is a bit silly).

7
  • hi Oli! thx for your line here. If you're struggling with cleaning up - you can use winff and add your line (well parts of your line) as custom profile, winFF is a gui for ffmpeg I guess. Funny thing still, all my *.m4a (aac) files from different sources show a bitrate whith every program reading the tags. The ones I convert myself don't, it seems like ffmpeg doesn't write the tag "bitrate" and the music library managment programs don't compute and add them. Cause I share my music with my girlfriends ipod, apple desktop and ps3 over lan streaming I'd rather have the bitrate info in correct.
    – piedro
    Dec 23, 2010 at 8:24
  • To be precise: converting to other formats then aac ffmpeg writes a correct bitrate tag! (tested with mp3 ogg). It would be so nice if all devices could read ogg - I'd happily stick with that! Annoying ...
    – piedro
    Dec 23, 2010 at 8:28
  • Checking once more I found that nautilus shows the bitrate on different songs encoded with 192k *.m4a on other devices NOT by reading the "bitrate" tag - there is none set! So the gstreamer backend seems to be able to compute the bitrate showing values like "188k", "192k", "189k" - all around the 192k that programs claimed they encoded with.
    – piedro
    Dec 23, 2010 at 8:44
  • hi Oli! If I open the encoded files (your line or my line) doesn't matter! with the program "mediainfo" it computes a bitrate of 152k! So by telling ffmpeg to encode with 192k it seems to result in 152k bitrate ... wtf is going on?
    – piedro
    Dec 23, 2010 at 9:22
  • 2
    for multicore systems, try find . -name "*.flac" -print0 |xargs -r0I {} -P 6 ffmpeg -ab 192k -i "{}" -map_meta_data "{}.m4a":"{}" "{}.m4a": the -P argument is the number of concurrent jobs to run.
    – jmtd
    Jan 24, 2011 at 15:36
0

You can try this program, found in the medibuntu repository. It is command line, however it might be just what you need: http://packages.medibuntu.org/maverick/aacplusenc.html

It will probably only input wav files, otherwise your best option is soundconverter (which does not support fixed bitrate). Or a custom gstreamer pipline using gst-launch. http://linux.about.com/library/cmd/blcmdl1_gst-launch.htm

2
  • I tried your suggestion of using "aacplusenc". Could you give me an example? I get an error trying to set the bitrate to 192 AND it seems to only support a sample rate of 22050 ... The second option looks more promising but doesn't recognize "libfaac" or "faac" and I didn't get any conversion done at all. Could you give an example?
    – piedro
    Jan 6, 2011 at 0:33
  • Yes, to be honest it looks like the 64-bit build is flawed. I will try force installing the 32-bit to see if it is better. Edit: No dice, you would have to install 32-bit libs as well, and that just has too many potential downsides. Jan 7, 2011 at 15:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .