Can subsonic transcode to AAC for Android client?

Need help? Post your questions here.

Moderator: moderators

Can subsonic transcode to AAC for Android client?

Postby djbloc1 » Tue Aug 31, 2010 9:50 am

Hello,

I'm excited as subsonic could be just what I'm looking for. I have a collection of music files in different formats - mainly MP3 on a Atom PC that acts as my music server in the home for my Squeezebox Duet. This works great for the hifi but I would love to play music when I'm on the move.

I recently purchased a HTC Desire (Android 2.2). Can subsonic transcode my music files into AAC format (on a Ubuntu 10.04 Linux Atom PC) and stream them to the Android client?

If so, can you point me to some instructions on how to set it up.

Why AAC? I've done some tests playing back MP3s on the Desire. You need a quite a high bitrate (128k+) to get any reasonable audio quality. To my ears you can get a similar quality on AAC for around 96k. That works out as a healthy saving on my mobile monthly data plan.

Thanks
djbloc
djbloc1
 
Posts: 3
Joined: Tue Aug 31, 2010 9:36 am

Postby delcypher » Tue Aug 31, 2010 10:55 am

I'm afraid this currently isn't possible.

The Android OS supports AAC (see http://developer.android.com/guide/appe ... rmats.html) in various flavours but only in the 3gp/mp4 container (if it supported raw AAC then it would be possible).

But there appears to be no transcoder that supports writing AAC audio to an mp4 container to standard output (I believe this to be because the transcoders need non-seekable output - this is ffmpeg's error message anyway). I've tried quite a few

* ffmpeg
* Nero AAC encoder
* enc_aacPlus.exe
* faac

and those these can't do it if you try to pipe to standard output.

If your audio is already AAC encoded and in a mp4/3gp container then you can stream in straight to the android client (i.e. you do no transcoding) and that works fine.

Sorry. I can offer several possible alternatives though...

Read lame's options (run lame --longhelp | less)

You could try using variable bit rate encoding to make better use of your bandwidth.

The android client also works fine when transcoding to Ogg Vorbis. Maybe you might have more luck with that.
See my wiki post

http://sourceforge.net/apps/mediawiki/subsonic/index.php?title=Transcoders#Transcoding_to_Ogg_Vorbis[/url]
Last edited by delcypher on Sat Sep 04, 2010 5:03 pm, edited 1 time in total.
delcypher
 
Posts: 109
Joined: Tue Jun 01, 2010 10:39 am

Postby djbloc1 » Sat Sep 04, 2010 4:00 pm

Thanks delcypher for the detailed post. It never dawned on me before to consider Ogg. I gave it a go and was surprised how good the audio quality was.

An alternative method for transcoding is the use of the quality setting (-aq) instead of using bitrate (-ab). I used the following command to transcode:

ffmpeg -i <input.mp3> -acodec libvorbis -aq 3 -f ogg <output.ogg>

Ogg Average Bitrate for a 320kbps MP3 based on quality setting:
-aq 1 - 74 kbps
-aq 2 - 86 kbps
-aq 3 - 99 kbps

Using -aq 3 was good through my headphones on the HTC Desire. Would easily recommend it to others and it seems as efficient (in terms of filesize) as AAC.

From http://www.vorbis.com/faq/#quality

What does the “Quality” setting mean?
Vorbis' audio quality is not best measured in kilobits per second, but on a scale from -1 to 10 called "quality". This change in terminology was brought about by a tuning of the variable-bitrate algorithm that produces better sound quality for a given average bitrate, but which does not adhere as strictly to that average as a target.

This new scale of measurement is not tied to a quantifiable characteristic of the stream, like bitrate, so it's a fairly subjective metric, but provides a more stable basis of comparison to other codecs and is relatively future-proof. As Segher Boessenkool explained, “if you upgrade to a new vorbis encoder, and you keep the same quality setting, you will get smaller files which sound the same. If you keep the same nominal bitrate, you get about the same size files, which sound somewhat better.” The former behavior is the aim of the quality metric, so encoding to a target bitrate is now officially deprecated for all uses except streaming over bandwidth-critical connections.

For now, quality 0 is roughly equivalent to 64kbps average, 5 is roughly 160kbps, and 10 gives about 400kbps. Most people seeking very-near-CD-quality audio encode at a quality of 5 or, for lossless stereo coupling, 6. The default setting is quality 3, which at approximately 110kbps gives a smaller filesize and significantly better fidelity than .mp3 compression at 128kbps.

As always, if you need CD-quality sound, neither Vorbis nor MP3 (nor any other lossy audio codec) can provide exact reproduction; instead, consider using a lossless audio compression scheme like FLAC.
djbloc1
 
Posts: 3
Joined: Tue Aug 31, 2010 9:36 am


Return to Help

Who is online

Users browsing this forum: No registered users and 23 guests