pMusic 6.0.0

Audio editors, music players, video players, burning software, etc.
Message
Author
Michalis
Posts: 237
Joined: Tue 08 Jan 2008, 14:50
Location: Greece

#101 Post by Michalis »

So it seems that I didn't help :cry:
zigbert wrote:My conclusion (at this moment) is that; it doesn't matter how much we strip func_progressbar. Running this function once a second or 10 times a second shouldn't steal much cpu even on older systems. The problem seems to be the 'while' loop itself. It's running constantly, and sleep/func_progressbar doesn't seem to affect the cpu hunger. (Please correct me if I'm wrong.)
I'm not so sure about it, at least according to what I've seen in my system. Changing how often the "while fuction would be running, by changing the usleep parameter, I noticed that when the fuction was running I had a significant increase to the cpu usage. It was noticed in conky with sort spikes in the cpu usage graph.

Because of that what I tried to do is to reduce what the fuction was doing when running. So I deleted everything that had to do with time calculation and also made the loop run every 2 seconds, this makes it to just read the title output from ffmpeg and thus to use less cpu power.

Of course at the end as I've already told you I haven't any programming knowledge and I'm not sure if I'm correct or totally wrong also. But I think it would be better to keep your opinion and try to find solution over it.

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

#102 Post by zigbert »

Michalis
Could you measure what the difference is on your system, if func_progressbar is empty compared to the original.

Thanks
Sigmund

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

#103 Post by zigbert »

I have used 'top' to measure cpu usage, and couldn't see much difference. Now I have installed conky which shows dramatical differences. Which one is to trust?

Conky resut when running only Pmusic on my system:
66% - Normal
18% - No func_progressbar
23% - While-loop with sleep 1
9% - No progresbar

If conky is to trust, I have something to investigate :wink:

Sigmund

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

#104 Post by zigbert »

Version 0.3.1 is uploaded
See main post

cpu-usage on my system (conky):
3% - Idle
9% - Pmusic without progress bar
18% - Pmusic 0.3.1
37% - Gxine
66% - Pmusic 0.3.0

There is still a potential for even more cpu reduction. Let's take a look at the code in some time ... when we've learned more...

Sigmund

User avatar
Dingo
Posts: 1437
Joined: Tue 11 Dec 2007, 17:48
Location: somewhere at the end of rainbow...
Contact:

#105 Post by Dingo »

do you think to add a language support?
replace .co.cc with .info to get access to stuff I posted in forum
dropbox 2GB free
OpenOffice for Puppy Linux

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

#106 Post by Michalis »

Haven't used pmusic 0.3.1 yet, I'll try it later, but my cpu usage is similar to yours:
zigbert wrote:I have used 'top' to measure cpu usage, and couldn't see much difference. Now I have installed conky which shows dramatical differences. Which one is to trust?

Conky resut when running only Pmusic on my system:
66% - Normal
18% - No func_progressbar
23% - While-loop with sleep 1
9% - No progresbar

If conky is to trust, I have something to investigate :wink:
Don't know if conky or top is more trustful but all my comments are according to conky. Never thought that it can be wrong or give different results than top.

Maybe now I have drag you to the wrong path of cpu measurements :twisted:

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

#107 Post by zigbert »

Michalis
I'm excited to hear from you after played with 0.3.1. Are we on the right track or have you fooled both of us :D

Sigmund

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

#108 Post by zigbert »

Dingo
Translation will of course be supported. I just want to wait until I feel that Pmusic has arrived its lasting interface. I think we're close to it....

Sigmund

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#109 Post by trapster »

zigbert....please.

This version is nearly 300 bytes bigger then the last.
We are getting a little bloated here.
:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

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

#110 Post by Michalis »

zigbert wrote:Michalis
I'm excited to hear from you after played with 0.3.1. Are we on the right track or have you fooled both of us :D

Sigmund
Thank you and sorry for the delay but I didn't had much time, I had to do that thing called work :evil:

Ok I was going to post very few errors in the beginning but I couldn't leave you without some decent work reading and trying to figure out the solution :wink:


Anyway I tested it and it's better in cpu usage according to conky:
without progress bar: 16% average (13 to 19%)
with progress bar 43% average (35 to 47%)

It's lower but not optimal yet.

Of course I started it from rxvt in order to see if there are any errors and I noticed few.

Every time I start it, it displays:

Code: Select all

(gtkdialog3:7454): Gtk-WARNING **: Could not find the icon 'gtk-undo'. The 'hicolor' theme was not found either, perhaps you need to install it.
You can get a copy from:
        http://icon-theme.freedesktop.org/releases
where is "gtk-undo"?

Ok nothing serious till now, but then when I clicked on a song to play I got this:

Code: Select all

/usr/local/pmusic/func_progressbar: line 37: b/s
Stream

Press
1+1: division by 0 (error token is "Stream

Press
1+1")
It's referring to line 37 of func_progressbar:

Code: Select all

if [ "$NOW_PLAYING" ] && [ "$LENGTH" ] && [ "$[$SEC_PLAYED+1]" ] && [ ! "`echo "$SEC_PLAYED" | grep '10000000000'`" ] && [ ! "`echo "$FFMPEG_OUTPUT" | grep 'invalid'`" ]; then # +1 checks if it's a number
Then when it automatically changed to the next song in the playlist I got this error:

Code: Select all

/usr/local/pmusic/func_progressbar: line 37: 158
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
/usr/local/pmusic/func_progressbar: line 37: 158
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
expr: non-numeric argument
again for line 37 of func_progressbar, wrong time calculation? wrong way to calculate? I don't know.

Another error I got was when pressing the stop button:

Code: Select all

/usr/local/pmusic/func_progressbar: line 43: pmusic_stop-(*60): syntax error: operand expected (error token is "*60)")
referring to line 43:

Code: Select all

TIME_SEC=$[$SEC_PLAYED-($TIME_MIN*60)]
Last error was when exited using "file" "quit":

Code: Select all

/usr/local/pmusic/pmusic: line 618: kill: (22010) - No such process
Ok now live errors, I'm playing another song and I get this error:

Code: Select all

/usr/local/pmusic/func_progressbar: line 27: (01*60)+08: value too great for base (error token is "08")
It's being printed every second or 2.


Changing to the next song got me this error:

Code: Select all

/usr/local/pmusic/func_progressbar: line 37: 106
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
expr: syntax error
/usr/local/pmusic/func_progressbar: line 43: -(*60): syntax error: operand expected (error token is "*60)")

Another error:

Code: Select all

/usr/local/pmusic/func_progressbar: line 37: 125
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
/usr/local/pmusic/func_progressbar: line 37: 125
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
/usr/local/pmusic/func_progressbar: line 37: am
Stream

when using the fast forward I got this error:

Code: Select all

/usr/local/pmusic/func_progressbar: line 37: tream
Press
mdb:164,
mdb:164,+1: syntax error in expression (error token is "Press
mdb:164,
mdb:164,+1")

Something else I'm facing is that when using fast forward (30 secs next) it takes much time around 2-3 secs usually but even 8 secs the first time using it after pmusic lanch. After ff the time counter in progress bar always starts from 1 sec and counting althougth the song is playing for 1 or 2 minutes.


Another error I got now by pressing fast forward near the end of the song and so it had changed song is:

Code: Select all

/usr/local/pmusic/func_progressbar: line 37: 145
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
/usr/local/pmusic/func_progressbar: line 37: skiping
1+1: syntax error in expression (error token is "1+1")
/usr/local/pmusic/func_progressbar: line 37: 10000000000
video:0kB+1: syntax error in expression (error token is "video:0kB+1")
/usr/local/pmusic/func_progressbar: line 37: #0
Press
mdb:100,
1+1: syntax error: operand expected (error token is "#0
Press
mdb:100,
1+1")
Pause also seems not to work:

Code: Select all

/usr/local/pmusic/func: line 888: kill: (14332) - No such process
/usr/local/pmusic/func: line 888: kill: (14492) - No such process
/usr/local/pmusic/func: line 888: kill: (14784) - No such process

Anyway it seems that many errors have to do with line 37 of func_progressbar, so that must be the starting point, correct? Don't seem to be any important errors, rather than just code cleaning and debugging.

I'm also attaching all rxvt's output in order you want it.

Generally feeling: I'm satisfied using pmusic but needs some work in order to become perfect.
Attachments
pmusic errors.tar.gz
(946 Bytes) Downloaded 566 times

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

#111 Post by zigbert »

Ok I was going to post very few errors in the beginning but I couldn't leave you without some decent work reading and trying to figure out the solution
After reading through your report I can't find any errors, - only output to terminal ???????? The forward/rewind is slow, - true, but is Pmusic acting buggy ?????

Sigmund

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

#112 Post by zigbert »

Sorry Michalis
I see

forward/rewind doesn't update length in progressbar

I will update soon.

Sigmund

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

#113 Post by zigbert »

Version 0.3.2
See main post

Changelog 0.3.2
- Bugfix: 'Add' from menu didn't check for first-time-index.
- Bugfix: Move to top.
- Bugfix: Forward/rewind didn't update time in progressbar. (thanks to Michalis)

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

#114 Post by Michalis »

No it is not acting buggy, I just only wanted to give you a report with all the errors I get in terminal when using it. I thought that giving you a report with all the errors it would help you notice where it needs to concentrate, and according to what I've seen if you fix the time calculation there want be almost any errors.

I'm using 0.3.2 now and time in fast forward now works but now the progress bar ends, and the song is still playing, so there is no visual progress. If you ask me don't even bother fixing it but just keep it in mind.

User avatar
dogone
Posts: 202
Joined: Tue 22 Apr 2008, 02:53
Location: Arizona, USA

FLAC metatag support

#115 Post by dogone »

Zigbert,

Playing my FLAC encoded tunes in Pmusic 3.2 (Puppy 4.1 RC), I notice no apparent support for FLAC meta data. That data is plain text in FLAC music files so shouldn't pose a problem. Metaflac is installed so it may be as simple as calling it, etc,

I'm experiencing some 3.2 stability issues, but basic functionality is excellent. Mere "script" or not, Pmusic is looking very good. Keep up the great work - and thanks.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#116 Post by disciple »

Does it play audio CDs? :wink:
With CDTEXT? :wink:

At the moment I think audacious is the only player that does, but you can read CD-TEXT with CDDA2WAV or whatever it is - it'll just need a fair amount of parsing :)
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

#117 Post by zigbert »

The priority of future features depends of what Puppy need, and what I am capable to handle.

Language support: Yeah, it's time to look at this in a free minute.

CD-audio: Puppy already got gxine, which plays audio-CDs with CDDB. The meaning of Pmusic is not to be better than the great audio/media-players out there, but to fill a gap in Puppy. If we find a proper audio-player that does the job without any bloat, then we should trash Pmusic. Though, the funny part of Pmusic is that it is sooo small, since all dependencies is already inside Puppy. But of course, I'll put CD-audio on the wish-list....

Flac metatags: I thought Pmusic didn't play *.flac in 4.1rc, since the enhanced ffmpeg was removed for the older version? I also experienced that Pmusic (with big ffmpeg), not always would play my flacs. If we later see a stable flac-support, I will take a look at it.

Lyrics : Do anyone know how we could show lyrics in Pmusic. I really would like that. I like to sing along :)

Midi: Puppy doesn't support midi, but with Timidity we could. In some way Timidity also support *kar files - midi karaoke files. This would be fun, but maybe we should point it to a seperate application, rather trying to mix everything together.

Streamer: If this means radio, the answer could be the same as the CD-audio (already supported in Puppy), but since I already have looked at it, lets have a chat. Without any hokus pokus you can open a terminal and execute ffmpeg -i "http://rockfun24.de:9001" -f au - | aplay. This works nice, but it works with a very limited variety of channels. Also it doesn't return info about playing artist and song. Maybe it's my limited skills, and maybe it's ffmpeg. Please HELP..... Like the midi, I am unsure how complex I want Pmusic to become. Some time ago, I made a draft of Pradio, but since I didn't succeed, and the fact that Gxine does the job, I never finished the work.

Image

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#118 Post by trapster »

Lyrics:
I used this method for pulling up lyrics in a browser.

The site (http://lyricwiki.org) seems pretty good but I never had much luck using wget and parsing it.
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#119 Post by disciple »

If you do add midi support you might want to just use aplaymidi, so that people can use either timidity or fluidsynth depending on their personal preference.
IMO fluidsynth is much better as it uses less CPU.

I don't think this should be a priority though - how many people listen to midi files?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
dogone
Posts: 202
Joined: Tue 22 Apr 2008, 02:53
Location: Arizona, USA

Re: Flac metatags

#120 Post by dogone »

zigbert wrote:Flac metatags: I thought Pmusic didn't play *.flac in 4.1rc, since the enhanced ffmpeg was removed for the older version? I also experienced that Pmusic (with big ffmpeg), not always would play my flacs. If we later see a stable flac-support, I will take a look at it.
My having installed FLAC 1.2.x and METAFLAC may account for being able to play FLACs, but Pmusic appears to handle them nicely. That's the reason the lack of tag support concerns me (my entire music collection is FLAC).

Might it be relatively easy to implement FLAC tag support using Metaflac? Metaflac is very straight forward so using it to getting/setting tag info may not be very difficult.

Anyway, just placing the capability on your TODO list should suffice for the time being.

Post Reply