Apple Lossless and iSub

Need help? Post your questions here.

Moderator: moderators

Apple Lossless and iSub

Postby ktucker » Sun Apr 25, 2010 10:06 am

OK. I know the answer is somewhere around here but I cannot find it. I am using the iPhone app iSub to connect to the Subsonic server. It connects fine and I can play any song except for Apple Lossless encoded songs. If I select an album that was encoded with Apple Lossless it will list the songs (but not the album cover) and I can tap on the song to play but then it just starts going through the list of the songs on the album and it will not play any of them. It just jumps from one song to the next without playing them until it reaches the end of the album. Any other bitrate and mp3 song plays fine. Only Apple Lossless exhibits this problem with the iSub iPone app. I have donated and I like the service but if I cannot play Apple Lossless songs on my iPhone then I will have to look elsewhere as much of my collection is Apple Lossless. Any solutions to this problem? Thanks in advance....

--Kevin--
ktucker
 
Posts: 2
Joined: Sun Apr 25, 2010 9:57 am

Postby mjones73 » Sun Apr 25, 2010 1:42 pm

My guess would be Subsonic is trying to transocde them and the decoder used for .m4a files can't handle Apple Lossless format.

From what I've read Apple has never released the specs on the format so it's been difficult to build a decoder. I did find this one site where this guy reversed engineered one.

http://craz.net/programs/itunes/alac.html

What OS are you running your Subsonic server on?
mjones73
 
Posts: 35
Joined: Sat Apr 24, 2010 11:08 pm

Re: Apple Lossless and iSub

Postby einsteinx2 » Sun Apr 25, 2010 4:41 pm

ktucker wrote:OK. I know the answer is somewhere around here but I cannot find it. I am using the iPhone app iSub to connect to the Subsonic server. It connects fine and I can play any song except for Apple Lossless encoded songs. If I select an album that was encoded with Apple Lossless it will list the songs (but not the album cover) and I can tap on the song to play but then it just starts going through the list of the songs on the album and it will not play any of them. It just jumps from one song to the next without playing them until it reaches the end of the album. Any other bitrate and mp3 song plays fine. Only Apple Lossless exhibits this problem with the iSub iPone app. I have donated and I like the service but if I cannot play Apple Lossless songs on my iPhone then I will have to look elsewhere as much of my collection is Apple Lossless. Any solutions to this problem? Thanks in advance....

--Kevin--


That's unfortunately one of the problems with Apple Lossless. Because it's a closed implementation by Apple there is no open encoder and decoder for it to allow Subsonic to transcode this format.

That link posted by mjones73 looks promising. I downloaded the latest version of the code that was posted and compiled a binary for OS X which I have uploaded here: http://einsteinx2.com/projects/isub/alac.zip

I noticed on my Ubuntu machine that there is a package called alac-decoder in the repositories which appears to be a Linux build of the same program.

I did a quick look for a Windows build but couldn't find one of the newest version. I will try to get it compiled a uploaded later today.

All you should need to do is copy the alac file to your transcode directory (library/application support/subsonic/trancode on mac, /var/subsonic/transcode on linux) and then go to settings at the top of Subsonic and click the Transcoding tab. In step 1 of the m4a > mp3 line, replace what's in the box with "alac" no quotes. That should work. Sorry it's the weekend and I have prior engagements, so I'll have to work on this more later (hopefully tonight, if not tomorrow). But hopefully this helps.
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

iSub Not Wokring With Apple Lossless Files

Postby ktucker » Sun Apr 25, 2010 5:07 pm

I am using Windows Home Server (a subset of Windows 2003 Server) as the OS for the Subsonic server. I think I may just be out of luck and the Subsonic / iSub streaming solution will not work for me. I do not regret donating to your worthy cause as it is a great effort that will work for most people - just not me. Since Simplify Media is going out of business (and the Apple lossless worked with that server) there is now no streaming solution that I can find for my particular set of circumstances. I will continue to follow this thread but I have no hope that anything will work. Thanks for looking into this for me Ben....

--Kevin--
ktucker
 
Posts: 2
Joined: Sun Apr 25, 2010 9:57 am

Postby mjones73 » Sun Apr 25, 2010 5:16 pm

It will work for you if you can find the proper decoder to transcode apple lossless...

By the way, I believe this is the latest windows executable of the decoder you need, unzip it and put it in c:\subsonic\transocode on your homeserver.

http://www.rarewares.org/files/lossless ... eneric.zip or if you have a P4 in your home server http://www.rarewares.org/files/lossless/alac_p4.zip

Follow einsteinx2's steps for changing the transcode settings to use it.
mjones73
 
Posts: 35
Joined: Sat Apr 24, 2010 11:08 pm

Postby einsteinx2 » Sun Apr 25, 2010 6:18 pm

Thanks mjones! Yes this should work fine I just didn't have a windows binary to post this morning. The one you posted should work fine. Subsonic is very flexible, as long as you have a command line utility to decode an audio file then it should at least be playable. I believe it should even be able to read the tags because they are the same as AAC m4a tags. If it's having trouble reading the album art, there is a feature in Subsonic to download missing album art. It's in the settings page.

Hope this works out for you. I'll do some testing with apple lossless files when I'm back around a computer (posting from my iPhone).
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

Postby mjones73 » Sun Apr 25, 2010 6:23 pm

My only question since I'm not totally familiar with apple's codecs is will that work with non lossless files or do they use a different file extension?
mjones73
 
Posts: 35
Joined: Sat Apr 24, 2010 11:08 pm

