1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

announcing jukebox - an mp3 player for pyhme

Discussion in 'Developers Corner' started by jbernardis, Dec 26, 2011.

  1. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    If anybody has any clues to what can be done to solve this issue, I'd appreciate some clues. My biggest difficulty is that I don't have a test platform since my TiVos are Series 3 OLED models, but I'd guess that jcthorne would be a willing tester if I had something I could try.
     
  2. jcthorne

    jcthorne Active Member

    2,720
    3
    Jan 28, 2002
    Houston
    Absolutely. It has to be something around the HDMI connection. If I connect directly to the tivo using analog audio cables it works fine, not with the rest of the system but you get the stereo audio. Wish I could be more help.
     
  3. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    Try toggling the "Dolby Digital to PCM" setting. (Of course this has other problems.)
     
  4. jcthorne

    jcthorne Active Member

    2,720
    3
    Jan 28, 2002
    Houston
    OK, data point I suppose. Changing the setting from Dolby Digital to PCM jukebox works normally. Change it back to dolby and Jukebox is silent. No reboot, I can toggle back and forth and its repeatable.

    These are stereo mp3 files its playing. I noticed its not just the music that is silent. The menu bloops are gone when sound is set for dolby as well.
     
  5. cassiusdrow

    cassiusdrow Member

    130
    0
    May 21, 2003
    NJ
    I am using the Jukebox with both a Series 3 OLED (using component/optical) and a Premiere XL (using HDMI). I have not had audio problems with the jukebox. Both are NOT set to convert "Dolby Digital to PCM".

    I am seeing a different issue. When the TiVo button is used to exit the Jukebox while music is playing, the music file is not closed. I have to stop the HME for Python process to release the file.

    Edit: Turns out I have to stop both the pyTiVo and HME for Python processes to release the music file. I also tried just using the pyTiVo music directly and had the same issue, so maybe this is really a pyTiVo issue.

    Edit 2: Tried exiting with the left arrow and thumbs up while music is playing, same issue.
     
  6. xekester

    xekester New Member

    40
    0
    Nov 10, 2005
    I've installed and configured python27, pyTivo, HME for Python, the Python Image Library and Jukebox. I copied the pyTivo mutagen directory to the jukebox directory, I ran the BuildCache for Jukebox successfully. I started pyTivo in a console window, and in a separate console window I run start.py but I only get to Server Starts. Can someone point me to what's wrong? Config files below.

    C:\Python27\Lib\site-packages\HME-Python>start.py
    HME Server for Python 0.20
    Not using Zeroconf:
    Fri Apr 12 14:23:07 2013 JukeBox version 1.1a module initializing
    Fri Apr 12 14:23:07 2013 Starting cache file load
    Fri Apr 12 14:23:10 2013 Starting sort
    Fri Apr 12 14:23:10 2013 Finished - 8169 music files, 1160 albums, 702 album artists, 1066 track artists
    Fri Apr 12 14:23:10 2013Cache watcher thread starting - watch interval = 600
    Server Starts

    No further output and the apps don't appear. Is the issue with HME or is it the app?

    Thanks,
    xekester

    HME-Python config.ini
    [hmeserver]
    port=9032
    address=192.168.1.128
    zeroconf=False
    basepath=C:\Python27\Lib\site-packages\HME-Python
    datapath=C:\Python27\Lib\site-packages\HME-Python

    apps=picture clock jukebox

    [picture]
    path=C:\Python27\Lib\site-packages\HME-Python\picture
    delay=2
    exts=.jpg .png

    [jukebox]
    path=C:\Python27\Lib\site-packages\HME-Python\jukebox

    pyTivo.conf
    [Server]
    port = 9032
    ts = on
    ffmpeg = C:\pytivo\bin\ffmpeg.exe
    tivo_mak = XXXXXXX
    tivo_username = XXXXXXXXX
    togo_path = \\DiskStation\video\Tivo
    tivodecode = C:\pytivo\bin\tivodecode\tivodecode.exe
    beacon = 192.168.1.153
    tivo_mind = symind.tivo.com:8181
    debug = True
    tdcat = C:\pytivo\bin\tivodecode\tdcat.exe
    tivo_password = XXXXXXX
    zeroconf = False

    [_tivo_SD]

    [_tivo_HD]

    [MyPhotos]
    type = photo
    path = E:\Data\Photos

    [MyMusic]
    type = music
    path = \\Diskstation\Music\iTunes\Music

    [MyVideos]
    path = \\Diskstation\video\Movies
    type = video
    force_alpha = True

    [MyTVSeries]
    path = \\Diskstation\video\TVShows
    type = video
    force_alpha = True
     
  7. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    Why did you disable Zeroconf? start.py has no other way to announce (unless you configure old-style beacons, which you haven't, and that's only available in the git version anyway). The only other way you'll see it is if you run it on port 80 and use the TiVo's "Add an App" function.

    Oh, you also have them both trying to run on port 9032. That won't work (and you should've seen an error about it from whichever one launched second). They need separate ports. (Which they would have, by default -- there's really no need to specify these.)
     
  8. xekester

    xekester New Member

    40
    0
    Nov 10, 2005
    Ignorance on my part (still learning). I've changed Zeroconf in HME-Python config.ini and pyTivo.config to True. Or should I just remove Zeroconf from both (default to True?)

    I've removed the port from the HME-Python config file. I kept the port=9032 in pyTivo.conf.

    Now when I run start.py, jukebox runs, displays all menus, I am able to interact with the app, but when I go to play songs, they don't play. Note to jbernardis: When this happens, the playing screen is displayed, but the progress indicator does not move.

    wmcbrine, Can I assume getting this far means I am past pyTivo and HME-Python issues at this point?

    Now my issues are with how I set up my jukebox configuration.
    The only odd things I see in the trace are references to Server address and port IDs (see bolded trace below).
    My Tivo is at 192.168.1.153.

    Thank you wmcbrine for your help (and patience :)) in both threads today.

    Xekester

    C:\Python27\Lib\site-packages\HME-Python>start.py
    HME Server for Python 0.20
    Fri Apr 12 17:49:34 2013 JukeBox version 1.1a module initializing
    Fri Apr 12 17:49:34 2013 Starting cache file load
    Fri Apr 12 17:49:36 2013 Starting sort
    Fri Apr 12 17:49:36 2013 Finished - 8169 music files, 1160 albums, 702 album artists, 1066 track artists
    Fri Apr 12 17:49:36 2013Cache watcher thread starting - watch interval = 600
    Server Starts
    Registering: jukebox
    192.168.1.153:55297 - - [12/Apr/2013 17:51:15] "GET /jukebox/icon.png HTTP/1.0" 200 -
    192.168.1.153:55298 - - [12/Apr/2013 17:51:24] "GET /jukebox/ HTTP/1.1" 200 -
    192.168.1.153:55298 - - [12/Apr/2013 17:51:24] Starting HME: jukebox
    Jukebox thread entering startup
    Jukebox thread activating
    Server address = 128.96.11.243:9032
    192.168.1.153:55298 - - [12/Apr/2013 17:52:48] Ending HME: jukebox
    192.168.1.153:55335 - - [12/Apr/2013 17:52:49] "GET /jukebox/icon.png HTTP/1.0" 200 -
     
  9. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Does your pytivo log show anything unordinary? Jukebox passes the URL of your PyTIvo server to the Tivo, and the TiVo actually gets the file from PyTivo. Jukebox has no actual interaction with the playing file - it just reacts to status messages that the TiVo sends as IT (the TiVo) is playing the stream. The status messages are simply used to update the display. Make sure you specify the correct IP address and port of your PyTivo server.
     
  10. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    When I ask "Why did you disable Zeroconf", it's not a rebuke. I'm trying to find out why you thought it was a good idea to do that, so that perhaps I can correct whatever bit of documentation gave you that impression, so the next person doesn't do that.

    Too early to say that. Can you play music through the TiVo's built-in MP3 player?

    This doesn't look like the right address.
     
  11. lrhorer

    lrhorer Active Member

    6,923
    0
    Aug 31, 2003
    San...
    Indeed, it does not. That is a routable address, and exceedingly few people would want their pyTivo server on a routable port. The other IP addresses he displays are all on 192.168.1/24, which is a very common nonroutable subnet. One would ordinarily expect all the hosts to be on the same (nonroutable) subnet.
     
  12. xekester

    xekester New Member

    40
    0
    Nov 10, 2005
    jbernardis, I don't have logging enabled for pyTivo or HME-Python. I don't know how to enable logging yet.
    However, I disabled the pyTivo service and then ran it on a console window. When I run start.py in another console window and go to play a song I got:
    on start.py console:

    Server Starts
    Registering: jukebox
    192.168.1.153:48025 - - [12/Apr/2013 23:06:23] "GET /jukebox/icon.png HTTP/1.0" 200 -
    192.168.1.153:48026 - - [12/Apr/2013 23:06:39] "GET /jukebox/ HTTP/1.1" 200 -
    192.168.1.153:48026 - - [12/Apr/2013 23:06:39] Starting HME: jukebox
    Jukebox thread entering startup
    Jukebox thread activating
    Server address = 128.96.11.243:9032

    on pyTivo console
    no new output at this point.

    wmcbrine, No, no offense taken or meant. I am just grateful that you guys
    are taking the time to support these projects. For me, the hardest part has been to try and pull all of the
    pieces together.

    If by built-in MP3 player you mean just using pyTivo-->MyMusic share, then yes the same songs play correctly. Harmonium also works for the same songs.

    I am still trying to figure out where that stray Server IP address came from, as well as the strange port IDs (e.g. 48025 or is that a thread ID?, or ????).

    Thanks Guys,
    Xekester
     
  13. xekester

    xekester New Member

    40
    0
    Nov 10, 2005
    The problem was that I needed to specify in jukebox.ini:

    serverip=192.168.1.128
    serverport=9032

    As specified in jbernadis's jukebox readme (DOH!)

    Music is playing fine now.

    Thank you all for your support.

    Onwards and upwards!

    Xekester
     
  14. fxsknr

    fxsknr New Member

    3
    0
    Feb 27, 2010
    I have a specific mp3 file that won't play in jukebox. The slider stays at 0:00 and doesn't move. No sound comes out and from that moment on and I'm unable to play any other song with any music player on the tivo (including Pandora) until I reboot the tivo. The same track plays just fine with pytivo by itself. Other mp3 tracks play ok, so jukebox seems to be configured right.

    I'm running into this issue on a Tivo HD with the latest software available. I'm also using the latest versions of pytivo, pyhme, and jukebox.

    Here is my configuration for pytivo:

    [Server]
    port = 9032
    ffmpeg = C:\pytivo\bin\ffmpeg.exe
    tivodecode = C:\pytivo\bin\tivodecode.exe

    [_tivo_SD]

    [_tivo_HD]

    [MyMusic]
    path = C:\Users\Corey\Music\iTunes\iTunes Music
    type = music


    Here is my configuration for pyhme:

    [hmeserver]
    apps=jukebox


    Here is my configuration for jukebox:

    [jukebox]
    serverip = 192.168.1.6
    serverport = 9032
    pytivo = C:\pytivo\pyTivo.conf
    preloadcache = False
    cachewatchinterval = 600
    autoswitchnp = 120
    ignoreidle = False
    ignorearticles = False
    lyricindent = -1
    usefolderimage = False
    folderartfiles = ['folder.jpg']
    screensaver = 600
    ignorecase = True
    skin = None
    albumshuffle = False
    albumloop = False
    artistshuffle = False
    artistloop = False
    playlistshuffle = False
    playlistloop = False
    trackshuffle = True
    trackloop = False
     
  15. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    It's I possible to say. I sent you a pm with my email address. Could you send me the file?
     
  16. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    Given how easily the TiVo gets into that state (i.e., where it won't play any more MP3s), it might be coincidence rather than that specific file. But, try adding "force_ffmpeg = True" to the "MyMusic" section of your pyTivo.conf.
     
  17. xekester

    xekester New Member

    40
    0
    Nov 10, 2005
    JBernardis,

    It would be nice if Jukebox could use exported iTunes playlists (.m3u).
    Here's a sample of two songs from an m3u playlist file (the first line in the sample is the first line from the file):

    #EXTM3U
    #EXTINF:335,The Crosswords & The Safety Pins - Battered Ornaments
    \\DiskStation\Music\iTunes\Music\Battered Ornaments\Mantle-Piece\11-04 The Crosswords & The Safety Pins.mp3
    #EXTINF:248,Staggered - Battered Ornaments
    \\DiskStation\Music\iTunes\Music\Battered Ornaments\Mantle-Piece\1-05 Staggered.mp3

    And, it would be nice to able to specify the Playlist's folder location (other than in the jukebox directory.
    -Not have to maintain multiple playlist directories for different devices/apps.

    I really like the improvements you've made over the Harmonium app.

    Thanks for your consideration,
    Xekester
     
  18. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    So far as I know, jukebox DOES read m3u files directly. I've not done extensive testing on it, so if you have a specific issue let me know. The only caveat I would have is the following: If jukebox reads in an M3U playlist, and you edit it in any way, it will be saved as an equivalent JPL file - the M3U file will remain unchanged, but it will no longer be loaded on startup (actually at present, the M3U file will be deleted - more on this below)

    Regarding the playlist directory, I have modified the code to support this. A new ini file option allows you to specify a location, and the default location will remain what it is today. While making this change, I also made the above mentioned modification whereby it will no longer delete an M3U file if it is edited - it will just ignore it in the future.

    I have put this up on GIT as version 1.1b.
     
  19. xekester

    xekester New Member

    40
    0
    Nov 10, 2005
    jbernardis,

    Wow, that was quick! Thanks.

    I will give it a try later today after my houseguest leaves.

    Xekester
     
  20. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Regarding the bjork file that wouldn't play in Jukebox. The issue IS with the directory name. In the short term, the problem can be solved by changing the name of the directory to "bjork" and then rebuilding the cache.

    Now the issue: The path of the file is formed into a URL that is passed to the TiVo. The URL is as follows:
    Code:
    http://192.168.1.201:9032/My%20Music/Bj%C3%B6rk/01%20Hunter.mp3
    
    When pytivo gets this URL, the following appears in its log:

    Code:
    2013-04-23 19:24:34,589 ERROR pyTivo: Exception during request from ('192.168.1.103', 1561)
    Traceback (most recent call last):
      File "SocketServer.py", line 463, in process_request_thread
        self.finish_request(request, client_address)
      File "SocketServer.py", line 254, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "/usr/local/pytivo/httpserver.py", line 64, in __init__
        client_address, server)
      File "SocketServer.py", line 521, in __init__
        self.handle()
      File "BaseHTTPServer.py", line 316, in handle
        self.handle_one_request()
      File "BaseHTTPServer.py", line 310, in handle_one_request
        method()
      File "/usr/local/pytivo/httpserver.py", line 95, in do_GET
        self.handle_file(query, splitpath)
      File "/usr/local/pytivo/httpserver.py", line 165, in handle_file
        plugin.send_file(self, path, query)
      File "/usr/local/pytivo/plugins/music/music.py", line 102, in send_file
        fsize = os.path.getsize(fname)
      File "posixpath.py", line 139, in getsize
        return os.stat(filename).st_size
    UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 15: ordinal not in range(128)
    
    The line of code I use to form the URL is as follows:
    Code:
    url = "http://%s:%s/%s" % (self.server_host, self.server_port, quote(fn))
    
    where quote is an alias for urllib.quote.
     

Share This Page