Audio Conversion, Thought?

The place to sound off on all things related to audio, from sound cards to speakers.

Moderator: Captain Ned

Audio Conversion, Thought?

Postposted on Thu Oct 18, 2012 7:41 pm

This is my sad attempt at learning through trial and error. Forgiveness please.

I know next to nothing about audio/visual recording and playback. But I usually find myself needing to convert mp4 videos into some sort of playable audio format with a low[er] footprint. I've been just converting them to mp3s with this software http://ffmpeg.mplayerhq.hu/ and it's done a pretty good job at giving me clear audio close to the original on my audio in the video. I have no idea how much my sound card http://www.newegg.com/Product/Product.aspx?Item=N82E16829132020&Tpk=xonar%20dg) plays into this process, and I always assumed my speakers were of acceptable quality, though I personally have a hateful relationship with them http://www.newegg.com/product/product.aspx?Item=N82E16836116120

Today I thought I'd try a few different formats (flac vs aac vs mp3) to hear what the differences in the quality and see what the differences in file sizes were. On three different videos I converted, flac was the clearest to the original quality but the file size was enormous (56MB vs 23MB). mp3 and aac both times came out to about the same size with mp3 being slightly smaller (1.8MB vs 1.81MB). But to my surprise mp3 had a much, much better quality to it vs the aac. I don't know if it was because of the converter I used, but I was always under the assumption that aac was a superior audio quality.

Discuss?
dashbarron
Gerbil Team Leader
Gold subscriber
 
 
Posts: 205
Joined: Tue Aug 11, 2009 8:49 am

Re: Audio Conversion, Thought?

Postposted on Thu Oct 18, 2012 8:00 pm

Unless you're just playing the video normally and recording the output of the sound card, the sound card should have zero effect on the quality of the audio conversion.

FLAC should be the clearest, as the "L" in FLAC stands for "lossless". It provides an exact reproduction of whatever you encode with it, so in this case you are avoiding the cumulative errors that occur when transcoding from one lossy format to another. As you've discovered, this comes at a price -- FLAC files are quite large compared to the files produced by "lossy" codes (typical FLAC size compression is only 2:1 versus an uncompressed WAV file).

I'm surprised that MP3 sounds better than AAC. AAC is a newer format, which theoretically provides better fidelity than MP3 at a given bitrate. The best explanation I can come up with is that MP3 has the advantage of maturity. The LAME MP3 encoder has been undergoing continuous refinement for over a decade, and has gotten very good at squeezing every last drop of fidelity out of what is now a legacy audio compression format.

If all the devices you want to play the files on support OGG format, you may want to give that a try as well. I find it generally provides slightly better fidelity than MP3 at a given bitrate. (OGG support on portable devices is somewhat spotty; decent OGG support is one of the reasons I am a big fan of Sansa's portable music players.)
(this space intentionally left blank)
just brew it!
Administrator
Gold subscriber
 
 
Posts: 37639
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: Audio Conversion, Thought?

Postposted on Thu Oct 18, 2012 8:38 pm

It seems to me there's no reason for you to convert the audio stream at all. Converting to FLAC will result in the exact same audio quality as before, but it adds unnecessary size to the file. Most MP4 videos will have an AAC audio stream already, so all you need to do is extract the audio stream from the original file and repack it into an MP4 or M4A without the video stream. Your end result will be a much smaller MP4 or M4A file with the original, untouched AAC audio stream left intact.

This can be done with a program like YAMB. If using YAMB, just go to the "Editing" section and then double-click "Click to extract streams from...," choose your input file, choose the desired audio stream, and under options tell YAMB to "Excract to MP4." If you need it to be an M4A file for some reason, you just have to rename it.

Edit: I started playing around with FFMPEG and it appears you can accomplish the same thing with the following command:
Code: Select all
ffmpeg -i [input.mp4] -vn -codec copy [output.m4a]

-vn tells ffmpeg to discard the video, and -codec copy tells it to copy streams rather than transcode them.
Last edited by AustinW on Thu Oct 18, 2012 9:39 pm, edited 1 time in total.
AustinW
Gerbil
 
Posts: 23
Joined: Sat Nov 24, 2007 3:19 pm

Re: Audio Conversion, Thought?

Postposted on Thu Oct 18, 2012 9:16 pm

Austin is on point. The only reason to convert to mp3 would be for compatibility purposes, but most players, as far as I know, should play mp4 containers. Extracting the audio stream, as he recommends, and not re-encoding them, will give you the best quality.

And as far as lossless goes, there is some argument that it is getting more and more unnecessary to depend on it to achieve optimal sound fidelity. First, as mp3/ogg/apple compression algorithms get better, the differences between, say a 256k lossy file and, say, FLAC, becomes more and more esoteric.

Secondly, there are apparently some cases where, say, the 256k encoded music you get directly from iTunes may even give you better fidelity than buying the CD and ripping to FLAC or other losseless formats. Apparently, this is because iTunes (and maybe some other stores) get at least some of their music content from higher quality/bitrate masters (from which a CD is also made). Now, if iTunes would use lossless codecs to begin with, this would be even better... One can dream.
cynan
Gerbil Elite
Gold subscriber
 
 
Posts: 812
Joined: Thu Feb 05, 2004 2:30 pm

Re: Audio Conversion, Thought?

Postposted on Sun Oct 21, 2012 9:57 pm

AustinW wrote:
This can be done with a program like YAMB. If using YAMB, just go to the "Editing" section and then double-click "Click to extract streams from...," choose your input file, choose the desired audio stream, and under options tell YAMB to "Excract to MP4." If you need it to be an M4A file for some reason, you just have to rename it..


Sweet. I was always wondering if I could just pull the audiostream out of the mp4s but didn't know if it was easily doable. I'll play around this and see where I end up.

cynan wrote:
And as far as lossless goes, there is some argument that it is getting more and more unnecessary to depend on it to achieve optimal sound fidelity. First, as mp3/ogg/apple compression algorithms get better, the differences between, say a 256k lossy file and, say, FLAC, becomes more and more esoteric.

Secondly, there are apparently some cases where, say, the 256k encoded music you get directly from iTunes may even give you better fidelity than buying the CD and ripping to FLAC or other losseless formats. Apparently, this is because iTunes (and maybe some other stores) get at least some of their music content from higher quality/bitrate masters (from which a CD is also made). Now, if iTunes would use lossless codecs to begin with, this would be even better... One can dream.


I...sort of understand this. I know that if I drop below 192k~ with MP3s I can notice the difference, and iTunes uses ...128(?) AACs...which do sound the same/better than MP3s of my own at 256k bitrate--this master CD business sounds right. But if iTunes used a loseless codec to begin--like FLAC-- wouldn't the file sizes be unreasonably high for their low-capacity music device? And then wouldn't the people revolt? ...Oh, I see what I did there.
dashbarron
Gerbil Team Leader
Gold subscriber
 
 
Posts: 205
Joined: Tue Aug 11, 2009 8:49 am

Re: Audio Conversion, Thought?

Postposted on Sun Oct 21, 2012 10:07 pm

I just tried extracting with two songs I had originally discussed in my experiment. The output mp4 was slightly higher and the quality was a wash. If anything, I could detect a slightly greater..."depth/volume/clarity" to the instrumentals, but I can't honestly say I would detect it on a blind test.

But I'll stick with this process for awhile and try some samples occasionally of both.

Cheers :)
dashbarron
Gerbil Team Leader
Gold subscriber
 
 
Posts: 205
Joined: Tue Aug 11, 2009 8:49 am


Return to Echo Vale

Who is online

Users browsing this forum: No registered users and 1 guest