PDA

View Full Version : Decoder for .m4a's besides Quicktime?



jtbse
2006-04-13, 12:42
Hi...

I've been using SlimServer on Windows XP for awhile now, but this is my first forum post...so please excuse if this is a dumb newbie question.

I've recently discovered a problem with some of the music files in my collection. It seems there are several filename/length limitations with the current Quicktime implementation in the mov123 decoder. Because of this, I have several .m4a tracks that won't stream through SlimServer (v 6.21).

For example, a track named

"08 - Stevie Ray Vaughn & Double Trouble - Chitlins Con Carne.m4a"

can't be opened by mov123 (Error -37 in Quicktime), and just gets an "end of file" error in SlimServer when trying to play it. But the same track renamed to

"08 - Stevie Ray Vaughn - Chitlins Con Carne.m4a"

Has no problems. Think this is because of a filename charcter limitation with mov123 that I've seen reference to in other forums on the Internet. (The file with the original name plays fine in Winamp, BTW).

So question is, rather than having to do a "search and destroy" to rename all bad files in my 6000+ tracks music library, is there any way to use something besides mov123 to decode .m4a in SlimServer (like say the in_mp3 decoder that Winamp uses for aac)?

If not, can anybody think of another approach to avoid renaming files, like say scripting with redirection to provide input to mov123 that's more to his liking? It's been years since I tried to code any Perl, so while it would be a "fun" exercise, I'd rather not go the route of trying to somehow hack the SlimServer code.

Thanks,

Tim

Mark Lanctot
2006-04-13, 12:51
Ah, the perils of the closed source format.

AFAIK, you can't play .m4a files back with anything but mov123. I know of one "Quicktime Alternative" program but it still uses mov123 as the decoder - it's really just a slimmed-down 3rd party version of Quicktime.

You may want to arrange your files in a standard \Artist\Album\ folder structure, then naming the files just by their titles. Mp3tag makes moving over to this structure easy. Details here: http://forums.slimdevices.com/showthread.php?t=22446

jtbse
2006-04-13, 14:01
Thanks for the reply Mark.

So yes, I know I can change the way I organize things (The GodFather can do batch renames and moves as well).

Problem is, dealing with the "fallout" will still be a big job for me, cause going through this will also mess up the Winamp media libraries that my kids use in their XP Winamp profiles.

That's why I was looking for something like a "quick fix" or a way to fool mov123.

(sigh!) If I knew then what I've learned since trying to stream my library to other computers and UPnP devices, I would never have chosen AAC as my preferred lossy format. Oh well, as they say; hindsight is 20-20.

Thanks,

Tim

cepheid
2006-04-13, 18:07
For example, a track named

"08 - Stevie Ray Vaughn & Double Trouble - Chitlins Con Carne.m4a"

can't be opened by mov123 (Error -37 in Quicktime), and just gets an "end of file" error in SlimServer when trying to play it. But the same track renamed to

"08 - Stevie Ray Vaughn - Chitlins Con Carne.m4a"

Has no problems. Think this is because of a filename charcter limitation with mov123 that I've seen reference to in other forums on the Internet. (The file with the original name plays fine in Winamp, BTW).
Question for you:

If you change the ampersand (&) to the word "and" (i.e. name the track "08 - Stevie Ray Vaughn and Double Trouble - Chitlins Con Carne.m4a") does it still fail, or does it work?

If it fails, then yes, it's a filename-length limitation. If it works, the problem is likely a bug in mov123, namely that it may not be properly escaping "special" characters like ampersand.

Let us know...

jtbse
2006-04-13, 19:34
Hi Cephid...

Did some more testing. Removing the & in the file name doesn't fix the problem. At least in this case, the issue with mov123 is all about the length of the file name. It appears that no part of the file name (including delimiting "." can exceed 60 characters). Using the same example as before, my results below:

08 - Stevie Ray Vaughan And Double Trouble - Chitlins Con Carne.m4a
Doesn't work - 63 characters left of the period

08 - Stevie Ray Vaughan & Double Trouble - Chitlins Con Carne.m4a
Doesn't work - 61 characters left of the period

08 - Stevie Ray Vaughan & Double Trouble - Chitlins Con Carn.m4a
Doesn't work - 60 characters left of the period

08 - Stevie Ray Vaughan & Double Trouble - Chitlins Con Car.m4a
Works - 59 characters left of the period

-Tim

egd
2006-04-13, 20:16
Problem is, dealing with the "fallout" will still be a big job for me, cause going through this will also mess up the Winamp media libraries that my kids use in their XP Winamp profiles.

That's why I was looking for something like a "quick fix" or a way to fool mov123.

If if won't diddle your Winamp music libraries you could use a program like Total Commander to do wholesale replacement of "&" with "and" as a rename operation.

AndreasG
2006-04-14, 07:47
I just had a similar problem and here is what I found out:

It is a known bug/limitation of the Windows QT library that it does not handle filenames with more than 63 characters correctly!

