I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / 3Com Audrey
anyone successfully using phjuke on jukebox usb1-1?

New Messageanyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
I have been trying to get phjuke to run without pops/clicks/hisses etc. on my audrey with the jukebox usb 1-1 image (using SMC 2202 nic) . I have tried mounting via fs-cifs and fs-nfs2 but no success. Still skips. I have also tried different values for MADPLAY_PREBUF_KBYTES with no luck.
I then killed shelf and a few other processes but I still can't get good output. Any suggestions?
04-24-2002 08:51:16

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
The problem, if you would call it that, is in the overhead of mounting a share. It's the character of the QNX beast in Audrey. Even original Audrey was barely capable, if at all, playing MP3 from a share, read the multiple posts on this board. For me it's beating a dead horse.
In my opnion MP3 playing should be done with HTTP, the protocol with the lowest overhead. On this board are several threads/posts how to do MP3 playing over HTTP, even scripts exist allowing you to make playlists on the fly from your existing MP3 files directoy.
From the start however the direction MP3 playing with Audrey took, was from a share. I consider that as understandable as wrong for Audrey.

jukebox


http://www.prins.net/audrey/index.html
04-24-2002 11:40:25

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jhd3rd
Profile
I'm sorry, but I have to disagree with jukebox. Phjuke works great for me, and always has. I can play MP3s all day long without a single skip, click or pop. I use fs-cifs, and have shares mounted from 2 machines, which means that I have not 1 but 2 instances of fs-cifs running. If the problem was due to the overhead of fs-cifs, then I should certainly be having a problem. I don't. Most of the original MP3 complaints were about the Photon Mediaplayer, not phjuke.

ghansah, phjuke is a great app, and well worth your time to trouble-shoot. I suggest you try trouble-shooting your network. Do you have hubs or long cable runs between your PC and Audrey? If you have a crossover cable available, why not try to connect the Audrey and the PC directly to one another? This should eliminate any problems you might be having with cables or hubs. There might also be a problem with madplay and your MP3s. If all of your MP3s have been created by you by ripping from CDs, try using a different encoder, experiment with different bit rates, or download a few MP3s from different sites and try them. My guess is that you can find and fix this problem.

04-24-2002 12:46:01

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
Thanks for the suggesstions.

jhd3rd, I am connecting the audrey to a switch through a 25 ft cable. Perhaps this is too long. I'll try a crossover cable. Also, thinking about my MP3s, I think I used lame to encode them with variable bit rates...perhaps that's part of the problem. I'll try using a constant rate to see it that helps.

04-24-2002 13:15:09

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) smee
Profile
I agree with jhd3rd. I don't have any problems playing mp3s using a share. Right now, phJuke is probably the most important application I run on my Audreys.

Most of the time I'm using Audreys with limited hacking. Not much more than the shell hack, mounts, ped, etc. I'm using the original browser to connect to HomeSeer to control lights, check temperatures, etc.

I have no network related problems. The path between the server and my furthest Audrey:

server (Celeron 950, 5400 rpm 40G drive)
7 foot cat5 cable
5 port switch
15 foot cat5 cable
Linksys router/4 port switch
50 foot cat5 cable
8 port switch
60 foot cat5 cable
Audrey

I don't have any problems with this and it's definitely not a short, simple connection between the machines. There are other machines hanging off each switch and a wireless access point thrown in for good measure. I don't think cable length is an issue.

I think the encoding of the mp3s is worth looking into. I have not played around with different methods. Almost all my stuff is ripped from cds using MusicMatch at only 160K CBR. Not what most audiophiles would like, but I'm happy with it. I can experiment with higher bit rates and see what happens.

04-24-2002 13:33:32

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
OK I hear what you guys say. Still I believe if an app like phJuke could use the HTTP protocol it would be a better deal for all of us. Let there be no misunderstanding, I consider phJuke to be a great app as it is now but the HTTP protocol does have the lowest overhead. Nobody can deny that either.

jukebox


http://www.prins.net/audrey/index.html
04-24-2002 13:52:19

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jhd3rd
Profile
jukebox, I don't think it has ever been demonstrated that fs-cifs has such a high overhead. There has been plenty of speculation, but no proof. I personally use it for MP3s and keep a large portion of my binaries and libs on my shares with no problems at all. To my knowledge, no one has demonstrated that mediaplayer decoding an http stream is more efficient than phjuke playing from a share. Show me some numbers for CPU and/or memory usage and I can be swayed.

As for using http, even if it is better in terms of overhead, it isn't better in terms of ease of use. It requires you to have an http streaming server running on your PC, some sort of system for creating playlists, and there isn't a lot of flexibility in terms of selecting songs quickly from Audrey. The combination of winamp, shoutcast, and snowcrash has been suggested as a solution, and is being used successfully by some, but it's not exactly an easy system to set up or administer. For my money, it's a heck of a lot easier to just browse for a song and hit "play". http streaming is certainly a good option for some, especially if you want to be able to set up a "radio station" accessible from different locations, but I think most people would find playing from a share to be the simplest option.

04-24-2002 14:18:07

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) bholio
Profile
I spent a considerable amount of time getting phjuke working over fs-cifs. Try copying a large (3-4M) file from your share back to itself and time it. Like this:

time cp /share/4Mfile /share/4Mfile2

Do this over fs-cifs and fs-nfs. This should help you narrow down which one is faster. Keep doing this test as you change things around to see what helps and what does not.

Here are some of my findings which might save you some time.
- I found fs-nfs to be the faster than fs-cifs connected to a Linux server. As I needed this to work over fs-cifs, this didn't help me much. fs-cifs was about the same speed whether connected to Windows98 or Linux.
- Do not use the -v options on fs-cifs. This really slowed stuff down for me (by a factor of 2-3). No idea why, but it did. Ultimately this solved my problem.
- Altering the priority (slay -P xx) of fs-cifs did not help at all. It had no effect unless I moved it to an extreme value.
- Altering the priority of phjuke/madplay does help (after you have your file transfers going fast enough).
- I was only able to alter the priority of phjuke/madplay if I started phjuke from a script:
phjuke &
sleep 5
slay -P 15 phjuke
-You can verify the priority of stuff on the system like this:
ps -o pid,pri
-I suspect that neutrino SIN would give you better info, but I didn't know of it until later.

I run the original 'appliance' style image, not one of the native QNX images. This might be a factor.

04-24-2002 14:43:48

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
jhd3rd,
Ofcourse I agree 100% about the ease of use of a share. However when my eldest son (masters in computer science) told me about the overhead problem I tried HTTP and discovered it worked like a charm with any app that could handle HTTP streaming MP3 in Audrey. I believe longtime already anything my son tels me about computers and I was even more convinced this time because of my own experience. (Btw my son thinks I must be absolutely crazy doing with Audrey what I do, without ever seeing an Audrey himself ofcourse)

jukebox


http://www.prins.net/audrey/index.html
04-24-2002 15:39:06

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) santur
Profile
I don't think the problem is with phjuke. I suspect Shelf and Memdefrag. I have two Audrey's running Infinity's image with shelf and one without. Phjuke works fine all day without any skips. But, for Audrey's with shelf, the next day Phjuke starts skipping. If Ido reboot, skips go away. While there are no skips in the one without shelf. I looked at Memdefrag in /config/krontab and looks like it runs every night. I think changing it to run every week or so may solve the problem.
Any other ideas?
04-24-2002 17:12:12

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) santur
Profile
I don't think the problem is with phjuke. I suspect Shelf and Memdefrag. I have two Audrey's running Infinity's image with shelf and one without. Phjuke works fine all day without any skips. But, for Audrey's with shelf, the next day Phjuke starts skipping. If Ido reboot, skips go away. While there are no skips in the one without shelf. I looked at Memdefrag in /config/krontab and looks like it runs every night. I think changing it to run every week or so may solve the problem.
Any other ideas?
04-24-2002 17:12:14

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
I believe in my images kcron is disabled and memdefrag doesn't run at all. The problem is certainly not with phjuke either. I'm in doubt if shelf plays a role, I don't believe so, at least not anymore since CPU Monitor is gone.

jukebox


http://www.prins.net/audrey/index.html
04-24-2002 17:52:53

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
Thanks everyone for the suggestions. I have it working now. It seems the network connection was ok. I get about 2.5 Mbps to my linux machine over NFS. The most significant change for my ssetup was raising the pririty of phjuke (thanks bholio). I wasn't able to use slay to do this so I used nice instead. I start phjuke with:

nice -n-5 phjuke
(-n-4 also works well)

An extreme nice value like -19 does not work too well. It sounds like a radio when the priority is that high (too much of a good thing?). It doesn't skip anymore but every now and then there's a slight "hiccup". I guess I could live with that. I'll keep experimenting. I also tried encoding with a constant bit rate but hat didn't help.

