Bugzilla – Bug 8562
mov123 should not resample non-44.1k sample rates
Last modified: 2009-09-08 09:19:36 UTC
Created attachment 3493 [details] 48 khz file When a 48khz file is scanned in, SC7 shows that this file is a 44.1khz file and the SB3 or Duet plays the file as a 44.1khz file. File attached.
Seems to be a couple SqueezeCenter issues with this file. The first is that SqueezeCenter is identifying the file as 44.1 kHz when it is actually 48 kHz. The second is that since it is an AAC file it will be transcoded to FLAC, AIFF or MP3 on the fly depending on the hardware and the file type settings. This transcoding is handled by mov123 which appears to me to force everything to 44.1 kHz. If it turns out that mov123 really does force everything to 44.1 kHz this behavior should be documented in separate bug/feature request.
Dean, this bug has the iTunes Plus AAC 48 kHz attached to it. I don't see anything on iTunes that features this track as 48 kHz. Perhaps it was just a bonus?
"If it turns out that mov123 really does force everything to 44.1 kHz this behavior should be documented in separate bug/feature request." I digress - this is a bug that requires attention. As the Duet/SB Classic is advertised to support this sample rate as well as AAC files, a user should expect a 48Khz AAC file to play back fine. If it is filed separately, please let me know where the post will be so I can be notified once it is fixed. Cheers!
Dean are you the best person to look at this?
Is *anyone* looking at this?
I believe that the change is simply this: Index: tools/mov123/mov123.cpp =================================================================== --- tools/mov123/mov123.cpp (revision 21765) +++ tools/mov123/mov123.cpp (working copy) @@ -364,7 +364,7 @@ theOutputFormat.format = k16BitBigEndianFormat; theOutputFormat.numChannels = 2; // theInputFormat.numChannels; theOutputFormat.sampleSize = 16; - theOutputFormat.sampleRate = 44100 << 16; //theInputFormat.sampleRate; + theOutputFormat.sampleRate = theSrcInputFormatInfo. sampleRate; theOutputFormat.sampleCount = 0; theOutputFormat.buffer = NULL; theOutputFormat.reserved = 0; But I am unable to test here. Note that this change should be tested across all players, etc... Alan: Would this bug be yours?
Dean, I'd be happy to lend a hand and test if I knew how. How do I integrate that code into my version of SqueezeCenter to test it on my setup? Or... is this something that has to be coded into the actual program on your end? BTW, thanks for addressing this bug - it's not everyday that a company's CTO gets involved like this. A true testament to Slim and one of the reason's I'm an avid supporter.
Created attachment 3620 [details] test version of mov123 Try replacing the file Bin/darwin/mov123 with this file and post your experience.
Sorry, do you mean the move123.exe file located here: C:\Program Files\SqueezeCenter\server\Bin\MSWin32-x86-multi-thread I don't seem to have a directory called "Bin/darwin/"... I also noticed the mov123 file you posted was not an executable. Please advise and I will be happy to test! Cheers!
Ah, sorry, I thought you were on a Mac, my mistake. That's a Mac version. Michael: Can you build a test version of mov123 with that one-line change?
Oh ok. ;^). Also it should be noted that I am on Vista SP1, not XP as this bug listing states.
Matt - can't reach winbuild. Could you please take a look? Thanks!
Michael, 'Winbuild' is the old VM image we were using. Now we're using 'win32-build' (to go with a slightly more accurate naming scheme) that is a dedicated host. I'm not sure what you want me to try though...
Created attachment 3654 [details] error log from building on Windows Dean - cannot compile on Windows. Not sure whether these are all issues due to new version of VisualC, Quicktime SDK etc. The project file caused VC to run some updates with errors/warnings, SoundComponents.h is no longer part of the QT SDK etc. Can you take a look at this please?
Created attachment 3655 [details] Project conversion errors
Matt - do you still have the old winbuild VM around? I'm having trouble compiling on the new machine, most likely to incompatible QT header files and VC compiler. The old VM might still have what we were using before.
Thanks Matt. But still no luck :-(. No QT SDK on that machine neither. Volunteers?
Dean, Michael is stuck on this problem. Could you chat with him about it?
Steven could you please test the 'test version of mov123' which Dean tells me is a mav binary?
(In reply to comment #19) > Steven could you please test the 'test version of mov123' which Dean tells me > is a mav binary? The attached mov123 mac binary appears to broken or incomplete. I also noticed the size is only 20 KB while the shipping one is 68 KB. Could someone try building it again?
That's the one I have to punt post 7.2 as I won't be able to fix this.
Dean, everyone seems to be blocked on this. Is there anything you can do to spur movement on this? Thanks!
Matt: Can you try to get mov123 built automatically on Mac and Windows as part of the build system?
It was my understanding that we couldnt even get mov123 to compile ... let alone automatically. I can easily script something up once we have some instructions on how to compile mov123 via command line.
It does compile, at least on my computer, but Michael wasn't able to do it on his. Let's get it into the build system with the current default and see if the makefile (or whatever) needs to be tweaked.
Automatic build setup for Mac platform... output of successful build result is here: https://builds:8080/parabuild/build/log.htm?cid=883&logid=56895&buildrunid=21504 Michael, once you make the appropriate changes and the build finishes, let me know and I'll upload the file somewhere useful!
We should not change this unless we also add WAV header output, otherwise the transcoding framework (or player when transcoding to wav==pcm) will not know what it is getting.
Ok, so mov123 is building on Mac ... but not on windows. I've converted it to a newer Visual Studio project to get it started, but theres a dependency on SoundComponents.h. Unfortunately according to Apple, this has been deprecated and is no longer available (see http://developer.apple.com/DOCUMENTATION/QuickTime/INMAC/SOUND/tp_snd33_snd33add.e.htm). It looks like Mov123 will need some re-working to get it to compile against the new SDKs from Apple.
Steven to test on mac
ping, steven: is it working better?
Just checked in a couple of tweaks to make it build with VC++ Express 2008, QuickTime SDK 7.3 on windows XP. You should be able to work with that Matt.
Put in a few more fixes to point Mov123 to standard QuickTime SDK locations -- but still havn't fixed the issue. Here's the latest build failure: https://builds:8080/parabuild/build/log.htm?cid=b486&logid=60751&buildrunid=23006 "Starting build process now..." Microsoft (R) Visual Studio Version 9.0.21022.8. Copyright (C) Microsoft Corp. All rights reserved. ------ Build started: Project: mov123, Configuration: Release Win32 ------ Linking... Searching libraries Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\kernel32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\user32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\gdi32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\winspool.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\comdlg32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\advapi32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\shell32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\ole32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\oleaut32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\uuid.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\odbc32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\odbccp32.lib: Searching ..\..\..\..\..\..\..\..\..\..\..\..\Program Files\QuickTime SDK\Libraries\QTMLClient.lib: Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB\OLDNAMES.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\kernel32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\user32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\gdi32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\winspool.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\comdlg32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\advapi32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\shell32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\ole32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\oleaut32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\uuid.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\odbc32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\odbccp32.lib: Searching ..\..\..\..\..\..\..\..\..\..\..\..\Program Files\QuickTime SDK\Libraries\QTMLClient.lib: Searching C:\Program Files\Microsoft Visual Studio 9.0\VC\LIB\OLDNAMES.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\kernel32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\user32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\gdi32.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\winspool.lib: Searching C:\Program Files\\Microsoft SDKs\Windows\v6.0A\lib\comdlg32.lib: Finished searching libraries mov1231.obj : error LNK2019: unresolved external symbol _fprintf referenced in function "unsigned char __cdecl SoundConverterFillBufferDataProc(struct SoundComponentData * *,void *)" (?SoundConverterFillBufferDataProc@@YAEPAPAUSoundComponentData@@PAX@Z) mov1231.obj : error LNK2019: unresolved external symbol ___iob_func referenced in function "unsigned char __cdecl SoundConverterFillBufferDataProc(struct SoundComponentData * *,void *)" (?SoundConverterFillBufferDataProc@@YAEPAPAUSoundComponentData@@PAX@Z) mov1231.obj : error LNK2019: unresolved external symbol _fwrite referenced in function "short __cdecl ConvertMovieSndTrack(char const *)" (?ConvertMovieSndTrack@@YAFPBD@Z) mov1231.obj : error LNK2019: unresolved external symbol _printf referenced in function "short __cdecl ConvertMovieSndTrack(char const *)" (?ConvertMovieSndTrack@@YAFPBD@Z) mov1231.obj : error LNK2019: unresolved external symbol _strncmp referenced in function "short __cdecl ConvertMovieSndTrack(char const *)" (?ConvertMovieSndTrack@@YAFPBD@Z) mov1231.obj : error LNK2019: unresolved external symbol ___security_cookie referenced in function "short __cdecl ConvertMovieSndTrack(char const *)" (?ConvertMovieSndTrack@@YAFPBD@Z) mov1231.obj : error LNK2019: unresolved external symbol @__security_check_cookie@4 referenced in function "short __cdecl ConvertMovieSndTrack(char const *)" (?ConvertMovieSndTrack@@YAFPBD@Z) mov1231.obj : error LNK2019: unresolved external symbol _memset referenced in function "short __cdecl ConvertMovieSndTrack(char const *)" (?ConvertMovieSndTrack@@YAFPBD@Z) mov1231.obj : error LNK2019: unresolved external symbol __setmode referenced in function _main mov1231.obj : error LNK2019: unresolved external symbol __fileno referenced in function _main LINK : error LNK2001: unresolved external symbol _mainCRTStartup QTMLClient.lib(QTLoadLibraryUtils.obj) : error LNK2019: unresolved external symbol __access referenced in function _GetPathToQuickTimeFolder QTMLClient.lib(QTLoadLibraryUtils.obj) : error LNK2019: unresolved external symbol _strncpy referenced in function _GetPathToQuickTimeFolder Release/mov123.exe : fatal error LNK1120: 13 unresolved externals Build log was saved at "file://c:\parabuild\etc\build\b10956co\a\u\t\o\7.3\trunk\tools\mov123\Release\BuildLog.htm" mov123 - 14 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Dean to help with the build.
Considering the title of this bug, do not forget what I said in comment #27.
Matt: I need login instructions for that build machine to figure out what's going on. Alan: about your comment re: comment 27: if we change mov123 to not resample, then we should know the output sample rate from the input sample rate, right?
The architecture does not have that capability. It is assumed that all transcoded streams are either self-describing (mp3, flac, ofg) or PCM fixed 44100/16/2/LE. The way to fix this is, first to fix bug 10000, and then get mov123 (and others) to output WAV, not PCM format. But this is 8.0, not 7.3 timescale.
got it.
Sorry Dean, instructions sent!
I think that this is really obsolete with the move to FAAD for AAC files. At least it now very much an edge case.