Author |
Message |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Tue 06 Mar 2018, 17:03 Post subject:
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.
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 13494 Location: Gatineau (Qc), Canada
|
Posted: Tue 06 Mar 2018, 18:29 Post subject:
|
|
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.php?p=742647&sort=lastpost&search_id=1383590433#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.
_________________ musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Last edited by musher0 on Tue 06 Mar 2018, 22:57; edited 1 time in total
|
Back to top
|
|
 |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Tue 06 Mar 2018, 19:53 Post subject:
ok Subject description: then |
|
I will certainly try all your suggestions. Much appreciated
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5259 Location: Ontario
|
Posted: Tue 06 Mar 2018, 21:20 Post subject:
|
|
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.
_____________________________________________________
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1768 Location: Japan
|
Posted: Tue 06 Mar 2018, 23:17 Post subject:
Re: mp3 files played by server not working right |
|
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.
|
Back to top
|
|
 |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Fri 09 Mar 2018, 11:05 Post subject:
hey mocimoppel Subject description: ok |
|
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.
|
Back to top
|
|
 |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Fri 09 Mar 2018, 11:10 Post subject:
o m g Subject description: now |
|
Now I see that the same thing happens to the first 2 songs. NOT the third.
?
The fourth song starts no problem. (????)
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1768 Location: Japan
|
Posted: Fri 09 Mar 2018, 11:19 Post subject:
|
|
No problem here with any of the songs. Try a different browser.
|
Back to top
|
|
 |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Fri 09 Mar 2018, 11:20 Post subject:
huh Subject description: ? |
|
U kidding??
|
Back to top
|
|
 |
MochiMoppel

Joined: 26 Jan 2011 Posts: 1768 Location: Japan
|
Posted: Fri 09 Mar 2018, 11:25 Post subject:
|
|
Nei.
|
Back to top
|
|
 |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Fri 09 Mar 2018, 11:28 Post subject:
huh Subject description: ure right |
|
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.
|
Back to top
|
|
 |
fredx181

Joined: 11 Dec 2013 Posts: 3692 Location: holland
|
Posted: Fri 09 Mar 2018, 12:30 Post subject:
|
|
Hey Limbo,
I'm on Firefox 58.02 and all songs play fine following each other from here:
http://helledussen.com/test/
Fred
_________________ Dog Linux website
|
Back to top
|
|
 |
Limbomusic

Joined: 15 Apr 2016 Posts: 273 Location: Norway
|
Posted: Fri 09 Mar 2018, 12:43 Post subject:
ok Subject description: then |
|
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 !
|
Back to top
|
|
 |
greengeek

Joined: 20 Jul 2010 Posts: 5398 Location: Republic of Novo Zelande
|
Posted: Sun 11 Mar 2018, 14:02 Post subject:
Re: huh Subject description: ure right |
|
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"?
|
Back to top
|
|
 |
sheldonisaac
Joined: 21 Jun 2009 Posts: 784 Location: Philadelphia, PA
|
Posted: Sun 11 Mar 2018, 14:55 Post subject:
Re: hey mocimoppel Subject description: ok |
|
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: Xenial, Bionicpup64, etc
Dell Mini 9, Acer Aspire One, EeePC 1018P, PowerBook G4
Intel D865GBF, Intel DQ35JOE
|
Back to top
|
|
 |
|