pMusic 6.0.0

Audio editors, music players, video players, burning software, etc.
Message
Author
User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#221 Post by DaveS »

Puppy 4.2 Frugal. Pmusic 0.6.3. Disabling progress bar from file>preferences, new setting sticks if Pmusic is closed by WM (JWM), but not if file>quit is used. Also no theme.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#222 Post by DaveS »

Watching CPU response when Pmusic is playing, it appears that at various times Pmusic reads ahead the song file, processes it, and buffers it ready to play. Is it possible that it reads ahead a bit too far, which causes the stutter? Could it be made to read ahead a little less data but a bit more often? Am I totally wrong anyway?
Spup Frugal HD and USB
Root forever!

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#223 Post by zigbert »

DaveS
Disabling progress bar from file>preferences, new setting sticks if Pmusic is closed by WM (JWM), but not if file>quit is used
Thanks

Buffering:
Pmusic is a very simple piece of code. The playing engine is a one-liner:
ffmpeg -i /path/file.mp3 -f au - | aplay -f cd
I guess buffering must be added here. Hopefully someone creative souls with buffering knowledge reads this and help us out. At the moment I'm blank.


Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#224 Post by zigbert »

I see there is a -B switch for aplay (buffer). Hmmmm...... We should test this.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#225 Post by zigbert »

TESTING TESTING !!!!!!

Could ALL of you try this command in terminal. You must insert your own music file where it says /path/file.mp3. After song has started playing, - open gimp or another huge app that normally makes Pmusic stutter. This command plays without ANY stutter for me. Does it work for you.

ffmpeg -i /path/file.mp3 -f au - | aplay -f cd -Dplughw

Thanks for your help
Sigmund

Michalis
Posts: 237
Joined: Tue 08 Jan 2008, 14:50
Location: Greece

Tested and playback is perfect

#226 Post by Michalis »

I just tested it with 4 programs running 2 of them big and cpu cycles eaters and the sound was very smooth without any shutter. I think you made it, it must be the best command for playing mp3s you've used till now.

To be sincere lately I have give up pmusic in favor of aqualung but I think now, with the improvements you've made, it's time to come back at least for the mp3s. I'll test both of them later on my dinosaur cel 366MHz and post the results for comparison.

Another thing I'm wondering is whether would be an option to drop gtk3dialog in favor of vala? Gtk3dialog doesn't seem to be very flexible and sufficient, you have mentioned it also. From the other hand I know that you have put enormous amount of time on gtk3dialog and it must be very difficult to change over, but maybe does it worth to? I don't know just my 2eurocents, anyway I'm just a guy using programs not creating.

Keep up the good work.

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#227 Post by DaveS »

No stutter, but I would like to test in Pmusic with the progress bar enabled as that is what causes stutter on my system. I guess I just need to change the command in one of the scripts. Which script please?
Spup Frugal HD and USB
Root forever!

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#228 Post by 01micko »

zigbert wrote:TESTING TESTING !!!!!!

Could ALL of you try this command in terminal. You must insert your own music file where it says /path/file.mp3. After song has started playing, - open gimp or another huge app that normally makes Pmusic stutter. This command plays without ANY stutter for me. Does it work for you.

ffmpeg -i /path/file.mp3 -f au - | aplay -f cd -Dplughw

Thanks for your help
Sigmund
:mrgreen:

Ok, here's a screeny showing that command only using 1% cpu and 1% ram, but I do have 768M of ram now (found more at dump, hehe)

I'll test on my dinosaur later. Are we being cruel to dinosaurs?
Attachments
top.jpg
(88.54 KiB) Downloaded 675 times
Puppy Linux Blog - contact me for access

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#229 Post by zigbert »

Michalis
Pmusic is my gtkdialog testbench. Many things I previous said was impossible with gtkdialog is now a part of Pmusic.
- backend/frontend
- remember window size/placement
- theming
- Kill pid when closing from wm
- low cpu usage (next release will probably have even lower)

There are plenty of other audio players out there, and if we find one that suits Puppy better than Pmusic, we should go for it...... In the meantime, I'm playing with gtkdialog.....learning new tricks.....and making Pmusic better. New ideas is drafted, and will come in some future.

DaveS
the script is /usr/local/pmusic/func - (around) line 1077:

echo "exec ffmpeg -i \"$PLAYLIST\" -ss $SS -f au - 2>> $WORKDIR/pmusic-ffmpeg_output | aplay -f cd -D plughw 2> /dev/null" >> $WORKDIR/pmusic-exec


Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#230 Post by zigbert »

Mick
If we get the cpu usage acceptable, we could think of include the pCD code into Pmusic. What we need is the right way to do it. Do you have any thoughts......

Your dinosaur testing is important


Sigmund

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#231 Post by 01micko »

Hmmmm...

Keep pCD as a separate script and call as a case? But.... do we run into problems with cdda or cddb? ie, doubling up?


OR

Autodetect if a cd is inserted while Pmusic is running and call pCD, keeping pCD as a separate app.

just my 2c

Dino results will be in about 6 to 8 hours... that four letter word.. work!
Puppy Linux Blog - contact me for access

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#232 Post by DaveS »

