Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bugs
  • Category Codecs
  • Assigned To
    Buschel
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Release 3.7.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by saratoga - 2011-01-31
Last edited by Buschel - 2011-02-02

FS#11916 - MP4 parser fails with filesize = 0

http://churfirstenblick.ch/radio/radiozu.mp4

This file fails with the following message in the sim:

Read metadata for /radiozu.mp4
MP4 metadata error. errno 0, samples 2428928, frequency 44100, filesize 0
parsing /radiozu.mp4 failed (format: AAC)

This is printed in apps/metadata/mp4.c because the read_mp4_container returns a filesize of 0 bytes. The file seems to play ok in foobar2000.

Closed by  Buschel
2011-02-02 09:39
Reason for closing:  Fixed
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

Fixed with r29185 and r29186.

This patch does simply take the file_size when recognizing “free” as id3→filesize.

Edit: This is of course not a proper solution. Main reason for the failure seems to be that the parser does not find the “mdat” signature which is present in the file.

The runtime is also not correctly identified for this song. rockbox does only show half the runtime (0:55 min). During playback rockbox plays the full 1:50 min duration and the counter rises with half speed.

Here is the real fix: Our parser tries to read metadata from an “ilst” tag of size 0. In consequence the next “mdat” is missed. The fix does only try to read metadata if the “ilst” size is at least 8 bytes (= size of an mp4 atom).

Still the runtime is not calculated correctly.

Here we go. This patch does two things:
1) Fix the parser to allow playback in general (like v02)
2) Fix seek, timebar and duration for files with SBR upsampling.

For 2) there are only few changes neccessary. “upsampling” can be detected from the stream. In this case the decoder outputs twice as much samples/framesize. So, the runtime is doubled and the the bitrate is halfed. The time-based seek methos alac_seek() does not know of this fact and needs input (and generates output) based on the smaller runtime/framesize. This is done via a simple correction factor “sbr_fac” which was introduced.

So far this patch works for all my test files including AAC, AAC-HE, seek/resume.

Found a way to detect implictly signalled SBR upsampling in our metadata parser. Now the length and bitrate is correct right after parsing the metadata.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing