maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   Kagu Media Player Released 1.0! (https://talk.maemo.org/showthread.php?t=8265)

trevarthan 2007-07-30 01:00

Kagu Media Player Released 1.0!
 
First media player for maemo to include support for A2DP bluetooth audio and support for maemoscrobbler. You can download it here:
http://maemo.org/downloads/product/kagu/

disq 2007-07-30 02:06

Re: Kagu Media Player Released 1.0!
 
There was a glitch in the 1.0 dependency list, python2.5-pygame wasn't listed. So if you installed Kagu 1.0 but it won't run, please update to 1.0.1. The auto-install link or an Application Manager update should take care of everything.

blakboy98 2007-07-30 03:23

Re: Kagu Media Player Released 1.0!
 
I get the error below when trying to run kagu. The kagu scanner works fine but kagu crashes.

./kagu.py:23: RuntimeWarning: import cdrom: No module named cdrom
import os, pygame, time, sys, gc
./kagu.py:23: RuntimeWarning: import joystick: No module named joystick
import os, pygame, time, sys, gc
sent
album query took:0.115386009216
invalid album cache for UNKNOWN
Traceback (most recent call last):
File "./kagu.py", line 117, in <module>
if __name__ == '__main__': main()
File "./kagu.py", line 75, in main
manager.start(screen)
File "/usr/lib/kagu/manager.py", line 108, in start
self.album_view = views.AlbumView()
File "/usr/lib/kagu/views.py", line 75, in __init__
self.__load_album_widget()
File "/usr/lib/kagu/views.py", line 97, in __load_album_widget
for album in self.__get_album_sprites():
File "/usr/lib/kagu/views.py", line 115, in __get_album_sprites
list2.append(widgets.AlbumArtist(row['album'],row['artist']))
File "/usr/lib/kagu/widgets.py", line 520, in __init__
width = self.album.rect.width + self.artist.rect.width
AttributeError: 'NoneType' object has no attribute 'width'

coheed22 2007-07-30 03:35

Re: Kagu Media Player Released 1.0!
 
Works just fine for me!!!!!!!
Thanks

c22

blakboy98 2007-07-30 03:46

Re: Kagu Media Player Released 1.0!
 
I figured it out. I install earlier version before and i needed to delete the covers folder. ThEre were some covers i didn't have access too so i had to gainroot, delete /home/user/MyDocs/.sounds/covers folder, then rescan. it works now

VCi15 2007-07-30 04:13

Re: Kagu Media Player Released 1.0!
 
Looks like a great program. I have a problem when trying to install the programs required for A2DP. When I try to install the SBC and Plugz, it says "Unable to install. Incompatable application package."

Anyone know anything I should do

disq 2007-07-30 04:50

Re: Kagu Media Player Released 1.0!
 
Looks like you should switch to "Red Pill Mode" in Application Manager (info here) or install via apt-get or dpkg.

trevarthan 2007-07-30 05:35

Re: Kagu Media Player Released 1.0!
 
I'm already talking to people about packaging up the A2DP dependencies properly so it isn't such a hassle to install/configure. It's the logical next step now that Kagu 1.0 has been released. Hang with us. We'll get it worked out in time.

VCi15 2007-07-30 05:41

Re: Kagu Media Player Released 1.0!
 
ok thanks I got the things installed but now when I get to the next part wget http://www.guardiani.us/sample.a2dprc it says like permission denied and cannot write to sample.a2dprc (Permission denied)

trevarthan 2007-07-31 02:00

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by VCi15 (Post 64041)
ok thanks I got the things installed but now when I get to the next part wget http://www.guardiani.us/sample.a2dprc it says like permission denied and cannot write to sample.a2dprc (Permission denied)

Probably you're trying to download sample.a2dprc to somewhere other than /home/user. make sure you download it there.

VCi15 2007-07-31 06:05

Re: Kagu Media Player Released 1.0!
 
thanks for the help. Here is what I typed and it seem to work but now the next section got me stuck. Sorry I am new to these commands and X Terminal

I typed wget -p/home/user http://www.guardiani.us/sample.a2dprc

but when I type the cp part.. it doesn't work, what command should I type?

trevarthan 2007-07-31 12:25

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by VCi15 (Post 64256)
thanks for the help. Here is what I typed and it seem to work but now the next section got me stuck. Sorry I am new to these commands and X Terminal

I typed wget -p/home/user http://www.guardiani.us/sample.a2dprc

but when I type the cp part.. it doesn't work, what command should I type?

Are you doing all of this as root? You shouldn't be. I realize that I didn't make that clear in the instructions though. You have to install the packages as root using `dpkg -i ...` or red pill mode (sort of similar to root), but then steps 1 - 6 should be executed as the normal tablet user named 'user'.

Maybe you aren't root though, since you had trouble downloading with wget. root would be able to download anywhere without restrictions.

please run these commands and post the result:

`pwd`
`whoami`

Also, from now on, please make sure your working directory is /home/user by typing:
`cd /home/user`

before running any of the commands in the Howto. This shouldn't be necessary. When you open the xterm or log in via ssh as 'user', you'll be placed in /home/user automatically. But for some reason you don't appear to be in /home/user or else these commands would be working for you.

VCi15 2007-08-01 05:52

Re: Kagu Media Player Released 1.0!
 
man this sucks, I am like stuck at every new step after I get one working. So pwd shows me as /home/user and whoami is user and wget seem to work fine but the cp command doesn't do anything. Is that some kind of program that I need or something

Frankowitz 2007-08-01 07:09

Re: Kagu Media Player Released 1.0!
 
cp is the copy command.

Nice install procedure... :eek:

trevarthan 2007-08-01 13:26

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by Frankowitz (Post 64566)
cp is the copy command.

Nice install procedure... :eek:

A2DP support is optional in Kagu. We're the only player that offers A2DP so far for the n800, and there are ... issues with packaging the optional A2DP component properly. I do this in my spare time after all. I'm not getting paid for it.

I'm sorry, but for now you'll just have to follow the instructions. They seem to work for everyone else. Perhaps you could tell us what error message `cp` is giving you?

VCi15 2007-08-01 15:39

Re: Kagu Media Player Released 1.0!
 
theres no error message. So I do the wget command and it says blah blah saved and then I do the cp command which just automatically brings up a new line then I do the vim command and it says vim can not be found.

Milhouse 2007-08-01 15:51

Re: Kagu Media Player Released 1.0!
 
So it's probably not the cp command at all - do you have vim installed? If not, use vi. If you don't know how to use vi you might be able to get away with the following:

Code:

cat sample.a2dprc | sed s/#address=00:08:F4:30:07:64/address=YOURBTADDRESS/ > ~/.a2dprc
Where YOURBTADDRESS is the value you obtained from hcitool, with colons.

trevarthan 2007-08-01 15:59

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by VCi15 (Post 64654)
theres no error message. So I do the wget command and it says blah blah saved and then I do the cp command which just automatically brings up a new line then I do the vim command and it says vim can not be found.

vim is a text editor. If you don't have vim, or don't know how to use it, please use a text editor that you do know how to use. I'll update the documentation to be more specific on that point. Sorry, the initial audience for the Howto was highly technical people. Usually programmers. I never really intended it to be end-user friendly. :) Just logical.

But I'll try to update it.

orbitalcomp 2007-08-02 01:06

Re: Kagu Media Player Released 1.0!
 
I was stuck as well, but I finally got it going. I didn't have 'wget' on my N800, but once I got that installed, everything else was easy - I just cut and pasted your directions into xterm.

I did do one thing a bit different, and maybe this will help VCi15 with his situation. I already had Midnight Commander installed, so I just went thru it's file manager and edited the files that way.

I am wondering how to get this thing working, though. After following all directions, I rebooted. Once back up, I assume I am supposed to pair the stereo headset using the 'Bluetooth' applet in Control Panel. I did this, and it paired fine...of course, there are no profiles listed.

Now when I go into Kagu, I have the dimmed BT log in the upper right. If I click on it, it turns on and sets the volume, but no sound is coming thru my headphones. I am using those white Logitech BT headphones that were made for the iPod, but they work with any BT device, I have done it before.

Is there something I am missing? I assume the BT logo in Kagu launches the 'a2dpd' daemon that is referred in your directions. Maybe I missed something, or maybe I'm not supposed to pair the headphones if Kagu does that automatically.

Thanks in advance...

trevarthan 2007-08-02 02:57

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by orbitalcomp (Post 64812)
I assume the BT logo in Kagu launches the 'a2dpd' daemon that is referred in your directions.

Correct. To see if both a2dpd and mplayer are in fact running in the background you should be able to run `ps auxwww | grep -E 'a2|mp'` in an xterm while kagu is running and the BT button is darkened and a song is playing (check the play time in the middle right of Kagu to see if it's actually playing).

Quote:

Originally Posted by orbitalcomp (Post 64812)
Maybe I missed something, or maybe I'm not supposed to pair the headphones if Kagu does that automatically.

No, pairing the headphones is correct. Before running Kagu, you can check to see if the headphones are in fact connected to the n800 by pressing the bluetooth icon in the task bar at the top of the screen. If they are connected, it should say "Disconnect ..." where "..." is the name of your headphones. If they are not connected, try turning them off then back on. Sometimes the headphones need a reboot too.

Have you successfully completed step 10? If not, go back and try that. If the headphones are connected, but you can't get step 10 to work, then something is probably wrong with your config and you should go back through the steps again.

Kagu's A2DP button is really just a convenient way to execute step 10.

orbitalcomp 2007-08-02 05:54

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by trevarthan (Post 64846)
Correct. To see if both a2dpd and mplayer are in fact running in the background you should be able to run `ps auxwww | grep -E 'a2|mp'` in an xterm while kagu is running and the BT button is darkened and a song is playing (check the play time in the middle right of Kagu to see if it's actually playing).



No, pairing the headphones is correct. Before running Kagu, you can check to see if the headphones are in fact connected to the n800 by pressing the bluetooth icon in the task bar at the top of the screen. If they are connected, it should say "Disconnect ..." where "..." is the name of your headphones. If they are not connected, try turning them off then back on. Sometimes the headphones need a reboot too.

Have you successfully completed step 10? If not, go back and try that. If the headphones are connected, but you can't get step 10 to work, then something is probably wrong with your config and you should go back through the steps again.

Kagu's A2DP buttKagu's A2DP button is really just a convenient way to execute step 10.

Thanks for the quick reply, trevarthan...

I figured out the problem, and I'll tell you what it was if you promise not to laugh at me too much - I never took the '#' sign away from the 'address' line where I put in the BT device address. :)

I knew for sure I had followed your directions, but I kept overlooking that one little symbol. What was confusing matters was that out of three devices that I successfully paired, only my Samsung WEP-200 headset would 'connect' and turn on the BT icon in the main system tray. I kept thinking the other devices were incompatible for some reason.

Anyways, the A2DP works great and the sound quality is fantastic! Much better quality than many other devices I have used. Thanks for making this feature available to us...

One quick question: am I able to add multiple BT device addresses in the prefs file, as long as they are #'ed out? This would make it very easy to switch between different devices, just a quick edit would be all it takes.

trevarthan 2007-08-02 13:28

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by orbitalcomp (Post 64872)
One quick question: am I able to add multiple BT device addresses in the prefs file, as long as they are #'ed out? This would make it very easy to switch between different devices, just a quick edit would be all it takes.

Yes. The '#' sign turns the line into a comment, not a command. So you can comment out any number of additional devices.

Eventually, I want to make a Control Panel configuration system for ~/.a2dprc as that would eliminate user error and make switching devices a bit easier. This howto is just the first step. Glad you got it working!

Frankowitz 2007-08-02 13:50

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by trevarthan (Post 64616)
I'm sorry, but for now you'll just have to follow the instructions. They seem to work for everyone else. Perhaps you could tell us what error message `cp` is giving you?

I have no problems whatsoever. If you read carefully, you'll see that I was reacting to the post of VCi15 were he asks what 'cp' stands for.

Milhouse 2007-08-02 16:12

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by trevarthan (Post 64920)
Yes. The '#' sign turns the line into a comment, not a command. So you can comment out any number of additional devices.

Eventually, I want to make a Control Panel configuration system for ~/.a2dprc as that would eliminate user error and make switching devices a bit easier. This howto is just the first step. Glad you got it working!

See this thread for simplified A2DP installation instructions - please post in the installation thread if experiencing any problems or have suggestions.

EDIT: Removed original scripting instructions and replaced with link to new thread.

orbitalcomp 2007-08-02 17:10

Re: Kagu Media Player Released 1.0!
 
Hey Milhouse - where was this script yesterday when I was doing all of this manually? Huh?? ;)

That definitely is a good idea, simplifying the A2DP install...

On another note, I wish it was possible to route the audio from Rhapsody thru the A2DP setup...but I seriously doubt this is possible. I don't know if Rhapsody uses its own player or if it is just a front end for something else.

I have been using the BT dongle that came with my Logitech headphones if I need BT for Rhapsody, but it's one more thing for me to remember to charge.

Milhouse 2007-08-02 17:32

Re: Kagu Media Player Released 1.0!
 
Sorry for the delay orbitalcomp :)

For the time being I've hosted the script on my server www.nmacleod.com/a2dp/install.sh so once you have determined the BT Address of your headset the commands to install are as follows:

See this thread for simplified A2DP installation instructions - please post in the installation thread if experiencing any problems or have suggestions.

EDIT: Removed original instructions and replaced with link to new thread.

VCi15 2007-08-02 18:18

Re: Kagu Media Player Released 1.0!
 
i got it working yesterday somehow, I think it was the command you gave me Milhouse but I think I will reformat my N800 and start from scratch with the new technique. Does that include the step 7 (Edit hcid.conf) eliminates a lot of skipping during playback

VCi15 2007-08-02 18:43

Re: Kagu Media Player Released 1.0!
 
I remember seeing someone talk about AVCRP? is that working or still needs to be developed

Milhouse 2007-08-02 18:53

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by VCi15 (Post 65005)
Does that include the step 7 (Edit hcid.conf) eliminates a lot of skipping during playback

Yes, that step is completed when you run the script for the second time as root.

The only thing the script doesn't do is step 3 where you have to obtain your BT Address - you need to do that yourself by running "hcitool scan" then pass the relevant address as a parameter on the first invocation of install.sh.

Note that once you have a working a2dp installation you can delete the /home/user/a2dp directory and it's contents (rm -fr /home/user/a2dp).

VCi15 2007-08-03 05:52

Re: Kagu Media Player Released 1.0!
 
so are you saying that it does step 7 if I were to run the script twice? or do you mean in the line # As user "root"

Milhouse 2007-08-03 07:04

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by VCi15 (Post 65144)
so are you saying that it does step 7 if I were to run the script twice? or do you mean in the line # As user "root"

Yes - when you run the script the second time, as the root user, the script will apply the change (ie. remove rswitch) that is detailed in step 7. The script, when run as root, will also install the three deb packages that were downloaded when you first ran the script as the non super user.

The script should be fully restartable - that is, if you have a network error or file system error (ie. lack of space) you should be able to rerun the script until successful completion.

If you follow my instructions as I have listed them in post #26 you should end up with a fully installed a2dp solution - the only thing you need to do is identify your BT address. :)

NOTE: The two lines in my instructions that begin with "#" are comments - you don't need to enter these at the xterm prompt. If you execute the lines that are not comments as I have specified them, you should be good to go in a few minutes.

giuliastro 2007-08-03 15:44

Re: Kagu Media Player Released 1.0!
 
Hello. I just installed latest Kagu version. I succesfully scanned my memory card, but when I try to launch the player all I get is a black screen and need to manually close the application. Any clue of what is happening? I tried launching it via command-line and I see a couple warnings about joystick and cdrom modules not loaded but no errors are shown. I get the black screen and that's it. Any help is appreciated, thanks in advance! :)

trevarthan 2007-08-03 15:53

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by giuliastro (Post 65272)
Hello. I just installed latest Kagu version. I succesfully scanned my memory card, but when I try to launch the player all I get is a black screen and need to manually close the application.

You're the first user to report such an issue. Can you tell me about your tablet? Info I need:

1.) What IT OS version?
2.) 770 or n800?
3.) Do you have python 2.5 installed?