Ran Pmusic with modified Func script and had only two very small drop-outs in 12 mins of music play, which is a huge improvement. Drop-outs were also very quick and small.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#233 Post by DaveS »

Its really interesting to watch the Pwidgets CPU usage bar while playing a song with Pmusic. You can see the dramatic, very quick increases in CPU usage, presumably when Pmusic buffers the song. It is at these points that the drop-outs occur, when this process swamps the CPU.
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#234 Post by DaveS »

I am using a laptop with 1gig ram, and a 1.6 gig dual-core processor. I have a bunch of different Pups on here, including 4.2SMP, which is compiled to run on a dual core machine. The overall improvement in sound quality and smoothness on this Pup has to be heard to be believed. The CPU usage bars never go above half way, and mostly barley move while Pmusic is playing. No drop-outs. Ever. Makes you realise how much more performance can be had with a Dual-core when Puppy is compiled for it.
Spup Frugal HD and USB
Root forever!

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#235 Post by 01micko »

8) Thumbs up for the dino test.

Had lost of stuff running, and posting this while track is playing, not a single stutter, The IBM K6 400MHz, 256ram (including 8M onboard graphics, so 248ram)
Attachments
top.jpg
(87.64 KiB) Downloaded 627 times
Puppy Linux Blog - contact me for access

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#236 Post by 01micko »

Now

I'm in 4.2 now, testing Pmusic with the hack to the func file and without the hack. I left the progress bar running. Both versions work fine with only Pwidgets and other background stuff running. As soon as I opened Htop the NOhack version stuttered a litle, the WITHhack did not until I took the screeny and rezised etc. The figures explain themselves in the screenies below.

This has been the most successful version of Pmusic (6.3) so far on the Dino. :D (That's it's name now, thanks Michalis, :lol: ).

One thing Sigmund. In you "TESTING" post you had the option as "Dplughw" but the hack to line 1077 in func you had "D plughw". Which one? (I put the space :wink: , and it worked, however it worked just calling ffmpeg and aplay in your first example with out the space :? )

Here you go...
Puppy Linux Blog - contact me for access

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#237 Post by zigbert »

Version 0.6.4
See main post

Changelog:
- Added '-D plughw' to aplay command to avoid stutter and lower cpu usage.
- Bugfix: Closing Pmusic from file>quit didn't save settings. (thanks to DaveS)
- Bugfix: Use original gtktheme when opening external programs. (Sorry Mick)
- Bugfix: Play first song if nothing is selected in playlist.

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#238 Post by 01micko »

zigbert wrote:Version 0.6.4

- Bugfix: Use original gtktheme when opening external programs. (Sorry Mick)
Hehe.... that is not a worry!

Downloading now.....
Puppy Linux Blog - contact me for access

Michalis
Posts: 237
Joined: Tue 08 Jan 2008, 14:50
Location: Greece

tested on dinosaur

#239 Post by Michalis »

Hi zigbert,

First of all please don't take my previous words as an attack or offence against your work. What you're doing with your p-programs is great and I'm admiring you and your work. They were just some thougths I had from the time Barry posted about Vala and Genie combining them also with few posts you had written, in which you were admitting some limitations of gtk3dialog.


Anyway I tested pmusic 0.6.4 in my dino which is a 366MHz celeron with 256Mbyte ram and the results are astonishing. I tested pmusic first with the progress bar, then without the progress bar and at the last I tested aqualung, since I think it's good to check also what the competition is doing.

At the same 2 songs one after the other the results according to TOP in puppy 4.1.2 are:


With progress bar:
ffmpeg mem:4% cpu:9%
gtk3dialog mem:10% cpu:2-5%
aplay -f cd -D plughw mem:1% cpu:0-1%
couple more commands mem:5% cpu:0%


Without progress bar:
ffmpeg mem:4% cpu:9%
gtk3dialog mem:7% cpu:0%
aplay -f cd -D plughw mem:1% cpu:0-1%
couple more commands mem:5% cpu:0%


Aqualung: mem:44% cpu:31-33%


With the term couple more commands I'm referring to some commands that are noticeable and refer to pmusic.

As you can see on memory and cpu usage pmusic is great and now with the buffering I haven't notice any shutter, even with the cpu usage at 100% for a lot of time (isn't difficult to achieve it in the dino). As you can also see from the compare with aqualung you get it hands up. Only think I like in aqualung that pmusic doesn't have is the gap-less playback between songs, please check whether you can make it.


By the way if you or anybody else reading this post would like to test a program, a function or anything else in this computer, just send me a pm and in couple of days I'll give you a report.

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#240 Post by zigbert »

Michalis
You have not attacked me in any way. Feedback and suggestions are very welcome. Thanks a lot!!!!!

I'm glad to hear that cpu/mem usage has reach an acceptable level.

It is very clear that gtkdialog has its limits. It could be that making a music player with gtkdialog is to push the limits too far. - Let's see.

I find both aqualung and alsaplayer as good audioplayers, but they don't fill all my needs. Amarok does, but it fills both my screen and cpu-cycles.

I'm just trying to fill a gap in Puppy. Pmusic is at the moment adding 24kb to the Puppy iso, and I personally think it's worth the bytes.

Gapless playing is possible, but I have to find a way to do it without eating too many resourses.....


Sigmund

Post Reply