Bugzilla – Bug 3189
mov123 crashes on .m4a (Apple Lossless) - songs don't play
Last modified: 2011-03-16 04:18:41 UTC
When attempting to play Apple Lossless files transcoded to FLAC, the transcoding fails. Specifically, mov123 generates an error (-50) and fails. SlimServer apparently does not catch that failure and does not fall back to using flac for transcoding. I ran SlimServer in CLI mode with --d_source... everything up to the following command was fine; the following command generated the error: 2006-03-21 21:07:30.8676 Using command for conversion: "/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Bin/darwin/mov123" "/Users/cepheid/Music/iTunes/iTunes Music/James/Laid/08 Everybody Knows.m4a" | "/Library/PreferencePanes/SlimServer.prefPane/Contents/server/Bin/darwin/flac" -cs --totally-silent --compression-level-0 --endian big --sign signed --channels 2 --bps 16 --sample-rate 44100 - & | 2006-03-21 21:07:30.9977 Streaming with format: flc Failed at line: 284 Conversion failed with error: -50 The error (failed at line 284, etc.) is generated by mov123, as shown here: [PortaPotty:server/Bin/darwin] cepheid% ./mov123 ~/Music/iTunes/iTunes\ Music/James/Laid/08\ Everybody\ Knows.m4a Failed at line: 284 Conversion failed with error: -50 In principle, SlimServer should recognize this failure and should fall back to using flac - the command is OR'd so failure of mov123 should automatically trigger the call to flac. However, the call to flac never occurs! So, there are TWO errors here: 1) Why is mov123 crashing on these files? 2) Why is SlimServer NOT falling back to flac upon the failure of mov123? I am using SlimServer 6.2.1 on an SB3 with FW v28. The SB3 is connected via 802.11g; the server is running on a 15" Aluminum Powerbook, 1.25GHz G4, 1.25GB RAM, running OS X 10.3.9. For reference, I'm running iTunes 4.7.1 and QuickTime 6.5. (I know iTunes and QT are somewhat old; there are reasons for this.) It's possible mov123 is failing due to my older installation of iTunes and QT; in that case, I don't know who's responsible for fixing that. However, under all circumstances SlimServer should still gracefully fall back to using flac, which it does not. Your help is appreciated... if you need backtraces or other information, please let me know. Thanks! --- Amir
OK, I was apparently being a total moron in reading the sequence of executable calls... I was reading the pipe as an OR rather than a pipe. Too used to Perl, apparently. =) Whoops. So, now I know why flac was never getting called - because mov123 crashed and there was nothing to pipe into flac. There still remains the issue of mov123 crashing, which it should not do. That's preventing all of my Apple Lossless files from playing on the Squeezebox, which is a major bummer. Let me know what other diagnostics or information you need.
you should update quicktime, and try 6.2.2 nightly builds of slimserver.
There are a couple of good reasons why I'm running an older version of QuickTime, and version 6.5 isn't really all that old... the software should be compatible with it. Nowhere does the documentation state that QT 7.x is the minimum required version. I'd rather not upgrade QT unless it's absolutely necessary, and I think this bug should be fixable for QT 6.x, assuming that QT is the reason it's crashing. I'll give the 6.2.2 beta builds a shot, though most users seem to be running 6.2.1 and transcoding ALAC files without any difficulties... and the forums are full of other bugs with 6.2.2.
mov123 relies on the qt libraries. If you don't want to try the upgrade, then don't. but then, don't expect teh bug to be 'fixed' if qt is the cause. I'll leave you to debug. thanks for the info.
I know mov123 relies on the QT libraries. Unfortunately, I could not find any documentation for the mov123 executable specifically, and it doesn't recognize the "--help" CLI option. The SlimServer documentation doesn't mention that QT 7.x is the minimum required version - if it IS, then that should be explicitly mentioned. The question is also, is the bug with the QT libraries themselves, or simply with the way mov123 interacts with them? If the former, then clearly a QT upgrade is required. If the latter, then mov123 should be fixable to work with the older libraries. As for debugging... is there any way to get more debugging info out of mov123, so I can find out what is truly the underlying problem and where it happens?
actually....you might simply try re-installing your current QT version, if you still have the installer. I'm not sure what version is required for mov123 to handle alac, but most often error outputs like the one you have shown is due to something not quite right in the QT setup. Regardless, 6.2.2 may help. be sure to report any results. Someone will no doubt want to know in order to continue dealing with this report.
I will try to download the installer from Apple - normally I use Software Update. However, I haven't found any other problems with QT in the time I've been using it, and I should point out that iTunes can play the ALAC files just fine (though obviously it's not trying to parse them through mov123). I'll try 6.2.2 later today and post the results, before I try re-installing QT. =)
OK, I tried the latest nightly of 6.2.2 (dated March 22; firmware 35). The exact same error still occurs. This is not a big surprise because the version of mov123 that ships with 6.2.2 is identical to the one from 6.2.1. Even the mov123 included with server v6.5 is the same. So, the bug is definitely mov123, not the rest of the server software. The question then remains, is the bug inherent to QT 6.5 or is it a bug with how mov123 interacts with QT 6.5? If the former, it's Apple's bug and not fixable. If the latter (which is what I suspect), it should be fixable. Dean: any comments?
I found the source for mov123 in the development trunk... if I'm right, the codeblock that generates the error is this one: // instantiate the movie err = NewMovieFromFile(&theSrcMovie, theRefNum, &theResID, NULL, newMov\ ieActive, &wasChanged); CloseMovieFile(theRefNum); BailErr(err); It appears that NewMovieFromFile is throwing an exception, although error code -50 is rather uninformative. NewMovieFromFile is a QT API function call. So the question remains: is this a bug with QT, or is it a bug with the way mov123 is calling this function or processing the file before the call? iTunes plays my ALAC files just fine... but, QuickTime Player (v6.5) complains "there is an error in the program." That's utterly strange.
did you try the re-install of Quicktime 6.5? of course, an update is always recommended, but I would not say required. mov123 does depend completely on a good qt install, so it would be worth re-installing your version anyway, just to be sure there isn't anything that's been overwritten along the way with other libraries. After searchign the forum, it seems error -3000 and error -50 are ones that have come up before. Suggestions were to update quicktime, but this was around April 2005. I can't recall the date of qt6.5, but if it is around that time or newere, you should be fine reinstalling that. the other suggestion was to try mov123 from an earlier server version, in this case 5.1.1 since there was a big rewrite shortly after that version. I realise this is a complicated issue, and it confusing. In a perfect world, iTunes and Quicktime would be reliably the same for outside interraction. however, it is often proven that there are subtle differences. I am not surprised that itunes plays and QT might not. The point is that mov123 simply calls quicktime and quicktime plays the track. the error you see from mov123 is th result of some failure of the qt call to respond, or respond correctly. from a google search, looks like qt6.5 was first available 2.5 years ago (Dec 2003): http://www.macworld.com/news/2003/12/18/quicktime/?lsrc=mcrss-1203 and this shows 6.5.2 around Sept 2005 and mentions lossless improvements. http://www.apple.com/support/downloads/quicktime652forwindows.html given that this is close to the dates found in the forum for updates to qt installs helping, I am still of the mind that these tweaks to lossless handling may be part of the issue. I understand your reasons for avoding QT6.52 or 7, but i'm not sure what to suggest. Perhaps look at http://www.slimdevices.com/downloads/ and find an older mov123. It may fit better with your setup. Certainly if it can be confirmed that 6.5.2 is indeed required, then the docs certainly should be changed to reflect this. Just becuase they don't say so now, does not mean that it isn't the case. thank you for your time. hope some of this helps. (btw...not an employee, but i am most certainly a developer, even if only a part-time hack)
Well, I gave in and updated my QT libraries to 7.0.4, and mov123 now works fine. I did not try any of the interim versions such as v6.5.2 ... I just went straight to 7.0.4 (it was easiest). So... I guess this bug can be closed, though as part of its resolution I would recommend that the docs be updated to reflect that QT 7.x or higher is required for proper playing of .m4a (AAC, ALAC) files. QT 6.5.2 might work, I didn't try it... but certainly something higher than 6.5 is required.
fixed by adding notes to OSX install wiki