Page 1 of 1

Transcoding high bitrate ALAC > MP3

PostPosted: Sat Apr 16, 2011 6:21 pm
by jhwalker
I have a large number of high bitrate (e.g., 88.2 / 24, 96k / 24, 176.4k / 24, 192k / 24, etc.) ALAC (Apple Lossless) files in my iTunes library I'd like to be able to stream when I'm out of town for business.

I've gotten this to work with this one-step transcode entry:

ffmpeg -i %s -acodec libmp3lame -ab %bk -f mp3 -

and it works great for ALAC files *up to* 48k / 24. For any files above that, it plays back at (sounds like) 1/4 speed.

It appears ffmpeg is misreading (or simply doesn't support?) bitrates higher than 48k. Any ideas on how to get this to work with higher-rate ALAC files?

PostPosted: Sun Apr 17, 2011 1:24 am
by GJ51
Step 1: ffmpeg -i %s -v 0 -f wav -

Step 2: lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -

Works with flac > mp3, might be worth a try.

PostPosted: Sun Apr 17, 2011 2:05 am
by jhwalker
GJ51 wrote:Step 1: ffmpeg -i %s -v 0 -f wav -

Step 2: lame -b %b --tt %t --ta %a --tl %l -S --resample 44.1 - -

Works with flac > mp3, might be worth a try.


This is the default transcode for all codecs, but it doesn't work for ALAC, unfortunately.

RESOLVED: Transcoding high bitrate ALAC > MP3

PostPosted: Sun Apr 17, 2011 3:47 pm
by jhwalker
jhwalker wrote:I have a large number of high bitrate (e.g., 88.2 / 24, 96k / 24, 176.4k / 24, 192k / 24, etc.) ALAC (Apple Lossless) files in my iTunes library I'd like to be able to stream when I'm out of town for business.

I've gotten this to work with this one-step transcode entry:

ffmpeg -i %s -acodec libmp3lame -ab %bk -f mp3 -

and it works great for ALAC files *up to* 48k / 24. For any files above that, it plays back at (sounds like) 1/4 speed.

It appears ffmpeg is misreading (or simply doesn't support?) bitrates higher than 48k. Any ideas on how to get this to work with higher-rate ALAC files?


UPDATE:

I was able to get this working by using a third-party transcoding tool, XLD:

http://tmkk.pv.land.to/xld/index_e.html

NOTE: Requires a special build to support output to stdout - you can request this from the developer.

Even after getting XLD working, I was unable to complete the transcode to MP3 using LAME, for some reason. I finally wound up doing the transcode to MP3 using ffmpeg + the call to the libmp3lame codec.

So the final transcode entry looks like this:

Step 1: xld %s --stdout
Step 2: ffmpeg -i - -acodec libmp3lame -ab %bk -f mp3 -

This works with all bitrates I've tried, as XLD correctly does the initial transcode.

Thanks to everyone for your help!

How about AAC and ALAC at the same time?

PostPosted: Mon Apr 25, 2011 9:06 pm
by Boomschlager
So how would you playback AAC and ALAC at the same time, considering they both use .m4a

Is it possible to rename the ALAC file to .alac, or AAC to .aac

I don't think you can have a transcoding setting like this:
m4a > mp3
aac > mp3
alac > mp3

Does Subsonic open each .m4a file and detect ALAC or AAC?

Re: How about AAC and ALAC at the same time?

PostPosted: Tue Apr 26, 2011 2:04 pm
by jhwalker
Boomschlager wrote:So how would you playback AAC and ALAC at the same time, considering they both use .m4a

Is it possible to rename the ALAC file to .alac, or AAC to .aac

I don't think you can have a transcoding setting like this:
m4a > mp3
aac > mp3
alac > mp3

Does Subsonic open each .m4a file and detect ALAC or AAC?


Drat :?

You're right - it is just looking at the file extension and XLD doesn't decode lossy formats like AAC. So I'm stuck with turning the transcode entry on / off within my player to play either Apple Lossless or AAC files.

I guess I could set up another player (i.e., one with the transcode entry "on" and one with it "off"), but it's just as easy / difficult to turn it off on the fly.

Wish I could find a "one size fits all" transcode entry. I guess I could just convert all my AACs to ALAC ;) but then I'd suddenly be short of disk space :roll:

So this is a problem for about 3800 of my 43000 tracks :cry:

Re: Transcoding high bitrate ALAC > MP3

PostPosted: Wed Aug 24, 2011 11:33 am
by spectral7
I had the exact problem as you. To solve it, I downloaded and built the latest version of both lame and ffmpeg and then created a soft link to them in the /Library/Application Support/Subsonic/transcode (I renamed the old versions in this directory first). Here are instructions for building lame and ffmpeg (assuming you are on OSX):

http://stephenjungels.com/jungels.net/a ... howto.html

Here are the versions that I'm using with good results:

lame: 3.98.4
ffmpeg: 0.8.2

Hope this helps,
Jason