mp3 files played by server not working right

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

mp3 files played by server not working right

#1 Post by Limbomusic »

I hope its okay posting this in users/regulars puppy things. As it does fit kinda if one reads to the end.

This is a weird thing- just looking for any helpful feedback:

On my webserver (running puppy/hiawatha) I have a javascript mp3 player which plays a list of songs from a html page - the next song starts automatically when the last one finishes. example: (dont have to check it out) http://helledussen.com/groove/chill.html

But HERE is the problem: Sometimes that does NOT happen. A song will reach its end - and then it just stops. The next one does NOT start. (wtf?)

I researched like hell and wondered if there could be something in the html or js script but there ISNT.

I found the problem to be the .mp3 file itself (!)

To fix this problem I have done this: - and it ALWAYS works:

I copy the original mp3 file to somewhere else and I just edit it a little bit (like using audacity to cut away quiet time at end of song OR amplify everything a bit) - and copy it back - and suddenly the next song IS auto-played...

???

Could the original mp3 file be... damaged in any way?
Could it be the linux file-system (running ext4) be acting up?
Could the harddrive be faulty?

Any feedbacks would be greatly appreciated.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Hello limbomusic.

From my experience, mp3 files appear to be very "sturdy".

It may be worth running fsck.ext4 on your partition(s) or drive(s), if only to put
out of the way the possibility that your partition inodes may be mixed up.

After you have run the fsck.ext4 utility, all the files will be "in a clear sequence" (my
understanding) on the partition. This type of confusion on a partition happens because
a hard-drive partition is "magnetic", and these "magnetics" (again, my understanding)
vary with time, as the disk rotates on itself. This has to do with physics, not
programming: anything that rotates on itself rapidly creates a magnetic field.

Maybe your script is good, and does command a loop to the first song, but then the
filesystem on the partition is saying: "wait a minute, I can't go back to that mp3,
because I don't know where it begins anymore."

On a Linux filesystem, it is nothing to worry about too much, but you have to do a fsck
every once and a while, because, as I tried to explain above, fsck "resets the magnetic
bytes of the partition in a clear sequence" (again, my understanding). This mix-up of
inodes is a definite possibility, in particular if you use that partition a lot when creating
or editing your songs.

Just a few thoughts.

How-to:
To run fsck on a partition:
1) that partition has to be unmounted

2) you have to run it from another partition

3) the parameters that I use are the following:
fsck.ext4 -p -f -v /dev/partition
(replace "partition" with sda1 or sdb2, etc., as needed)

Finally, if interested, I have written a script called "automverif" that does this checking on
all ext? and vfat partitions (except the one the script is started from) automatically, here:
http://murga-linux.com/puppy/viewtopic. ... 433#742647

To finish the process, after the initial checking is finished, you change to another
partition and re-run the script. This run is faster because there is only one partition to
check. Then you know that all your partitions are "healthy" again.

(Note -- my script does not check ntfs partitions. Please use the appropriate
WhineDose utilities to check those.)

IHTH. BFN.
Last edited by musher0 on Wed 07 Mar 2018, 02:57, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

ok

#3 Post by Limbomusic »

I will certainly try all your suggestions. Much appreciated :-)

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#4 Post by don570 »

I would be suspicious of the version of java that Barryk uses.

I know that he heavily redacts the version of python in Puppy linux,
so it wouldn't surprise me if he leaves out some java packages that are needed for web pages playing an app.
_____________________________________________________

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: mp3 files played by server not working right

#5 Post by MochiMoppel »

Limbomusic wrote:On my webserver (running puppy/hiawatha) I have a javascript mp3 player which plays a list of songs from a html page - the next song starts automatically when the last one finishes. example: (dont have to check it out) http://helledussen.com/groove/chill.html

But HERE is the problem: Sometimes that does NOT happen. A song will reach its end - and then it just stops. The next one does NOT start. (wtf?).
I took the liberty to check it out, None of the songs show the problem. You should provide a demo of a problematic song and not a list where every song plays as expected.

With "sometimes" you mean that a certain song normally continues but sometimes just stops or that sometimes you find songs that always show the problem?

Since you already have excluded your javascripts from the list of possible culprits (based on what?) and only left us with your conclusion that the mp3s are to blame there is possibly no point to argue about any other causes, only this:
Opera doesn't understand your javascript at all. Only the automatic update of the player title when clicking on song title works.
Using Palemoon the player works, but the volume control does not, at least not reliably.

