Revive or not, I can’t find bitrate solution

FireFly Media Server Firefly Media Server Forums Firefly Media Server General Discussion Revive or not, I can’t find bitrate solution

  • This topic has 2 replies, 2 voices, and was last updated 15 years ago by Anonymous.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2999
    Anonymous
    Inactive

    For many (but not all) of the AAC files I have upgraded to iTunes plus, and some of the files that I have purchased recently without upgrading, firefly/mt-daapd reports an incorrect bitrate, higher than 320k. If I play these on another machine’s iTunes, it immediately switches to the actual bitrate (256k) in iTunes. However, my soundbridge just chokes on them.

    Following is an excerpt of the -d 9 logs for re-scanning one file that doesn’t work (Walk or Ride) and one that does (Unfortunate Few). I don’t see any substantive difference (I briefly thought that problem files were ones that couldn’t find mp4a or esds atoms), other than the bitrates both display as wrong, but the one that works is less than 320k so the soundbridge deals with it.

    I’ve seen this issue mentioned in passing in the forums and elsewhere, but I have not seen any solutions proposed. Obviously there aren’t any code updates to the media server, unless there’s an unofficial patch floating around, but I haven’t found it if there is. Is there any other creative way, some third party tool I can use to “fix” the files in question so they have the correct bitrates?


    2009-12-15 10:22:58: Found /local/share/music/Petes-itunes/The Ditty Bops/The Ditty Bops/Walk or Ride 1.m4a
    2009-12-15 10:22:58: FS Mod time: 1250527238
    2009-12-15 10:22:58: Could not find id 245116
    2009-12-15 10:22:58: DB Mod time: 0
    2009-12-15 10:22:58: Found music file: Walk or Ride 1.m4a
    2009-12-15 10:22:58: Found moov atom at off 32.
    2009-12-15 10:22:58: Found udta atom at off 67977.
    2009-12-15 10:22:58: Found meta atom at off 67985.
    2009-12-15 10:22:58: Found ilst atom at off 68031.
    2009-12-15 10:22:58: Getting AAC file info
    2009-12-15 10:22:58: Found moov atom at off 32.
    2009-12-15 10:22:58: Found mvhd atom at off 40.
    2009-12-15 10:22:58: Song length: 192 seconds
    2009-12-15 10:22:58: Found moov atom at off 32.
    2009-12-15 10:22:58: Found trak atom at off 148.
    2009-12-15 10:22:58: Found mdia atom at off 248.
    2009-12-15 10:22:58: Found minf atom at off 322.
    2009-12-15 10:22:58: Found stbl atom at off 382.
    2009-12-15 10:22:58: Found stsd atom at off 390.
    2009-12-15 10:22:58: Found mp4a atom at off 406.
    2009-12-15 10:22:58: Date Added: 1250527238
    2009-12-15 10:22:58: Adding /local/share/music/Petes-itunes/The Ditty Bops/The Ditty Bops/Walk or Ride 1.m4a
    2009-12-15 10:22:58: Added file
    2009-12-15 10:22:58: Matching to covers
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching female vocalist to covers
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching to grooves
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching female vocalist to grooves
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching female vocalist to female vocalist
    2009-12-15 10:22:58: Returning 1
    2009-12-15 10:22:58: Match song to playlist Female Vocalists (4)
    2009-12-15 10:22:58: Adding item 245116 to 4
    2009-12-15 10:22:58: Playlist now has 2362 entries
    2009-12-15 10:22:58: Added playlist item
    2009-12-15 10:22:58: Matching /local/share/music/Petes-itunes/The Ditty Bops/The Ditty Bops/Walk or Ride 1.m4a to .m4a
    2009-12-15 10:22:58: Returning 134505548
    2009-12-15 10:22:58: Match song to playlist Playable AAC Files (3)
    2009-12-15 10:22:58: Adding item 245116 to 3
    2009-12-15 10:22:58: Playlist now has 1237 entries
    2009-12-15 10:22:58: Added playlist item
    2009-12-15 10:22:58: Comparing (datewise) 1250527238 to 1259683670
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Found /local/share/music/Petes-itunes/The Ditty Bops/The Ditty Bops/10 Unfortunate Few.m4a
    2009-12-15 10:22:58: FS Mod time: 1250529571
    2009-12-15 10:22:58: Could not find id 245144
    2009-12-15 10:22:58: DB Mod time: 0
    2009-12-15 10:22:58: Found music file: 10 Unfortunate Few.m4a
    2009-12-15 10:22:58: Found moov atom at off 32.
    2009-12-15 10:22:58: Found udta atom at off 76989.
    2009-12-15 10:22:58: Found meta atom at off 76997.
    2009-12-15 10:22:58: Found ilst atom at off 77043.
    2009-12-15 10:22:58: Getting AAC file info
    2009-12-15 10:22:58: Found moov atom at off 32.
    2009-12-15 10:22:58: Found mvhd atom at off 40.
    2009-12-15 10:22:58: Song length: 242 seconds
    2009-12-15 10:22:58: Found moov atom at off 32.
    2009-12-15 10:22:58: Found trak atom at off 148.
    2009-12-15 10:22:58: Found mdia atom at off 248.
    2009-12-15 10:22:58: Found minf atom at off 322.
    2009-12-15 10:22:58: Found stbl atom at off 382.
    2009-12-15 10:22:58: Found stsd atom at off 390.
    2009-12-15 10:22:58: Found mp4a atom at off 406.
    2009-12-15 10:22:58: Date Added: 1250529571
    2009-12-15 10:22:58: Adding /local/share/music/Petes-itunes/The Ditty Bops/The Ditty Bops/10 Unfortunate Few.m4a
    2009-12-15 10:22:58: Added file
    2009-12-15 10:22:58: Matching to covers
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching female vocalist to covers
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching to grooves
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching female vocalist to grooves
    2009-12-15 10:22:58: Returning 0
    2009-12-15 10:22:58: Matching female vocalist to female vocalist
    2009-12-15 10:22:58: Returning 1
    2009-12-15 10:22:58: Match song to playlist Female Vocalists (4)
    2009-12-15 10:22:58: Adding item 245144 to 4
    2009-12-15 10:22:58: Playlist now has 2363 entries
    2009-12-15 10:22:58: Added playlist item
    2009-12-15 10:22:58: Matching /local/share/music/Petes-itunes/The Ditty Bops/The Ditty Bops/10 Unfortunate Few.m4a to .m4a
    2009-12-15 10:22:58: Returning 134505552
    2009-12-15 10:22:58: Match song to playlist Playable AAC Files (3)
    2009-12-15 10:22:58: Adding item 245144 to 3
    2009-12-15 10:22:58: Playlist now has 1238 entries
    2009-12-15 10:22:58: Added playlist item
    2009-12-15 10:22:58: Comparing (datewise) 1250529571 to 1259683670
    2009-12-15 10:22:58: Returning 0
    #18865
    stretch
    Participant

    In the configuration there is on option to adjust “scan type”. This adjusts how the file scanner determines song duration & possibly the bit rate.
    0 = assume the Id tag is correct
    1 = look at a chunk of music near the middle and estimate
    2 = scan entire song and calculate

    How is your Firefly installation configured? From memory, the default is 2

    Is the bit rate in the Id tag for each track 256k?

    #18866
    Anonymous
    Inactive

    I’m uncertain how to check the bitrate in the id tag. The bitrate in iTunes “directly” managing the songs (the instance I actually loaded them with) shows 256k. The bitrate in another iTunes on another machine just accessing the songs, reports the incorrect bitrate as reported by firefly.

    The default is scan type 0; I tried 1 & 2 with no solution before posting here. Sorry I didn’t include that detail.

    I eventually gave up and made a hack in the code, namely in mp3-scanner.c:

            if (atom_offset != -1) {
    fseek(infile, atom_offset + 22, SEEK_CUR);

    fread((void *)&bit_rate, sizeof(unsigned int), 1, infile);

    pmp3->bitrate = ntohl(bit_rate) / 1000;
    /* edit starts here */
    /* AAC can never exceed 320, wrong value whacks roku */
    if (pmp3->bitrate > 320) {

    DPRINTF(E_DBG,L_SCAN,"Clamping bitrate from %d to 320n", pmp3->bitrate);
    pmp3->bitrate = 320;
    }
    /* edit ends here */
    } else {

    This is horribly ugly IMO, but has the practical effect of “working” 😀

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.