04-25-2002 09:27:33

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) booya
Profile
What priority does your phjuke normally run at? Mine runs at 10 or 15 priority by default. I get no skips at all on my Audrey playing mp3's from an nfs mounted share. You can see the priority of apps that are running by typing in pterm
ps -o nice,comm,args

maybe other apps are running at a higher priority and are using up availible resources thus causing problems playing mp3's.

slay -P 15 phjuke
will change the priority and works for most apps, just change the phjuke section to the app you want to change the priority on.


Get help, chat, and be merry..
Join #audrey on Efnet
04-25-2002 11:06:23

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
booya, thanks for ps tip. I'll check my process priorities when I get home tonite. I think my phjuke normally runs at priority 10.
I did try slay -P 15 phjuke last night but the priority didn't change. That's why I used nice instead.
04-25-2002 11:19:00

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jhd3rd
Profile
As long as you are playing with process priorities, remember that phjuke is just a graphical front end to madplay. You may want to try adjusting the priority of madplay as well. It may be that since phjuke runs madplay it gets the same priority by default.

Having said that, I'm a little baffled as to why this is necessary for some people and not others. As far as I know we have identical machines, and I haven't ever tweaked a priority on my Audrey.

04-25-2002 13:36:20

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
jhd3rd, are you running jukebox's usb image? Perhaps I have some stuff running on mine that you don't have on your image.
04-25-2002 14:21:36

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jhd3rd
Profile
I'm running a "roll your own" image, but it's possible. I don't have a lot of extra stuff running, but then again I understand that jukebox has taken out a lot of unnecessary stuff that I haven't really bothered to do. Just for debugging purposes, you might want to install a very basic image and try running phjuke on that. If it works better, you could go back to jukebox's image and try to eliminate processes until you find the culprit(s).
04-25-2002 16:10:33

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) Infinity
Profile
this is quite interesting. increasing priority of phjuke would help nothing because phjuke is only the interface, madplay is what is playing the mp3's.
bholio's method would not do anything because all it does is open phjuke, sit there for 5 seconds, then change the priority of phjuke to 15. At this point madplay is not even started, once he hits the play button, phjuke launches madplay and both their priorities will be reset back to 10. Each time you stop the music and hit play to start the music again, in other words stop and play will relaunch madplay each time and both phjuke and madplay will reset back to 10 (default). More importantly each time it finishes one song and start another song both phjuke and madplay will go back to priority 10.
If you are curious and must test it out, this is what you need to do. make sure phjuke is set to autoplay the playlist at start in settings. Exit phjuke, edit this script then launch phjuke by this script:
phjuke &
sleep 10
slay -P 15 madplay &
after you launch the script , phjuke will autoplay the playlist you saved which in turn will start madplay. after 10 seconds the priority of madplay will change to 15. check by using:
ps -o comm,nice
wait 'till the next song, and check again, the priorities will reset themselves, so this is set in the madplay code there is nothing you can do about it. I don't use the usb image. phjuke runs perfectly with the default priority, it only chokes when i move voyager's scroll bars using the stylus, if i use the keyboard to scroll it's fine. if the madplay priority is 14, using the stylus is fine too but after one song the priority will go back to 10 so it's useless.
http://home.attbi.com/~kenzhao8/index.html
04-25-2002 16:33:00

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) booya
Profile
duh! I knew that :) Well I knew that phjuke was a frontend for madplay but i didn't know madplay was restarted for each song.. but it makes complete sense. I guess people having problems will just have to see if phjuke runs better without all the other apps running. Try slaying them one by one to see if phjuke/madplay starts working better.
Get help, chat, and be merry..
Join #audrey on Efnet
04-25-2002 20:48:50

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
ghansah,
Regardless of what all the others have posted now, do you still think using the nice command as you did starting phjuke made a difference for the better or not? Although phjuke is only a front end, if it works what you posted it's good enough for me.

jukebox


http://www.prins.net/audrey/index.html
04-25-2002 21:05:20

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) bholio
Profile
Well, I just tried to verify what I had posted on a friend's Audrey (I'm not near mine now). Strangely, his phjuke always starts at priority 15. I was unable to change it no matter what I did. I'll have to check mine at home to see how it works.