Your javascript must base the decision to play the next song on "something", and this "something" must be defined in the script, so I very much suspect the script. And then, of course, as a second guess I suspect the browser not to understand what the script is trying to do.
Limbomusic wrote:I copy the original mp3 file to somewhere else and I just edit it a little bit (like using audacity to cut away quiet time at end of song OR amplify everything a bit) - and copy it back - and suddenly the next song IS auto-played
And what happens if you just copy it back without changing anything? This would be an easy way to check for an error type mentioned by musher0. Copying back should place the file into a cluster different from where it was located before.

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

hey mocimoppel

#6 Post by Limbomusic »

Mochi: I managed to recreate the problem:

http://helledussen.com/test/

on the song Enya - Diamonds on the water - the song will end without playing the next one. ( u dont have to listen to the whole song, u can just click near the end of the play song field)

The others are okay - ??? I,ll bet if I edit that particular mp3 in any way it will be okay.
w t f?
Thank you so much for thaughts. And new ones.

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

o m g

#7 Post by Limbomusic »

Now I see that the same thing happens to the first 2 songs. NOT the third.

?

The fourth song starts no problem. (????)

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#8 Post by MochiMoppel »

No problem here with any of the songs. Try a different browser.

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

huh

#9 Post by Limbomusic »

U kidding??

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#10 Post by MochiMoppel »

Nei.

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

huh

#11 Post by Limbomusic »

I just tried edge. Every song played auto.

ok.

huh. Problem with chrome then? so weird.

At least I know more now than I did. Much more. Thanx man. And the others who replied.

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#12 Post by fredx181 »

Hey Limbo,

I'm on Firefox 58.02 and all songs play fine following each other from here:
http://helledussen.com/test/

Fred

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

ok

#13 Post by Limbomusic »

Thanx Fred.
So weird. But at least now I know that its a browser-problem. :-)

I would NEVER have guessed. SO evereyone s been a help. Thanx !

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: huh

#14 Post by greengeek »

Limbomusic wrote:I just tried edge. Every song played auto.

ok.

huh. Problem with chrome then? so weird.
Do you ever get problems where the browser throws up a message saying something like: "Aw Snap! something went wrong with this webpage"?

sheldonisaac
Posts: 902
Joined: Mon 22 Jun 2009, 01:36
Location: Philadelphia, PA

Re: hey mocimoppel

#15 Post by sheldonisaac »

Limbomusic (in part) wrote:I managed to recreate the problem:
http://helledussen.com/test/
on the song Enya - Diamonds on the water - the song will end without playing the next one.
I'm late to this party, and not expert at all.
I tried it; the next one 'Long long journey' played fine.
Iron (variation on Chrome), Xenial Puppy 7.0.6 (from musher0)
Dell E6410: BusterPup, BionicPup64, Xenial, etc
Intel DQ35JOE, Dell Vostro 430
Dell Inspiron, Acer Aspire One, EeePC 1018P

matchpoint
Posts: 168
Joined: Fri 26 Jan 2018, 20:54

#16 Post by matchpoint »

Limbo, your song transitions for me on both Chromium 63/32 and the latest PaleMoon.

User avatar
Limbomusic
Posts: 267
Joined: Fri 15 Apr 2016, 14:07
Location: Norway
Contact:

aw snap

#17 Post by Limbomusic »

green: Yeah the "aw, snap something went wrong, try to reload"-error message HAS troubled me on occasion in Chrome. But only on heavy websites and old hardware with little ram. I had that problem on an old stationary pc not so long ago. It had tahr32_6.0.5 on it. with a 2gb swap and 2gb ram. I never found out why chrome would crash. So its interesting that u point that out.
The problem was solved by installing tahr64_6.0.6 and a newer version of chrome - hasnt crashed since.

But this mp3 auto-play problem is not related to that anyway - cause it happens on all kinds of different machines. It just never occured to me that it could be a browser problem.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

Re: aw snap

#18 Post by greengeek »

Limbomusic wrote:But this mp3 auto-play problem is not related to that anyway - cause it happens on all kinds of different machines. It just never occured to me that it could be a browser problem.
I just feel that Chrome has this habit of stuffing up memory pointers resulting in weird symptoms. Hard to believe that a Google product gets memory flags so wrong - yet Chrome just seems so much less stable than Firefox used to be.

Post Reply