maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Panucci Podcast and Audiobook Player (https://talk.maemo.org/showthread.php?t=25584)

tso 2009-03-31 18:27

Re: Panucci Podcast and Audiobook Player
 
its doing a database conversion, and that may take time...

btw, now that panucci can do playlists, hows the quickest way to dump a whole dir of files into it?

fnordianslip 2009-03-31 18:38

Re: Panucci Podcast and Audiobook Player
 
Aha. You're right. Just glanced at the tablet and there it is, waiting for me. Perhaps the blank notifier pop up is actually trying to tell me that it is doing a database conversion, but couldn't quite manage to print any text.
Cheers.

fnord

nikosapi 2009-03-31 19:38

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by tso (Post 276135)
btw, now that panucci can do playlists, hows the quickest way to dump a whole dir of files into it?

For a directory with subdirectories:
Code:

find /path/to/files -type f -iname '*.mp3' > playlist.m3u
Or, if you'd like a single directory, place a file with a ".m3u" extension in the directory. From there you could do "ls | sort > some-file.m3u" or simply place a single period in the file and the contents of the directory will be imported (this is a feature of the m3u spec, you can include directories as items in the playlist).

Panucci 0.4 will make this even easier, you'll be able to add directories from the GUI.

onion_cfe 2009-03-31 22:19

Re: Panucci Podcast and Audiobook Player
 
Guys,

I have no clear memory of what version I was using until yesterday - it may have been a test build from a while back or it may have been the last packaged version (more likely i think) - but I upgraded to 0.3-4 as the App Manager flagged it up.

A bug that I recall went away some time ago, early 0.2's I think, seems to be back:

In the version I had installed until yesterday, when paused, the transport buttons, both the 10 second ones and the 1 minute ones did nothing. In today's version, they appear to do as they would when playing, except first resetting the audio to 00:00.

In other words, either back button resets the audio to zero, the forward two set it to 00:10 and 01:00.

Whether they should work or not when paused is obviously a debatable issue (if there were a vote, i'd stick with not) but i'm pretty sure you wouldn't want them to work this way. I've already mashed them a few times as i'm so used to them not doing anything, losing my place.

Still loving the work by the way, and the new gPodder, whilst looking the same as the test build from a few months back hasn't yet reset my tablet under feed updating load once, so whether you fixed that or it somehow disappeared on it's own, fantastic!

tso 2009-04-01 02:27

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by nikosapi (Post 276170)
For a directory with subdirectories:
Code:

find /path/to/files -type f -iname '*.mp3' > playlist.m3u
Or, if you'd like a single directory, place a file with a ".m3u" extension in the directory. From there you could do "ls | sort > some-file.m3u" or simply place a single period in the file and the contents of the directory will be imported (this is a feature of the m3u spec, you can include directories as items in the playlist).

Panucci 0.4 will make this even easier, you'll be able to add directories from the GUI.

tried the simple . in a m3u variant. and the result was that while the files got imported, they where not sorted in any way...

nikosapi 2009-04-01 03:10

Re: Panucci Podcast and Audiobook Player
 
I filed the previous two posts as bugs, you can track them at the links provided below:

@onion_cfe: bug 3817
@tso: bug 3818

dwforslund 2009-04-02 04:12

Re: Panucci Podcast and Audiobook Player
 
I've installed panucci but when I run it (from the console) it says ImportError: from gnome import gconf and stops. Somethings missing, but I can't tell what.

tso 2009-04-02 07:57

Re: Panucci Podcast and Audiobook Player
 
quick guess, python2.5-gnome.

dwforslund 2009-04-02 14:56

Re: Panucci Podcast and Audiobook Player
 
apt-get says I have the newest version of python2.5-gnome installed.

nikosapi 2009-04-03 13:24

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by dwforslund (Post 276802)
apt-get says I have the newest version of python2.5-gnome installed.

Just out of curiosity could you open a terminal and try the following:
Code:

~ $ python
>>> from gnome import gconf

If you do have python2.5-gnome installed then you should not get a traceback.

nick

dwforslund 2009-04-03 14:26

Re: Panucci Podcast and Audiobook Player
 
I get a traceback with the python you show above, but the system says that python2.5-gnome is installed. I've uninstalled and installed python2.5-runtime a number of times with no change in the behavior.

nikosapi 2009-04-03 14:40

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by dwforslund (Post 277086)
I get a traceback with the python you show above, but the system says that python2.5-gnome is installed. I've uninstalled and installed python2.5-runtime a number of times with no change in the behavior.

Does this file exist: /usr/lib/python2.5/site-packages/gtk-2.0/gnome/gconf.so ?

You could try removing just python2.5-gnome and reinstalling that:
Code:

apt-get purge python2.5-gnome
apt-get install python2.5-gnome


dwforslund 2009-04-04 14:53

Re: Panucci Podcast and Audiobook Player
 
The file /usr/lib/python2.5/site-packages/gtk-2.0/gnome/gconf.so exists. I've done an apt-get remove python2.5-gnome and apt-get install python2.5-gnome with no change in behavior. When I do apt-get purge python2.5-gnome it says "invalid operation purge" even though purge is listed in one of the commands in the help package.

nikosapi 2009-04-04 17:14

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by dwforslund (Post 277394)
The file /usr/lib/python2.5/site-packages/gtk-2.0/gnome/gconf.so exists. I've done an apt-get remove python2.5-gnome and apt-get install python2.5-gnome with no change in behavior. When I do apt-get purge python2.5-gnome it says "invalid operation purge" even though purge is listed in one of the commands in the help package.

That's really odd, could you please try the following and post the output:
Code:

python -c 'import sys; print sys.path'

dwforslund 2009-04-04 17:49

Re: Panucci Podcast and Audiobook Player
 
here it is:
['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/usr/lib/python2.5/site-packages/gtk-2.0', '/usr/lib/python2.5/site-packages/pyinotify']

nikosapi 2009-04-04 18:16

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by dwforslund (Post 277442)
here it is:
['', '/usr/lib/python25.zip', '/usr/lib/python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages', '/usr/lib/python2.5/site-packages/Numeric', '/usr/lib/python2.5/site-packages/PIL', '/usr/lib/python2.5/site-packages/gst-0.10', '/usr/lib/python2.5/site-packages/gtk-2.0', '/usr/lib/python2.5/site-packages/pyinotify']

That doesn't make sense, your path is correct, it should work :S

You know, you never posted the full traceback from when you try to do "from gnome import gconf". Please do so, there might be more info there.

One more thing you could try is this:
Code:

PYTHONPATH=/usr/lib/python2.5/site-packages/gtk-2.0/gnome/ python -c "import gconf"

dwforslund 2009-04-04 19:55

Re: Panucci Podcast and Audiobook Player
 
If I do the PYTHONPATH example above, the import seems to work fine.

Here is the full traceback (-v option) with the "from gnome import gconf":
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# zipimport: found 289 names in /usr/lib/python25.zip
import site # precompiled from /usr/lib/python2.5/site.pyo
import os # precompiled from /usr/lib/python2.5/os.pyo
import errno # builtin
import posix # builtin
import posixpath # precompiled from /usr/lib/python2.5/posixpath.pyo
import stat # precompiled from /usr/lib/python2.5/stat.pyo
import UserDict # precompiled from /usr/lib/python2.5/UserDict.pyo
import copy_reg # precompiled from /usr/lib/python2.5/copy_reg.pyo
import types # precompiled from /usr/lib/python2.5/types.pyo
import _types # builtin
import linecache # loaded from Zip /usr/lib/python25.zip/linecache.pyo
import warnings # loaded from Zip /usr/lib/python25.zip/warnings.pyo
import _codecs # builtin
import codecs # loaded from Zip /usr/lib/python25.zip/codecs.pyo
import encodings.aliases # loaded from Zip /usr/lib/python25.zip/encodings/aliases.pyo
import encodings # loaded from Zip /usr/lib/python25.zip/encodings/__init__.pyo
import encodings.utf_8 # loaded from Zip /usr/lib/python25.zip/encodings/utf_8.pyo
Python 2.5.2 (r252:60911, Sep 8 2008, 22:02:20)
[GCC 3.4.4 (release) (CodeSourcery ARM 2005q3-2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import gnome # directory /usr/lib/python2.5/site-packages/gnome
# /usr/lib/python2.5/site-packages/gnome/__init__.pyo matches /usr/lib/python2.5/site-packages/gnome/__init__.py
import gnome # precompiled from /usr/lib/python2.5/site-packages/gnome/__init__.pyo
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name gconf
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
# clear sys.ps2
# clear sys.exitfunc
# clear sys.exc_type
# clear sys.exc_value
# clear sys.exc_traceback
# clear sys.last_type
# clear sys.last_value
# clear sys.last_traceback
# clear sys.path_hooks
# clear sys.path_importer_cache
# clear sys.meta_path
# restore sys.stdin
# restore sys.stdout
# restore sys.stderr
# cleanup __main__
# cleanup[1] site
# cleanup[1] encodings
# cleanup[1] _codecs
# cleanup[1] zipimport
# cleanup[1] warnings
# cleanup[1] encodings.utf_8
# cleanup[1] codecs
# cleanup[1] types
# cleanup[1] _types
# cleanup[1] gnome
# cleanup[1] signal
# cleanup[1] linecache
# cleanup[1] posix
# cleanup[1] encodings.aliases
# cleanup[1] exceptions
# cleanup[2] copy_reg
# cleanup[2] posixpath
# cleanup[2] errno
# cleanup[2] os.path
# cleanup[2] stat
# cleanup[2] UserDict
# cleanup[2] os
# cleanup sys
# cleanup __builtin__
# cleanup ints: 1733 unfreed ints in 25 out of 25 blocks
# cleanup floats
~ $

nikosapi 2009-04-05 03:30

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by dwforslund (Post 277472)
# /usr/lib/python2.5/site-packages/gnome/__init__.pyo matches /usr/lib/python2.5/site-packages/gnome/__init__.py
import gnome # precompiled from /usr/lib/python2.5/site-packages/gnome/__init__.pyo

I'm really not sure what's going on, I don't know where you got the __init__.py file from, I don't have one...

Code:

~ $ ls /usr/lib/python2.5/site-packages/gtk-2.0/gnome/
__init__.pyo  gconf.so      gnomevfs.so

Perhaps you could try deleting it?

dwforslund 2009-04-05 03:52

Re: Panucci Podcast and Audiobook Player
 
I have what you have in the gtk-2.0/gnome directory. The __init__.py file in the site-packages/gnome directory has no contents and is required according to the documentation of bugs for pymaemo. So I don't see anything wrong with what I have except that it doesn't work right.

nikosapi 2009-04-05 04:24

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by dwforslund (Post 277556)
I have what you have in the gtk-2.0/gnome directory. The __init__.py file in the site-packages/gnome directory has no contents and is required according to the documentation of bugs for pymaemo. So I don't see anything wrong with what I have except that it doesn't work right.

You don't need the __init__.py file provided that you have a __init__.pyo file. (And yes, it's normal for that file to be empty)

dwforslund 2009-04-05 21:50

Re: Panucci Podcast and Audiobook Player
 
I don't understand how importing gnome from a file that has nothing in it can satisfy the import. Perhaps I don't understand how this all works.

svs57 2009-04-08 12:53

Re: Panucci Podcast and Audiobook Player
 
How can I change gst output in panucci.
I compiled gst mad plugin and can play mp3 files to a2dpsink
gst-launch filesrc location=test.mp3 ! mad ! audioconvert ! sbcenc ! a2dpsink device=XX:XX:XX:XX:XX:XX
Will be very nice if panucci can output to BT headphone via a2dp!!!
It's also possible use headphone's button to pause.

nikosapi 2009-04-08 14:31

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by svs57 (Post 278314)
How can I change gst output in panucci.
I compiled gst mad plugin and can play mp3 files to a2dpsink
gst-launch filesrc location=test.mp3 ! mad ! audioconvert ! sbcenc ! a2dpsink device=XX:XX:XX:XX:XX:XX
Will be very nice if panucci can output to BT headphone via a2dp!!!
It's also possible use headphone's button to pause.

Wow, that's pretty cool.

In order to get that to work in Panucci you'll need to modify the default pipeline in player.py (look around line 150). I'd love to help but it's exam season atm and I just don't have the time (I'll do my best to answer any question you have).

nick

svs57 2009-04-08 16:26

Re: Panucci Podcast and Audiobook Player
 
I think I need to change line:
self.__player = gst.element_factory_make('playbin', 'player')
How can I use here this pipe?
! mad ! audioconvert ! sbcenc ! a2dpsink
Do I need 4 times call gst.elemeny_factory_make?

Will be fine in future add choose of audio output in panucci configuration.

svs57 2009-04-08 18:35

Re: Panucci Podcast and Audiobook Player
 
I did it!
Now my panucci play via a2dp. Pause button also works

thp 2009-04-09 07:36

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by svs57 (Post 278400)
I did it!
Now my panucci play via a2dp. Pause button also works

Can you please send a patch (either attach it here or even better attach it to the patch/bug tracker in the panucci garage project), so we can have a look at it and maybe integrate your changes into the next panucci release, so all users can benefit from your changes? Thanks.

svs57 2009-04-09 12:32

Re: Panucci Podcast and Audiobook Player
 
1 Attachment(s)
Of couse. But there is little problem. I just remove gst playbin and add gst pipeline with my BT headphone address. You have to add to panucci config
1. a2dp output or not
2. BT address of headphone
Users can choose what sound output they will use.
Then you need gst mad plugins. I'llattach it here.
ungzip it and put to /usr/lib/gstreamer-0.10/libgstmad.so
And add package depends on libmad0 from http://repository.maemo.org diablo/free

Here is the patch

diff player.py*
148,150c148,162
< self.__player = gst.element_factory_make('playbin', 'player')
< self.__volume_control = self.__player
< self.__player.set_property( 'uri', 'file://' + filepath )
---
> self.__player = gst.Pipeline('player')
> # self.__player = gst.element_factory_make('playbin', 'player')
> # self.__volume_control = self.__player
> # self.__player.set_property( 'uri', 'file://' + filepath )
> source = gst.element_factory_make("filesrc", "file-source" )
> decoder = gst.element_factory_make("mad", "mp3-decoder" )
> conv = gst.element_factory_make("audioconvert", "converter" )
> sbcenc = gst.element_factory_make("sbcenc", "sbcenc" )
> sink = gst.element_factory_make("a2dpsink", "a2dpsink" )
> self.__player.add(
> source, decoder, conv, sbcenc, sink )
> gst.element_link_many(
> source, decoder, conv, sbcenc, sink )
> self.__player.get_by_name("a2dpsink").set_property ("device", "XX:XX:XX:XX:XX:XX" )
> self.__player.get_by_name("file-source").set_property("location", filepath )

svs57 2009-04-09 12:40

Re: Panucci Podcast and Audiobook Player
 
ps
Here is script for pause playing using BT button.
I start it from xterm. But will be better if it work as daemon.
It works if start it in foreground. But doesn't work in background.
I don't know why :)

#!/usr/bin/env python2.5

from dbus.mainloop.glib import DBusGMainLoop
DBusGMainLoop(set_as_default=True)

import dbus
import gobject
import os

dbus_loop = gobject.MainLoop()
bus = dbus.SessionBus()

def on_button_pressed (sender=None):
os.system('dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause')


headset = bus.get_object('com.nokia.osso_hp_ls_controller', '/com/nokia/osso_hp_ls_controller')
headset_iface = dbus.Interface(headset, dbus_interface='com.nokia.osso_hp_ls_controller.he adset')
headset_iface.connect_to_signal('button_pressed', on_button_pressed, sender_keyword='sender')

dbus_loop.run()

svs57 2009-04-09 16:45

Re: Panucci Podcast and Audiobook Player
 
ps
Also depends of bluez-utils >=3.28-0osso6

svs57 2009-04-10 09:31

Re: Panucci Podcast and Audiobook Player
 
I have one problem.
I start panucci. It open main window and I see last saved possition in file.
If I send panucci playPause via dbus It start playing from begining but not from saved place.

dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause

If I just tap play button it play from saved position.
What is the difference between dbus call and play button?

svs57 2009-04-10 19:58

Re: Panucci Podcast and Audiobook Player
 
Any comments?

nikosapi 2009-04-11 05:02

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by svs57 (Post 278778)
I have one problem.
I start panucci. It open main window and I see last saved possition in file.
If I send panucci playPause via dbus It start playing from begining but not from saved place.

dbus-send --type=method_call --dest=org.panucci.panucciInterface /panucciInterface org.panucci.panucciInterface.playPause

If I just tap play button it play from saved position.
What is the difference between dbus call and play button?

First of all I'd like to thank you for the great work you've done getting bluetooth sound to work, your patch will get integrated before the next release (hopefully in a few weeks).

The above-mentioned problem is indeed a bug, please add it to the bug tracker and I'll look at when I have the chance.

Thanks again for your hard work and patience,

nick

svs57 2009-04-15 07:25

Re: Panucci Podcast and Audiobook Player
 
Here is binary package, sources and patch for gstreamer plugins.
http://n8xx.com/uploads.php?file=gst....5.orig.tar.gz
http://n8xx.com/uploads.php?file=gst....5-0.0.diff.gz
http://n8xx.com/uploads.php?file=gst...-0.0_armel.deb
I can't upload here because of file size limit.

nymusicman 2009-05-22 15:12

Re: Panucci Podcast and Audiobook Player
 
I was wondering if it was possible for the player to be able to open and queue folders. I still hate opening it one file at a time.

nikosapi 2009-05-22 15:19

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by nymusicman (Post 289258)
I was wondering if it was possible for the player to be able to open and queue folders. I still hate opening it one file at a time.

Yes, this is coming in a future version and is already available in the current git HEAD.

taylork 2009-06-06 03:05

Re: Panucci Podcast and Audiobook Player
 
The pause key (key between 4way) doesn't pause anymore in the last couple of releases.

ogg files play but the time stays at 0:00 and doesn't resume next time. ogg files work fine in media player, mplayer, etc.

nikosapi 2009-06-06 04:53

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by taylork (Post 294209)
The pause key (key between 4way) doesn't pause anymore in the last couple of releases.

ogg files play but the time stays at 0:00 and doesn't resume next time. ogg files work fine in media player, mplayer, etc.

Which release/distro are you using specifically? Please keep in mind that if you're using the latest code in the git repo, it's not guaranteed to be stable and especially now things might be broken.

For ogg playback, which ogg support package did you install? We only support mogg, but I can try to include support for other ogg support packages.

taylork 2009-06-06 12:39

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by nikosapi (Post 294218)
Which release/distro are you using specifically? Please keep in mind that if you're using the latest code in the git repo, it's not guaranteed to be stable and especially now things might be broken.

For ogg playback, which ogg support package did you install? We only support mogg, but I can try to include support for other ogg support packages.

diablo, and client version 0.16.1-1. For ogg, ogg-support version 0.9, I'll install mogg to see what that does.

taylork 2009-06-06 14:02

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by taylork (Post 294265)
diablo, and client version 0.16.1-1. For ogg, ogg-support version 0.9, I'll install mogg to see what that does.

There doesn't appear to be a diablo version of mogg that installs .....

nikosapi 2009-06-06 14:06

Re: Panucci Podcast and Audiobook Player
 
Quote:

Originally Posted by taylork (Post 294265)
diablo, and client version 0.16.1-1.

You're thinking of gPodder, there has never been a version 0.16.x of Panucci. The two projects are developed by the same people but they don't share version numbers (Panucci moves at a much slower pace than gPodder).


All times are GMT. The time now is 07:31.

vBulletin® Version 3.8.8