Those cdrom warnings on startup can be safely ignored, BTW. Also, you might try a reboot of the tablet. perhaps it's in an odd state?

VCi15 2007-08-03 17:06

Re: Kagu Media Player Released 1.0!
 
okay I think I understand now, but now my last question is.... how would I become root instead of user

Milhouse 2007-08-03 17:35

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by VCi15 (Post 65306)
okay I think I understand now, but now my last question is.... how would I become root instead of user

as it says in the instructions:

Code:

sudo gainroot
If you haven't installed the becomeroot package, you can by adding the following repository to application manager then installing the package "becomeroot":

Web Address: http://eko.one.pl/maemo
Distribution: bora
Components: user


I'm about to start a new thread with details of a modified (simplified) a2dp installation process. I'll soon remove all previous instructions from this thread and point to the new thread.

EDIT: See this thread for full install instructions. Please comment in this new thread if you have any problems or suggestions.

nick_1 2007-08-05 15:19

Re: Kagu Media Player Released 1.0!
 
I've got a2dp working nicely now but does kagu support playing random files off the memory card or can you only queue up an album at a time? If not, I'm going to look at adding that as I know python quite well and I'll send a patch if i think it will be useful to anyone else...

I find the performance a little poor at present but I have 180 mp3s on my memory card which might be causing it (loading kagu player seems to take 60 seconds or so).

