MP3 playback problem - possible ID3 related

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
regh
Senior User
Posts: 25
Joined: Thu 2020-11-05 13:50

MP3 playback problem - possible ID3 related

Post by regh » Mon 2021-02-01 13:17

Hi
We're having a problem with playback of an mp3 file where the player just appears skip over a particular track (I don't know if it's trying to play it but views it as being 0s length). The file uses ID3v2, so the tag information is at the front of the file.

I saw an earlier post in the VS1005 forum related to this viewtopic.php?f=13&t=2185&p=11525&hilit=id3#p11525 that proposed a fix and said that it would be fixed in a newer versions. Are there known issues with ID3 tags with the VS1010?
As always, thanks in advance for any help!

regh
Senior User
Posts: 25
Joined: Thu 2020-11-05 13:50

Re: MP3 playback problem - possible ID3 related

Post by regh » Mon 2021-02-08 11:07

Any news on this from the VS1010 team?

User avatar
Henrik
VLSI Staff
Posts: 1199
Joined: Tue 2010-06-22 14:10

Re: MP3 playback problem - possible ID3 related

Post by Henrik » Tue 2021-02-09 9:21

Hello!

Is it possible for you to provide us with the offending stream, either by attaching it to this forum, or by sending it to our support e-mail (support at vlsi dot fi) and then notifying here that you have done that? Otherwise it may be very difficult to try to guess what goes wrong.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

regh
Senior User
Posts: 25
Joined: Thu 2020-11-05 13:50

Re: MP3 playback problem - possible ID3 related

Post by regh » Tue 2021-02-09 10:51

Hi Henrik
Thanks for responding. I've sent an email to support with the title "MP3 playback problem - possible ID3 related" and attached the mp3 (I'm not entirely sure what the licencing arrangement with it is).

User avatar
Henrik
VLSI Staff
Posts: 1199
Joined: Tue 2010-06-22 14:10

Re: MP3 playback problem - possible ID3 related

Post by Henrik » Tue 2021-02-09 11:44

Hello!

I've received the file and started analyzing it. Does the following quick analysis seem correct? Particularly the playback time of 11 minutes 44.4 seconds?

Code: Select all

ID3v2 header: 87017 / 0x153e9 bytes
ID3v1 TAG:  128 / 0x0080 bytes
    Size: 8340.0 KiB / 8.1 MiB
  Format: MP3
    Conf: 1 channels @ 44100 Hz
  Frames: 26966
    Time: 11:44.4
  ChMode: Mono 100.0%
 Bitrate: 97.0 kbit/s CBR (96 kbit/s, 46.9% padding frames)
  96kb/s: 26966 ***************************************************************
 BitResv: Minimum 0 bytes, Maximum 511 bytes, Mean 417.5 bytes
   0- 31:    46 .
  32- 63:   392 **
  64- 95:   261 *
  96-127:   187 .
 128-159:   197 *
 160-191:   185 .
 192-223:  2799 **************
 224-255:   268 *
 256-287:   340 *
 288-319:   578 ***
 320-351:   611 ***
 352-383:  1013 *****
 384-415:  1206 ******
 416-447:  1972 **********
 448-479:  4960 **************************
 480-511: 11951 ***************************************************************
All of this looks good and well to me: there is an ID3V2 tag (or, actually, header), but it's small and has no errors in it.

What is your playback system? What application do you use to try to play back the file, and how? When you say the the system says this file is 0 seconds in length, what is it that tells you that?

Kind regards,
- Henrik
Good signatures never die. They just fade away.

regh
Senior User
Posts: 25
Joined: Thu 2020-11-05 13:50

Re: MP3 playback problem - possible ID3 related

Post by regh » Tue 2021-02-09 16:23

Hi Henrik
That all seems sensible.
I'm playing on a vs1010 with the audio being stored on a usb stick. The application I'm using is based on the USB arch tree player from herehttp://www.vsdsp-forum.com/phpbb/viewtopic.php?f=15&t=2309 (I've not tried the new usb code yet).

The file is played by copying the path to the file to player.filespec, and then unpausing the player as in the example. The track is in a directory with other tracks on the usb which play fine and I've tried with both the existing name and changing it to a smaller one. When I say it appears as if it is 0s long I mean it shows up as it's about to play the track then automatically moves onto the next one, as if the track had just finished.

User avatar
pasi
VLSI Staff
Posts: 1763
Joined: Thu 2010-07-15 16:04

Re: MP3 playback problem - possible ID3 related

Post by pasi » Tue 2021-02-09 17:38

The player routine you use in vs1010 probably just passes the file to the mp3 decoder, which then tries to find a valid mp3 header, finds it inside the ID3v2, but fails decoding an mp3 frame, and then returns with an error. (If your other files have ID3v2 headers, they apparently do not contain anything that could be mistaken as a mp3 header.)

vs1005 playfile is much more intelligent in that it detects and correctly skips the ID3v2 header, and then detects the audio format and opens and calls the corresponding decoder.

The vs1010 player routine would thus require a similar wrapper to detect and skip ID3v2 headers. (Another workaround might be to not set a decode tag codMpgLeaveOnError when creating the decoder, but then it might take a very long time to process files you're trying to play which are not actually mp3. And you would still need to find a way to make this change.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

regh
Senior User
Posts: 25
Joined: Thu 2020-11-05 13:50

Re: MP3 playback problem - possible ID3 related

Post by regh » Thu 2021-02-18 10:31

Hi Pasi

Thanks for this. So how would we go about skipping the header then? At present the player is just a black box to me - I just tell it what file to play. How would I get the player to skip over the header, my understanding is that is all done in the ROM which I can't modify?

User avatar
Henrik
VLSI Staff
Posts: 1199
Joined: Tue 2010-06-22 14:10

Re: MP3 playback problem - possible ID3 related

Post by Henrik » Thu 2021-02-18 12:41

Hello!

With the help of your file, we have developed a patch that allows VS1010d to skip over problematic ID3v2 headers. The driver is abailable in a separate thread, here:
viewtopic.php?f=15&p=14021#p14021

This should solve your playback compatibility issues.

Kind regards,
- Henrik
Good signatures never die. They just fade away.

regh
Senior User
Posts: 25
Joined: Thu 2020-11-05 13:50

Re: MP3 playback problem - possible ID3 related

Post by regh » Thu 2021-02-18 15:00

Excellent, thanks for sorting this. We'll test this and report back if we have any issues.

Post Reply