eichblatt / litestream

Time Machine live music streaming for microprocessor
GNU General Public License v3.0
1 stars 0 forks source link

Files that won't play in the browser #169

Open eichblatt opened 3 months ago

eichblatt commented 3 months ago

Can you check this one as an example - https://archive.org/download/gd1988-03-28.sbd.miller.91233.sbeok.flac16/gd88-03-28d1t01.ogg

eichblatt commented 3 months ago

The mp3 version of the file does play, https://archive.org/download/gd1988-03-28.sbd.miller.91233.sbeok.flac16/gd88-03-28d1t01.mp3 and it is much larger than the ogg file:

:  ~/data ; wget https://archive.org/download/gd1988-03-28.sbd.miller.91233.sbeok.flac16/gd88-03-28d1t01.mp3
:  ~/data ; ls -lrt gd88*
-rw-rw-r-- 1 steve steve 2589696 Apr 27  2015 gd88-03-28d1t01.mp3
-rw-rw-r-- 1 steve steve    4339 Apr 27  2015 gd88-03-28d1t01.ogg

So it looks like the ogg file is corrupted. In these cases, we should switch our preference from ogg to mp3, or at least try to find a playable file.

How can we identify these files in the player? I will see if they return an error code code, or if there is another way to detect them.

In cases where we know the URL's, I will modify the track information on the server, so that it will play the mp3 files instead of ogg.

eichblatt commented 2 months ago

I played around with replacing the URL on the fly, but I couldn't get it working.

We know that we should change the URL in this if clause in the code: https://github.com/eichblatt/litestream/blob/2795639ae3c846476071334eb95cece6b01685ce/timemachine/audioPlayer.py#L1007C1-L1012C1

But when I change the url,

self.playlist[self.current_track] = self.playlist[self.current_track].replace(".ogg", ".mp3") 
self.rewind()
self.play()

it gets corrupted

ma261065 commented 2 months ago

Where are we even getting the .ogg file from?

Looking at the playlist at https://archive.org/download/gd1988-03-28.sbd.miller.91233.sbeok.flac16/gd1988-03-28.sbd.miller.91233.sbeok.flac16_vbr.m3u it only lists the mp3 files.

Is the real problem that the metadata that we have for the set is out of date?

eichblatt commented 2 months ago

Wow, I was not aware of the existence of the "m3u" files! I tried a different show, but I was unable to download the m3u file (https://archive.org/download/gd1978-04-16.sbd.cantor.motb.81457.sbeok.flac16/gd1978-04-16.sbd.cantor.motb.81457.sbeok.flac16_vbr.m3u) so, I'm not sure they are useful.

I re-loaded the metadata from a.org, and it is the same.

Note: that if I update the tracklist to replace all '.ogg' with '.mp3', then I can play the show. But if I update the metadata of just that one track, then it fails with a decode packet failed (and sends a huge amount of data to the serial port).