Thanks,
Nick

trevarthan 2007-08-06 02:36

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by nick_1 (Post 65761)
I've got a2dp working nicely now but does kagu support playing random files off the memory card or can you only queue up an album at a time?

Not yet. It's not that we don't want to, just that we haven't had time yet.


Quote:

Originally Posted by nick_1 (Post 65761)
If not, I'm going to look at adding that as I know python quite well and I'll send a patch if i think it will be useful to anyone else...

Yes, please do so! I think you'll find the code base very sane and serviceable. You can find SVN checkout instructions here. When you've got a patch, send it in an email to jesse@guardiani.us and I'll look it over.

Quote:

Originally Posted by nick_1 (Post 65761)
I find the performance a little poor at present but I have 180 mp3s on my memory card which might be causing it (loading kagu player seems to take 60 seconds or so).

Try the new 1.0.2 release (just released today)! It has a bunch of performance and memory enhancements over the old 1.0.1. BTW, we've got a new thread for 1.0.2 here.

nick_1 2007-08-07 17:21

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by trevarthan (Post 65874)
Yes, please do so! I think you'll find the code base very sane and serviceable. You can find SVN checkout instructions here. When you've got a patch, send it in an email to jesse@guardiani.us and I'll look it over.

I'll get on to it then... I've already had a look through the code so I'll hopefully get something done shortly...


