Bug 14913 - Scanner can't calculate bitrate for surround-sound flac files
: Scanner can't calculate bitrate for surround-sound flac files
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.5.0
: PC Windows XP
: P1 major (vote)
: 7.4.x
Assigned To: Andy Grundman
: Audio::Scan
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-23 13:35 UTC by Philip Meyer
Modified: 2009-10-27 07:05 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Meyer 2009-10-23 13:35:19 UTC
7.5.0 SVN 28963

A scan for new/changed files currently crashes for me.  It looks to me like it was trying to process a DTS track wrapped in a .flac, and calculated the bitrate incorrectly?  If this is the case, I'm not sure why it was trying to process tags on this file, because that file hasn't changed and was already present in the music library.


[01:19:57.1512] Slim::Utils::Scanner::scanDirectory (333) Scanning: M:\Music\Surround Sound\The Beatles\Love\Love.dts.flac
[01:19:57.1747] Slim::Schema::Storage::throw_exception (82) Error: DBI Exception: DBD::mysql::st execute failed: Out of range value adjusted for column 'bitrate' at row 1 [for Statement "INSERT INTO tracks (bitrate,audio_offset,drm,audio_size,vbr_scale,remote,samplesize,audio,titlesort,timestamp,url,lossless,channels,samplerate,secs,filesize,content_type,titlesearch,title,year) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"]
[01:19:57.1753] Slim::Schema::Storage::throw_exception (82) Backtrace:

   frame 0: Slim::Utils::Log::logBacktrace (P:/Music/SlimServer/trunk/server/Slim/Schema/Storage.pm line 82)
   frame 1: Slim::Schema::Storage::throw_exception (P:\Music\SlimServer\trunk\server\CPAN/DBIx/Class/Storage/DBI.pm line 957)
   frame 2: DBIx::Class::Storage::DBI::__ANON__ (P:/Music/SlimServer/trunk/server/Slim/Schema.pm line 1000)
   frame 3: Slim::Schema::newTrack (P:/Music/SlimServer/trunk/server/Slim/Schema.pm line 1227)
   frame 4: Slim::Schema::updateOrCreate (P:/Music/SlimServer/trunk/server/Slim/Utils/Scanner.pm line 347)
   frame 5: Slim::Utils::Scanner::scanDirectory (P:/Music/SlimServer/trunk/server/Slim/Music/MusicFolderScan.pm line 79)
   frame 6: Slim::Music::MusicFolderScan::startScan (P:/Music/SlimServer/trunk/server/Slim/Music/Import.pm line 568)
   frame 7: Slim::Music::Import::runImporter (P:/Music/SlimServer/trunk/server/Slim/Music/Import.pm line 373)
   frame 8: Slim::Music::Import::runScan (P:/Music/SlimServer/trunk/server/scanner.pl line 305)
   frame 9: (eval) (P:/Music/SlimServer/trunk/server/scanner.pl line 299)
   frame 10: main::main (P:/Music/SlimServer/trunk/server/scanner.pl line 454)

[01:19:57.2003] main::main (311) Error: Failed when running main scan: [Carp::Clan::__ANON__(): DBI Exception: DBD::mysql::st execute failed: Out of range value adjusted for column 'bitrate' at row 1 [for Statement "INSERT INTO tracks (bitrate,audio_offset,drm,audio_size,vbr_scale,remote,samplesize,audio,titlesort,timestamp,url,lossless,channels,samplerate,secs,filesize,content_type,titlesearch,title,year) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"] at P:/Music/SlimServer/trunk/server/Slim/Schema/Storage.pm line 86
]
[01:19:57.2010] main::main (312) Error: Skipping post-process & Not updating lastRescanTime!
[01:20:00.3906] Slim::bootstrap::theEND (462) Got to the END
[01:20:00.3910] Slim::bootstrap::sigint (426) Got sigint
Comment 1 Andy Grundman 2009-10-26 08:05:04 UTC
Hmm, I have a 5.1 24/96 DTS file wrapped in FLAC that correctly reports 
1536kbps for the bitrate.  I guess I'll need to see your file.  Do you have my 
FTP info?
Comment 2 Philip Meyer 2009-10-26 15:39:27 UTC
Love.dts.flac is 865MB.

Mp3Tag reports the length as 01:20:38 (4838), bitrate as 1466.

I don't have your ftp info.  I can upload if you send info to phil@hergest.demon.co.uk.
Comment 3 Philip Meyer 2009-10-26 15:41:53 UTC
Could it be something to do with the fact that I have a .cue file for this album (single flac for whole album)?

Does it try to calculate a different bitrate for each track defined in the .cue file?
Comment 4 Andy Grundman 2009-10-26 16:19:29 UTC
Does the cue sheet work with a DTS FLAC file?  It might be related to that.
Comment 5 Philip Meyer 2009-10-26 16:43:12 UTC
It has been working like this for ages (at least a year).  I haven't done anything to the file recently.

In fact that was the other part of the bug report - why is it scanning the file if it hasn't changed?

All modification dates are older than the last scan time.
Comment 6 Andy Grundman 2009-10-26 16:50:19 UTC
OK, it's probably just the 7.4 required rescan.  I'm sure it'll be easy to fix once I see the file.
Comment 7 Andy Grundman 2009-10-27 06:16:52 UTC
OK, this looks like a Windows-specific problem.  File scans fine on my Mac but the bitrate is indeed wrong under Windows.
Comment 8 SVN Bot 2009-10-27 07:05:31 UTC
 == Auto-comment from SVN commit #499 to the opensource repo by andy ==
 == https://svn.slimdevices.com/opensource?view=revision&revision=499 ==

Fixed bug 14913, refactored various bitrate calc functions to avoid exceeding 32-bit size which causes issues on at least Windows