Transcoding high bitrate ALAC > MP3

Need help? Post your questions here.

Moderator: moderators

Transcoding high bitrate ALAC > MP3

Postby jhwalker » Sat Apr 16, 2011 6:21 pm

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?
jhwalker
 
Posts: 4
Joined: Sat Apr 16, 2011 3:07 pm

Postby GJ51 » Sun Apr 17, 2011 1:24 am

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.
Gary J

http://bios-mods.com
http://www.maplegrovepartners.com
http://theaverageguy.tv/category/tagpodcasts/cyberfrontiers/
User avatar
GJ51
 
Posts: 3492
Joined: Wed Oct 20, 2010 11:58 pm
Location: Western New York

Postby jhwalker » Sun Apr 17, 2011 2:05 am

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.
jhwalker
 
Posts: 4
Joined: Sat Apr 16, 2011 3:07 pm

RESOLVED: Transcoding high bitrate ALAC > MP3

Postby jhwalker » Sun Apr 17, 2011 3:47 pm

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!
jhwalker
 
Posts: 4
Joined: Sat Apr 16, 2011 3:07 pm

How about AAC and ALAC at the same time?

Postby Boomschlager » Mon Apr 25, 2011 9:06 pm

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?
Boomschlager
 
Posts: 1
Joined: Mon Apr 25, 2011 8:59 pm

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

Postby jhwalker » Tue Apr 26, 2011 2:04 pm

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:
jhwalker
 
Posts: 4
Joined: Sat Apr 16, 2011 3:07 pm

Re: Transcoding high bitrate ALAC > MP3

Postby spectral7 » Wed Aug 24, 2011 11:33 am

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
spectral7
 
Posts: 1
Joined: Wed Aug 24, 2011 11:26 am


Return to Help

Who is online

Users browsing this forum: No registered users and 22 guests