I'm working on the assumption that anything started by phjuke will run at the same priority as phjuke. So, if you can get phjuke to run at 15, then when it starts madplay (via fork/exec maybe?) madplay will also run at 15. I have no idea how madplay would be able to reset phjuke's priority lower. That make no sesne to me

I'll try when I get home and see how mine is set up. The only reason for the script was that for some reason I was unable to manipulate phjuke's priority from a different shell than the one I started it from. I'm using slay, as opposed to nice.

04-26-2002 08:49:04

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) Infinity
Profile
i think you got the assumption backwards. phjuke doesn't do anything except it launches commands to execute madplay. if you really want you don't even have to run phjuke inorder to play mp3's you can run madplay alone, each of those buttons essentially is a code/script to manipulate madplay. Madplay is the big dog here, without it phjuke is just a useless interface. if you got phab set up in the RTP you can build your own phjuke(interface) for madplay. Once madplay is started it takes control over phjuke therefore overwriting phjuke's priority. sure you can set phjuke to anything you want before the music starts but once the music starts, madplay will take over. Only changing priority of madplay will help, changing priority of phjuke is useless (if you think it plays better then it's because you probably got fewer things running). like i said you can test it out by changing the priority of madplay to like 14 once it's started, you will see that it runs perfectly, it won't skip no matter what you have running. unfortunately its priority will reset after each song. It doesn't matter what priority phjuke take, it does matter what madplay takes. If you are willing to spend more time writing up a more advanced script to constantly check if madplay is running or not, if it is running then change it to a higher priority. So instead of just a simple sleep 10 then changing priority to 15 for madplay you will need a loop to constant check madplay's priority and change it each time it goes lower than what you want it to be. i don't think you can do much with simple scripts.
http://home.attbi.com/~kenzhao8/index.html
04-26-2002 10:44:34

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) davinci27
Profile
Another option that seems pretty viable is to download phjuke source and mod it to lauch madplay at a higher priority.

davinci27

04-26-2002 11:26:07

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
jukebox,

running phjuke with "nice" makes a dramatic difference for me. Without nice it skips several times within a song. With nice, it does not skip. I can even switch to the shell and run other commands and it still doesn't skip. I just get very slow response from the UI but the music keeps playing with no interruption.

I realize it doesn't really make sense given phjuke is just the frontend but my experience contradicts theory in this case.

I have been happily playing music since I started using nice. Without nice, my phjuke runs with a priority of 10.

ghansah

04-26-2002 14:04:58

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) davinci27
Profile
could be that since phjuke is the one spawing madplay, madplay inherits phjukes priority.

davinci27

04-26-2002 14:09:51

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
sounds like that may be it. Madplay is probably inheriting phjuke's priority.
04-26-2002 14:29:00

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) Sketchy
Profile
I don't know if koreth still reads these boards, but after looking at the code, he appears to be launching MadPlay with spawn(). From the spawn() docs:

The child process inherits the following attributes of the parent process:

Process group ID (unless SPAWN_SETGROUP is set in inherit.flags)
Session membership
Real user ID and real group ID
Supplementary group IDs
Priority and scheduling policy
Current working directory and root directory
File creation mask
Signal mask (unless SPAWN_SETSIGMASK is set in inherit.flags)
Signal actions specified as SIG_DFL
Signal actions specified as SIG_IGN (except the ones modified by inherit.sigdefault when SPAWN_SETSIGDEF is set in inherit.flags)

So yes, phjuke priority is inherited by madplay.


-- Jim
ACID and other Audrey apps
04-26-2002 14:55:55

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
Thanks ghansah for resolving this problem!

jukebox


http://www.prins.net/audrey/index.html
04-26-2002 15:05:02

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) ghansah
Profile
jukebox, you're welcome. Thanks to everyone for the suggestions/help. I need to mentione that I tried different values for MADPLAY_PREBUF_KBYTES (after changing the phjuke priority) and the results of those experiments are inconclusive. I get good playback even with the default value. I now run with MADPLAY_PREBUF_KBYTES=2048. I'm not sure if it's doing any good though. Oh well, it works well enough. Not perfect but still good.
04-26-2002 16:36:31

New MessageRE:anyone successfully using phjuke on jukebox usb1-1? (modified 0 times) jukebox
Profile
I tried it and it works as advertised. Great. ghansah, your name is all over my Audrey web site now, hope you don't mind.

jukebox


http://www.prins.net/audrey/index.html
04-26-2002 21:22:23

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3