mp3 files played by server not working right
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
mp3 files played by server not working right
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.
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.
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.
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)
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
ok
I will certainly try all your suggestions. Much appreciated
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
Re: mp3 files played by server not working right
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.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?).
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.
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.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
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
hey mocimoppel
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.
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.
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
o m g
Now I see that the same thing happens to the first 2 songs. NOT the third.
?
The fourth song starts no problem. (????)
?
The fourth song starts no problem. (????)
- MochiMoppel
- Posts: 2084
- Joined: Wed 26 Jan 2011, 09:06
- Location: Japan
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
huh
U kidding??
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
huh
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.
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.
Hey Limbo,
I'm on Firefox 58.02 and all songs play fine following each other from here:
http://helledussen.com/test/
Fred
I'm on Firefox 58.02 and all songs play fine following each other from here:
http://helledussen.com/test/
Fred
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
ok
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 !
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 !
Re: huh
Do you ever get problems where the browser throws up a message saying something like: "Aw Snap! something went wrong with this webpage"?Limbomusic wrote:I just tried edge. Every song played auto.
ok.
huh. Problem with chrome then? so weird.
-
- Posts: 902
- Joined: Mon 22 Jun 2009, 01:36
- Location: Philadelphia, PA
Re: hey mocimoppel
I'm late to this party, and not expert at all.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 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
Intel DQ35JOE, Dell Vostro 430
Dell Inspiron, Acer Aspire One, EeePC 1018P
-
- Posts: 168
- Joined: Fri 26 Jan 2018, 20:54
- Limbomusic
- Posts: 267
- Joined: Fri 15 Apr 2016, 14:07
- Location: Norway
- Contact:
aw snap
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.
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.
Re: aw snap
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.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.