Postby einsteinx2 » Sun Apr 25, 2010 7:48 pm

mjones73 wrote:My only question since I'm not totally familiar with apple's codecs is will that work with non lossless files or do they use a different file extension?


I believe they do use the same m4a extention so that may cause some problems because I think that alac decoder does lossless files only.

It's a bit frustrating that after digging into this a bit more on google, it seems ffmpeg (the program used for m4a transcoding now) can encode apple lossless but not decode it :(

Unfortunately it looks like it may be a choice between apple lossless files or aac for now...

I'll see if I can dig into the ffmpeg source code and possibly add the alac decoder. They are both open source, so theoretically it's possible I just haven't read either code yet to see how difficult this will be. It's definitely something I'd love to do if possible.
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

Postby einsteinx2 » Mon Apr 26, 2010 5:53 pm

So I looked into the source code for the ffmpeg project and it looks like it's a bit over my head to integrate ALAC decoder support. Love Objective-C, but audio decoders written in pure C are a bit too low level for me at the moment. It's something I'll look into again in the future (if they don't implement it themselves), but I'm sorry there's not much I can do for now.
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

Postby einsteinx2 » Fri Jul 30, 2010 2:03 am

OK, I've done some more testing and the version of ffmpeg packed with the latest version of Subsonic (4.0.1 as of this post) can indeed decode ALAC files. I have tested with 3 different albums that I encoded both with iTunes and with XLD. They were transcoded without issue and all of the embedded album art and tags were displayed properly in iSub.

I am working with a couple of users that are having issues getting this working, including one person that for some reason has a Subsonic install that doesn't want to transcode the songs (transcoding is enabled, but the stream API call is returning the original ALAC file). I will update this thread once I find out more information on why it isn't working for them, however, it definitely is possible.

Also, the ffmpeg plugin should be able to decode AAC files as well, so both AAC (with m4a extension) and ALAC files (also with m4a extension) should be playable.

If anyone else has experience with ALAC files in their Subsonic install, either working or not working, and stumbles across this thread, please post your experience.
iSub Developer - isubapp.com - support@isubapp.com
Image
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

Postby erncic » Fri Jul 30, 2010 4:56 pm

I'm using Subsonic 4.0.1 on a G5 Mac.
Last night I did the ffmpeg update to 0.6 via port upgrade outdated and cannot decode ALAC files (as far as I can tell). I get the buffering progress bar, but no playback.

I have built the ALAC codec from source, as I was receiving a 'CPU Mismatch' error when using einsteinx2's build.

I am using the following helper program to use ALAC for apple lossless encoded m4a's and ffmpeg for all other m4a's.

m4a-2-mp3.sh
Code: Select all
#!/bin/bash
song="$1"
song_type=`/Library/Application\ Support/Subsonic/transcode/alac -t "$song" | grep "file type:" `

if [ "$song_type" == "file type: alac" ];
then
   /Library/Application\ Support/Subsonic/transcode/alac "$song"
else
   /Library/Application\ Support/Subsonic/transcode/ffmpeg -i "$song" -f wav -
fi


and using
m4a-2-mp3.sh %s
as my transcode part 1 for m4a > mp3.

This is working for me, but would love to simplify it by just using ffmpeg if it can be made to decode apple lossless files. All of my apple lossless files were encoded in iTunes.

Thanks
erncic
 
Posts: 4
Joined: Fri Jul 30, 2010 4:40 pm

Postby einsteinx2 » Fri Jul 30, 2010 7:28 pm

I did my testing on an Intel MacBook. Possibly the PowerPC version of ffmpeg can't do ALAC decoding? I don't know why that would be, but I suppose it's possible. Good thing you were able to sort it out with a script. Maybe that could be included in a special PowerPC version of Subsonic?
iSub Developer - isubapp.com - support@isubapp.com
Image
User avatar
einsteinx2
 
Posts: 214
Joined: Thu Mar 25, 2010 2:31 am

Postby MOOCH » Sat Jul 31, 2010 4:13 am

einsteinx2 wrote:I did my testing on an Intel MacBook. Possibly the PowerPC version of ffmpeg can't do ALAC decoding? I don't know why that would be, but I suppose it's possible. Good thing you were able to sort it out with a script. Maybe that could be included in a special PowerPC version of Subsonic?

My Mac is an intel based iMac and I (as you are aware :wink:) am having no luck with ffmpeg and Apple lossless. I am going to try encic's script and see if I can get it going that way.
MOOCH
 
Posts: 3
Joined: Fri Jul 23, 2010 11:58 pm

Postby erncic » Tue Aug 03, 2010 8:28 pm

Checking through this a bit, ffmpeg on PPC is definitely able to convert ALAC files, but for some reason, wasn't.
Digging in a bit, I found only certain "Players" in Subsonic were failing to playback ALAC encoded files. Under Settings->Players->"Active transcoding", m4a > mp3 was unchecked. I don't remember unchecking that, probably happened due to something I did while changing the transcoding options.
I deleted those Players and rebuilt them and they able to play ALACs through ffmpeg. (Just checking the Active transcoding box didn't always fix it.)
erncic
 
Posts: 4
Joined: Fri Jul 30, 2010 4:40 pm

apple lossless

Postby gblass » Mon Aug 09, 2010 5:32 am

I am on a windows machine. Some of my ALAC files work from itunes. But some just give me clickin?
gblass
 
Posts: 2
Joined: Mon Aug 09, 2010 5:31 am

Next

Return to Help

Who is online

Users browsing this forum: No registered users and 9 guests