Quote:

Originally Posted by trevarthan (Post 65874)
Try the new 1.0.2 release (just released today)! It has a bunch of performance and memory enhancements over the old 1.0.1. BTW, we've got a new thread for 1.0.2 here.

I was actually using 1.0.2 but it seems that the song collection I had was causing Kagu to run really slow. That said it was a completely random selection with probably 100 different albums and only a couple of tracks in each.

Good work so far... just a few more features and I'll be really happy :)

Thanks,
Nick

jimbeaux 2007-11-03 04:28

Re: Kagu Media Player Released 1.0!
 
sample.a2dprc is no longer on http://www.guardiani.us

I get the following error when running install.sh.

--23:22:52-- http://www.guardiani.us/sample.a2dprc
=> `sample.a2dprc'
Resolving www.guardiani.us... 72.249.104.51
Connecting to www.guardiani.us|72.249.104.51|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
23:22:52 ERROR 404: Not Found.

sample.a2dprc not found

trevarthan 2007-11-03 15:22

Re: Kagu Media Player Released 1.0!
 
Quote:

Originally Posted by jimbeaux (Post 90141)
sample.a2dprc is no longer on http://www.guardiani.us

I get the following error when running install.sh.

--23:22:52-- http://www.guardiani.us/sample.a2dprc
=> `sample.a2dprc'
Resolving www.guardiani.us... 72.249.104.51
Connecting to www.guardiani.us|72.249.104.51|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
23:22:52 ERROR 404: Not Found.

sample.a2dprc not found

Sorry about that! I moved the guardiani.us domain to a new server along with moving the kagu site to http://kagumedia.com. I must have missed that file in the move. It's back now. Please let me know if you notice anything else broken.

Thanks!


All times are GMT. The time now is 06:53.

vBulletin® Version 3.8.8