In my case, the actual lenght of the file name does not matter -- problems only arise when there are two files in the same directory that share the first 63 characters.

Too bad...

Andreas

Craig
2006-04-14, 08:00
Take a look for FAAC or FAAD, I think Faad is the decoder.
I'm not sure if it would integrate with slimserver though.

Craig

jtbse
2006-04-14, 08:43
Hi Craig...

Yes...I'm familiar with other AAC CLI and .dll-based codecs, but that's really my question. I've used several different ones for file conversions, different players and so forth.

Is there any way to use a decoder besides mov123 for AACs or other files in an mp4 container within Slimserver?

Thx

Tim

malsbury
2006-04-14, 09:33
Is there any way to use a decoder besides mov123 for AACs or other files in an mp4 container within Slimserver?I used to use FAAD2 on linux to decode non-DRM AACs. However, it could not handle ALAC when that was introduced. I now use mplayer to handle transcoding of AAC and ALAC (as well as WMA and RealAudio).Mplayer has been ported to windows so it might be what you are looking for you.

I would suggest reviewing some of the posts about AlienBBC, I believe that the new Windows version of the plugin installs a version of mplayer and sets up Slimserver to use it for Real Audio streams. You can then edit your convert.conf file to have it use mplayer for .mov files. Here are the lines I use for transcoding.

mov mp3 * *
[mplayer] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:waveheader:file=/dev/fd/4 $FILE$ 4>&1 1>&2 2>/dev/null | [lame] --silent -q 2 -b $BITRATE$ - -

mov wav * *
[mplayer] -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:waveheader:file=/dev/fd/4 $FILE$ 4>&1 1>&2 2>/dev/null
These most likely wont work "as is" for you since these are tweaked for my linux box, but they might get you pointed in the right direction. I would also look at the entries AlienBBC makes in the slimserver-custom.conf file for Real Audio to see how the output from mplayer is handled on a windows box.

--Tom Malsbury

jtbse
2006-04-14, 10:21
Thank you Malsbury!

Yes, I think this definitely gets me on a track that I can work with.

I'll check out mplayer and play with convert.cnf to see if I can get it to work. dBPoweramp also has a AAC CLI codec that I might play with as well.

Thanks again for your help!

-Tim

bpa
2006-04-14, 10:33
You should do an initial test of mplayer from a command line with one of your files. Depending on the chosen build options, some versions of mplayer have faad2 built in whereas other need an external faad2 codec dll in a subdirectory.

malsbury
2006-04-14, 11:12
I'll check out mplayer and play with convert.cnf to see if I can get it to work.
I looked at the XP installer of AlienBBC and this is the line that it puts in the slimserver-custom.conf:
[mplayer] -really-quiet -vc null -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:nowaveheader:file=#PIPE# $FILE$
So it looks like they are just handing the output from mplayer to #PIPE# which you can just drop into my settings.

I downloaded the windows build of mplayer here:

http://www.mplayerhq.hu/MPlayer/releases/win32/

and it transcodes both AAC and ALAC files fine from the command line using my settings. Here is the command line options I used if you would like to test it yourself, it will take the "test.m4a" file and output it to "test.wav" just to show that it works. The output file will be in the mplayer.exe directory. Replace the info between the "'s with the location of the file you would like to convert.
mplayer.exe -novideo -vc dummy -vo null -cache 128 -af volume=0,resample=44100:0:1,channels=2 -ao pcm:waveheader:file=test.wav "C:\Documents and Settings\Thomas\Desktop\test.m4a"To use this with slimserver you should just need to set the output to file=#PIPE#

Let me know how you make out with this. I am intersted in knowing if it is just that simple.

--Tom Malsbury

bpa
2006-04-14, 12:01
The #PIPE# essentially invokes a unix like pipe using the socketwrapper app and Windows Named pipes.

Your use for AAC/ALAC should work but a number of 3rd party antivirus and firewall (e.g. zonealarm, McAfee) can interfere with socketwrapper. The symptoms of this problem is that everything seems to run but there is no sound.

If you encounter this problem, there is a solution using new version of socketwrapper but it is still in test and so is not distributed normally.

cumry
2006-11-06, 18:10
Hi,

I am a quite new to all this and have also encountered the problem of mp4 / m4a files being too long. I was wondering if this problem was resloved in any way (except for having to re-name all my files)? As I said, I am a bit of a newbie and to be honest I understood very little about what was discussed in the above (possible) solution...

Any help would be much appreciated,

Leigh

Wirrunna
2006-11-08, 00:30
Well, the things you discover reading the forum! This explains why Mendelssohn's 3rd sysmphony wouldn't play, despite being ripped several times.
I changed the name of the first track in iTunes to "012345678901.." - 59 characters long, (an old programming technique), set the margin in iTunes so names longer than this show up, then started paging through 16,000 tracks. Boring, but you can truncate the offenders with some meaning.