TiVo Community
TiVo Community
TiVo Community
Go Back   TiVo Community > Underground Playground > Developers Corner
TiVo Community
Reply
Forum Jump
 
Thread Tools
Old 12-26-2011, 10:21 PM   #1
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
announcing jukebox - an mp3 player for pyhme

I have just put up on GIT a python MP3 player that runs under wmcbrine's pyhme framework. Several of the design features for this were "borrowed" from harmonium, and I would like to acknowledge that product and its authors. I just needed something that wasn't java-based.

I've mentioned that I have been working on this for some time now, and since I just recently solved the problem I had with it not working under pyhme 0.19, I decided it was time to release it. Even though I am calling it 1.0, it's somewhat early in its testing phase. Get it from the link in my signature and give it a try.

One note - I wrote it to support HD resolution only. If there is sufficient outcry for SD support, I'll consider it
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 12-27-2011, 12:30 AM   #2
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
Hmm...

Code:
RAID-Server:/usr/share/pyhme/jukebox# python BuildCache.py 
Tue Dec 27 00:28:53 2011 starting cache build from MP3 files
Traceback (most recent call last):
  File "BuildCache.py", line 80, in <module>
    config = Config.Config(None)
  File "/usr/share/pyhme/jukebox/Config.py", line 60, in __init__
    if not self.cfg.read(self.fn):
  File "/usr/lib/python2.6/ConfigParser.py", line 286, in read
    self._read(fp, filename)
  File "/usr/lib/python2.6/ConfigParser.py", line 482, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /usr/share/pyhme/jukebox/jukebox.ini, line: 24
'pytivo = /usr/share/pyTivo/pyTivo.conf\n'
It looks to me like your parser is confused by a newline. Line 24 is the first un-commented line in the .ini file. If I un-comment an earlier line, it complains of that line.

Last edited by lrhorer : 12-27-2011 at 12:36 AM.
lrhorer is offline   Reply With Quote
Old 12-27-2011, 12:40 AM   #3
Allanon
Registered User
 
Join Date: Nov 2005
Posts: 522
The jukebox.ini file is missing the section header. Just put [jukebox] at the top of the jukebox.ini file. The included example is missing it also.

I tried the program and it works good but it's a lot more functionality than I need for my music needs.
Allanon is offline   Reply With Quote
Old 12-27-2011, 10:00 AM   #4
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Allanon was right. I was missing the [jukebox] section heading in the jukebox.ini.dist file. GIT has been updated with this change.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 12-31-2011, 02:36 AM   #5
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
'Any chance we can convince you to look into features like those on Galleon?

Specifically:

1. A more sophisticated screen saver. A blank TV screen may be misinterpreted as being off.

2. Album art lookup / refresh.

3. Lyrics lookup.
lrhorer is offline   Reply With Quote
Old 12-31-2011, 09:34 AM   #6
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Quote:
Originally Posted by lrhorer
1. A more sophisticated screen saver. A blank TV screen may be misinterpreted as being off.
I can look into this. I was earlier thinging of having the album artwork bouncing around.
Quote:
2. Album art lookup / refresh.
I'm not sure what you mean here. I simply show what's in the mp3 file. I don't think I want to get into updating the mp3 file.
Quote:
3. Lyrics lookup.
I'd have to do some research here. I'm not currently aware of a web site that let's me retrieve lyrics. If I could find one (or if you know of one) and it has a reasonable interface I might be able to do something here
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 12-31-2011, 11:00 AM   #7
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
Quote:
Originally Posted by jbernardis View Post
I can look into this. I was earlier thinging of having the album artwork bouncing around.
That would work. Galleon does the same.

Quote:
Originally Posted by jbernardis View Post
I'm not sure what you mean here. I simply show what's in the mp3 file. I don't think I want to get into updating the mp3 file.
That's not what I was suggesting. Galleon simply looks up likely album covers on the web based upon the artist and displays them. Of course, most of them do not have anything to do with the current song, but it does present a montage of the artist's work.

Quote:
Originally Posted by jbernardis View Post
I'd have to do some research here. I'm not currently aware of a web site that let's me retrieve lyrics. If I could find one (or if you know of one) and it has a reasonable interface I might be able to do something here
lyrics.com, or maybe azlyrics.com?
lrhorer is offline   Reply With Quote
Old 01-01-2012, 08:29 PM   #8
rjmitche
Registered User
 
Join Date: Dec 2004
Posts: 44
Got a chance to try this out the other day. Nice work. I like what you've done (having been a Harmonium user, I can see the resemblance).

Looks like I've got some work to do to clean up/restructure the metadata of my music to make it more "Jukebox-friendly"... especially in the area of "Album Artist vs. Track Artist" and Album Art (image size consistency). A couple of questions/comments...

1) I've got a lot of compilations that have many different artists. Right now, most of these have "Various Artists" in the Album Artist field - is it expected that Album Artist would be blank for this type of Album so that it falls to/dsiplays Track Artist? Any chance of a configuration option to change the order in which the artist fields are used?

2) What is the optimal image size for Album Art display in Jukebox? While I'm pretty good about making sure all of my audio files have image art, I'm all over the board in terms of the size of the image... which becomes painfully obvious when the player doesn't re-size them to a standard size.

3) I like the fact that the "Next Track" is displayed however I feel like it should be set apart more from the currently playing information. Perhaps it could be moved to someplace away from the main info section or displayed in a smaller font (or both).

4) Any chance for more built-in support for pre-existing (m3u) playlists? I found that I could play my pre-existing playlists by copying them into the jukebox\playlist directory and renaming them to .jpl files. I'm wondering if there is an easier way.

Thanks again for another great app!
rjmitche is offline   Reply With Quote
Old 01-01-2012, 09:03 PM   #9
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Quote:
Originally Posted by rjmitche View Post
Got a chance to try this out the other day. Nice work. I like what you've done (having been a Harmonium user, I can see the resemblance).

Looks like I've got some work to do to clean up/restructure the metadata of my music to make it more "Jukebox-friendly"... especially in the area of "Album Artist vs. Track Artist" and Album Art (image size consistency). A couple of questions/comments...
Glad you like it. I tried to answer your questions below.
Quote:
1) I've got a lot of compilations that have many different artists. Right now, most of these have "Various Artists" in the Album Artist field - is it expected that Album Artist would be blank for this type of Album so that it falls to/dsiplays Track Artist? Any chance of a configuration option to change the order in which the artist fields are used?
I tried various ways of dealing with this and what I ended up with the following: if both the track and album artist are specified, then those values are used. If one or the other is missing, then the value that is present is used for both. If both are missing, a value of "<unknown>" is used. Thus if you don't have the album artist as in your example, it should use the track artist instead.
Quote:
2) What is the optimal image size for Album Art display in Jukebox? While I'm pretty good about making sure all of my audio files have image art, I'm all over the board in terms of the size of the image... which becomes painfully obvious when the player doesn't re-size them to a standard size.
Art larger that 320 x 320 is reduced to 320 x 320 when the cache is built - it is one reason why the cache building takes so long. Art smaller that 320 x 320 is left unchanged. When I was developing, I noticed that a few of my songs weren't displaying art. When I looked, I discovered that these songs had bitmap artwork. I replaced it with jpg and it worked fine. I never looked any more into this, so for now at least I would recommend jpg artwork.
Quote:
3) I like the fact that the "Next Track" is displayed however I feel like it should be set apart more from the currently playing information. Perhaps it could be moved to someplace away from the main info section or displayed in a smaller font (or both).
Not commiting to it, but I'll consider it.
Quote:
4) Any chance for more built-in support for pre-existing (m3u) playlists? I found that I could play my pre-existing playlists by copying them into the jukebox\playlist directory and renaming them to .jpl files. I'm wondering if there is an easier way.
All I really need in a playlist file is a list of fully qualified path names. These are used to index into a dictionary I built that gives me back object references. Perhaps I can read in alternate playlist formats, but if they are changed in any way through the playlist editor screen, they will be written out as jpl files. Alternatively (and this might be simpler) I could write a conversion tool. Let me think about this one too.
Quote:
Thanks again for another great app!
An update on what I have been doing

1) I have implemented the screen saver ar lrhorer has requested - instead of a blank screen, the artwork for the current song moves around on the screen (if no song is presently playing, the application icon is used instead)

2) I have implemented a safeguard - if you try to exit by pressing left form the main menu while music is playing, you will be asked to confirm with a thumbsup. This prevents you from quickly hitting left-left-left rising up throught the menus and hitting it once too often and exiting the app.

3) I am working on lyrics retrieval. Not sure how it's going to mesh in with the main application yet. I am also having some difficulty because you don't always get well-formed HTML back from some of these web sites and I don't like the work-arounds.

GIT hasn't been updated with these yet - I am going to wait a few days to see how the lyrics retrieval progresses. If it looks like it will be a while before that will be done, I'll update with what I have done so far rather than wait for that work to be completed.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-11-2012, 08:35 PM   #10
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
I have updated github with version 1.0a of jukebox. I haven't incorporated lyrics yet and am not sure if I will. The algorithm for retrieving lyrics is too non-deterministic for my liking.

What I HAVE implemented are the better screen saver and exit safeguard as described in the above post. I also now allow for the direct reading of m3u playlist files in addition to my own jpl files. A few caveats with using m3u files: 1) if they are modified within jukebox and then saved, they will be written as jpl files, not m3u files. 2) jukebox is looking for a fully-qualified file name within the playlist file. Depending on the way you have file systems mounted, the same file can have different paths on different systems. If you run jukebox on a system different from where you run your normal media player, the m3u file will possibly not work.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-12-2012, 01:27 AM   #11
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
Quote:
Originally Posted by jbernardis View Post
I haven't incorporated lyrics yet and am not sure if I will. The algorithm for retrieving lyrics is too non-deterministic for my liking.
Well, there is no way the lyrics will always be available, and Galleon certainly was not always able to obtain the lyrics to any given song, but sporadic retrieval is better than none at all. IMO, of course.

Quote:
Originally Posted by jbernardis View Post
What I HAVE implemented are the better screen saver and exit safeguard as described in the above post.
Excellent, as always. I'll have to give the new build a try this weekend.
lrhorer is offline   Reply With Quote
Old 01-14-2012, 08:33 AM   #12
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 1,916
Finally got time to try installing this and got as far as running buildcache.py

I get the following error:
Code:
C:\python HME\jukebox>BuildCache.py
Sat Jan 14 08:23:32 2012 starting cache build from MP3 files
Beginning container: Thornolis Music (Z:\Music)
.
Traceback (most recent call last):
  File "C:\python HME\jukebox\BuildCache.py", line 116, in <module>
    (title, albumName, trackArtistName, albumArtistName, fn, art, length, genre,
 track) = parseMP3(fn)
  File "C:\python HME\jukebox\BuildCache.py", line 31, in parseMP3
    md = MP3(fn)
  File "C:\python HME\jukebox\mutagen\__init__.py", line 75, in __init__
    self.load(filename, *args, **kwargs)
  File "C:\python HME\jukebox\mutagen\id3.py", line 1957, in load
    self.info = self._Info(fileobj, offset)
  File "C:\python HME\jukebox\mutagen\mp3.py", line 101, in __init__
    self.__try(fileobj, offset, size - offset, False)
  File "C:\python HME\jukebox\mutagen\mp3.py", line 138, in __try
    raise HeaderNotFoundError("can't sync to an MPEG frame")
mutagen.mp3.HeaderNotFoundError: can't sync to an MPEG frame
Suggestions?
__________________
Current : Roamio Base with 2TB drive and 2 Premieres and a mini. OTA. kmttg, pyTivo, running with a 78TB Synology 1511 NAS....serving up the world.

Setup help for pytivo under windows:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jcthorne is offline   Reply With Quote
Old 01-14-2012, 11:43 AM   #13
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
jcthorne:

This error is coming out of mutagen - most likely it is an ill-formed MP3 file. I have updated github with a new BuildCache.py - I added a try block around the mutagen call. The file still cannot be parsed, but now it will be identified, and even better - it will be skipped and the cache will continue to build without the offending file(s).
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-14-2012, 04:37 PM   #14
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 1,916
Thanks. BuildCache got much further and died again. This time the error is:

Code:
+ . . . . | . . . . + . . . . | .
Traceback (most recent call last):
  File "C:\python HME\jukebox\BuildCache.py", line 134, in <module>
    artRsz = resizeArt(art, artWidth, artHeight)
  File "C:\python HME\jukebox\AlbumArt.py", line 34, in resizeArt
    pic.save(out, 'JPEG')
  File "C:\Python27\lib\site-packages\PIL\Image.py", line 1406, in save
    self.load()
  File "C:\Python27\lib\site-packages\PIL\ImageFile.py", line 201, in load
    raise IOError("image file is truncated (%d bytes not processed)" % len(b))
IOError: image file is truncated (138 bytes not processed)

__________________
Current : Roamio Base with 2TB drive and 2 Premieres and a mini. OTA. kmttg, pyTivo, running with a 78TB Synology 1511 NAS....serving up the world.

Setup help for pytivo under windows:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jcthorne is offline   Reply With Quote
Old 01-14-2012, 06:42 PM   #15
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Again - this is probably an ill-formed MP3 file. IN this case, it looks like it has bad image data.

I have posted a new version on github. This adds a try block around all of the PIL/resizing logic. If the PIL logic fails, the file is not skipped, but it will be assigned default album artwork.

I have no good way of testing this fix. I DID make sure it still generates the same cache file (checksums equal) as the old version did when the files do not have any bad data. I don't know, however, the exact issue with your file that caused PIL to fail. Give it a try and let me know how it goes.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-14-2012, 10:15 PM   #16
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,232
Finally got around to trying this ... pretty nice. Although I hate apps that show me how messed up my metadata is.

I currently use Galleon's music player primarily for the iTunes app, which automatically pulls my playlists out of my iTunes library so I don't have to maintain a separate set of files (I just copy the XML file from my PC to the Linux box every now and then and do a global search/replace to switch the path).

Nice looking app, though! It took about 20 minutes for BuildCache.py to process my 5,673 files ... only two errors on album art resizing.
__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
windracer is offline   Reply With Quote
Old 01-14-2012, 11:32 PM   #17
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Quote:
Originally Posted by windracer View Post
Finally got around to trying this ... pretty nice. Although I hate apps that show me how messed up my metadata is.
Glad you like it
Quote:
Originally Posted by windracer View Post
I currently use Galleon's music player primarily for the iTunes app, which automatically pulls my playlists out of my iTunes library so I don't have to maintain a separate set of files (I just copy the XML file from my PC to the Linux box every now and then and do a global search/replace to switch the path).
No reason I can't do that for this app. Let me look into it.
Quote:
Originally Posted by windracer View Post
Nice looking app, though! It took about 20 minutes for BuildCache.py to process my 5,673 files ... only two errors on album art resizing.
That seems a little slow. My cache builds in about 5 or 6 minutes - ~3200 songs - and that is on my netgear ReadyNAS which, I believe, is a single core Atom processor.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-15-2012, 10:14 AM   #18
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 1,916
Well, making progress. Buildcache finished. Approx 2.5hrs to finish 141,000 files.

jukebox shows up on the tivo. Selecting it gets me a please wait.

On the machine running jukebox it says "Starting cache file load"

The tivo times out and goes back to the menu.

Approx 1 minute and 40 seconds later juke box says "Starting sort" Then 7 seconds "Finished - 141767 music files, 9328 albums, 635 album artists, 3559 track artists"

It then reports an exception, "An established connection was aborted by the software in your host machine"

It appears, jukebox is taking too long to respond and tivo is giving up and going back to the menu. Let me know if you need the full output of jukebox and I can paste it.

Really do appreciate your work on this, I look forward to getting it running.

James
__________________
Current : Roamio Base with 2TB drive and 2 Premieres and a mini. OTA. kmttg, pyTivo, running with a 78TB Synology 1511 NAS....serving up the world.

Setup help for pytivo under windows:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jcthorne is offline   Reply With Quote
Old 01-15-2012, 12:19 PM   #19
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
141,000 Files!!!!!

That might be a bit too much to handle. Send me your output and I'll look at it, but it might just be too much to handle. With 141000+ files, your cache file is probably just under a gig. I think most people have <10,000 files and that was the scale I had in mind when I wrote the program
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-15-2012, 01:43 PM   #20
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
Quote:
Originally Posted by jbernardis View Post
141,000 Files!!!!!
That was my response, too. If we assume 2 minutes per song (which may be too conservative if he has a lot of classical music), that's 195 days worth of music running 24 hours a day. The way that I listen to music, it's more like 195 years!

Quote:
Originally Posted by jbernardis View Post
I think most people have <10,000 files and that was the scale I had in mind when I wrote the program
I think that's a pretty good assumption. Of course I don't have all that much in the way of music, but I only have 1368 songs from 623 albums.
lrhorer is offline   Reply With Quote
Old 01-15-2012, 02:37 PM   #21
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,232
Quote:
Originally Posted by jbernardis View Post
That seems a little slow. My cache builds in about 5 or 6 minutes - ~3200 songs - and that is on my netgear ReadyNAS which, I believe, is a single core Atom processor.
My Linux box is also an Atom processor (although a dual-core one) but the music library is on a different NAS, not local, so maybe that's why.
__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
windracer is offline   Reply With Quote
Old 01-15-2012, 05:48 PM   #22
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 1,916
Quote:
Originally Posted by jbernardis View Post
141,000 Files!!!!!

That might be a bit too much to handle. Send me your output and I'll look at it, but it might just be too much to handle. With 141000+ files, your cache file is probably just under a gig. I think most people have <10,000 files and that was the scale I had in mind when I wrote the program
It appears that jukebox in not having trouble with it, just that the tivo does not wait for the cache to load. Could the cache be preloaded when jukebox starts rather than waiting for tivo to ask for the app?

The cache file is 121MB.

Thanks.

Code:
HME Server for Python 0.19
Sun Jan 15 17:43:44 2012 Thornolis Video Archive version 2.0c module initializin
g
Loading thumbnail cache
100 thumbnails loaded from cache
Sun Jan 15 17:43:44 2012 JukeBox version 1.0c module initializing
Sun Jan 15 17:43:44 2012 Server Starts
Registering: jukebox
Registering: vidmgr
192.168.1.109:40386 - - [15/Jan/2012 17:43:51] "GET /jukebox/ HTTP/1.1" 200 -
192.168.1.109:40386 - - [15/Jan/2012 17:43:51] Starting HME: jukebox
Jukebox thread entering startup
Sun Jan 15 17:43:52 2012 Starting cache file load
Sun Jan 15 17:45:06 2012 Starting sort
Sun Jan 15 17:45:11 2012 Finished - 141767 music files, 9328 albums, 665 album a
rtists, 3559 track artists
Jukebox thread activating
Server address = 192.168.1.128:9032
192.168.1.109:40386 - - [15/Jan/2012 17:45:11] Ending HME: jukebox
----------------------------------------
Exception happened during processing of request from ('192.168.1.109', 40386)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\python HME\start.py", line 139, in __init__
    client_address, server)
  File "C:\Python27\lib\SocketServer.py", line 641, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 694, in finish
    self.wfile.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] An established connection was aborted by the software in yo
ur host machine
----------------------------------------

__________________
Current : Roamio Base with 2TB drive and 2 Premieres and a mini. OTA. kmttg, pyTivo, running with a 78TB Synology 1511 NAS....serving up the world.

Setup help for pytivo under windows:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jcthorne is offline   Reply With Quote
Old 01-15-2012, 05:54 PM   #23
jcthorne
Registered User
 
Join Date: Jan 2002
Location: Houston
Posts: 1,916
Quote:
Originally Posted by lrhorer View Post
That was my response, too. If we assume 2 minutes per song (which may be too conservative if he has a lot of classical music), that's 195 days worth of music running 24 hours a day. The way that I listen to music, it's more like 195 years!


I think that's a pretty good assumption. Of course I don't have all that much in the way of music, but I only have 1368 songs from 623 albums.
lrhorer,

I admired your video collection and your organization of it. Never made fun of someone wanting to store more video than they will ever watch.

I have been buying and collecting music for many years and yes, the collection is large and growing. I use it every day.

This forum, of all places I did not feel I would have to justify the desire to catalog and present a large music collection. It occupies less than 2TB of storage so not that much by today's storage capacities.
__________________
Current : Roamio Base with 2TB drive and 2 Premieres and a mini. OTA. kmttg, pyTivo, running with a 78TB Synology 1511 NAS....serving up the world.

Setup help for pytivo under windows:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jcthorne is offline   Reply With Quote
Old 01-15-2012, 08:32 PM   #24
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
Quote:
Originally Posted by jcthorne View Post
I admired your video collection and your organization of it. Never made fun of someone wanting to store more video than they will ever watch.
I wasn't making fun of it or you. I'm just astounded at the size. I'm not sure how you took any of what I said as derision, but it certainly wasn't my intent.

Quote:
Originally Posted by jcthorne View Post
I have been buying and collecting music for many years and yes, the collection is large and growing.
'To say the least. Of course I, too, have been collecting music for the better part of 4 decades, but obviously not nearly the volume you have, even if I were to rip every song on every album I own. As you can see from my stats, I only have an average of about 2 songs from each album in the library, since I rarely like more than 1 or 2 songs on any given album. I don't bother to rip any songs I don't like. Even applying a factor of 10 (most albums have somewhere around 15 - 20 songs on them), it still would only be about 10,000 files or so.

Quote:
Originally Posted by jcthorne View Post
I use it every day.
I should certainly hope so.

Quote:
Originally Posted by jcthorne View Post
This forum, of all places I did not feel I would have to justify the desire to catalog and present a large music collection.
I did not ask or expect you to do so. It's entirely your business how much music you collect, or why. I never suggested otherwise.

Quote:
Originally Posted by jcthorne View Post
It occupies less than 2TB of storage so not that much by today's storage capacities.
Well, 2T is quite a bit, especially for audio, but it's certainly not the unimaginable amount of space it was when I first got into computing.
lrhorer is offline   Reply With Quote
Old 01-15-2012, 08:49 PM   #25
lrhorer
Registered User
 
Join Date: Aug 2003
Location: San Antonio, Texas, USA
Posts: 6,867
Quote:
Originally Posted by windracer View Post
Nice looking app, though! It took about 20 minutes for BuildCache.py to process my 5,673 files ... only two errors on album art resizing.
Quote:
Originally Posted by jbernardis View Post
That seems a little slow. My cache builds in about 5 or 6 minutes - ~3200 songs - and that is on my netgear ReadyNAS which, I believe, is a single core Atom processor.
Both sound a little slow, to me. Admittedly, I have much fewer files, by a factor of almost 3 or 5, but still it only takes 9 seconds on my server, and it's no Ferrari.
lrhorer is offline   Reply With Quote
Old 01-15-2012, 10:36 PM   #26
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
jcthorne - I sent you a private message with my email address. I want to send you a version of jukebox for you to try before general consumption.

This version pre-loads the cache as you requested. Just so you know, the issue goes beyond when the cache is loaded. By preloading the cache, I've raised the problem of what happens when the cache changes. With the original design, all you had to do was exit the app and then re-enter it. By preloading, however, exiting the app has no effect - you'd instead need to exit the process (pyhme).

I have solved this by starting a thread that looks for a changed timestamp on the cache file every 10 minutes (actually a config parameter) and reloading when it detects this. The app still needs to be exited to "bring in" the new cache, but that is the same as today.

Overall I think it's a better design, but I'd like you to put it through its paces before I post it to github.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-15-2012, 10:39 PM   #27
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Quote:
Originally Posted by lrhorer View Post
Both sound a little slow, to me. Admittedly, I have much fewer files, by a factor of almost 3 or 5, but still it only takes 9 seconds on my server, and it's no Ferrari.
The time for building the cache depends largely on the artwork. This is when resizing is done. While I was developing the app, and before I put in the logic to resize the artwork, it took my rig about 25 seconds to build the cache. Adding the artwork logic took it up by a factor of 6 or 7.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-15-2012, 10:45 PM   #28
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
Quote:
Originally Posted by lrhorer View Post
Well, there is no way the lyrics will always be available, and Galleon certainly was not always able to obtain the lyrics to any given song, but sporadic retrieval is better than none at all. IMO, of course.
lrhorer - I'm thinking of attacking this in two steps.

First, the lyrics would be retrieved during cache building (or perhaps through a separate utility). I'm thinking that the lyrics themselves would be stored in a "parallel" file to the mp3 file (much like vidmgr uses parallel thumbnail and metadata files).

Step 2, jukebox would allow you to display the contents of this file by pressing, say, the info button.

This solution would allow you to create/edit your own file for those songs that prove troublesome for web downloading algorithms. It also allows you to put in any arbitrary information that you might want to have displayed.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-16-2012, 02:29 PM   #29
jbernardis
Registered User
 
Join Date: Oct 2003
Location: Princeton NJ
Posts: 1,064
A new version of jukebox - 1.0d - is up on github.

jcthorne and I have been working together today to get jukebox working with his rather large collection. Basically what I did was add the ability to pre-load the cache at process start time rather that at app activation time.

To control this, I have added 2 configuration options:

preloadcache = True or False
default is false and results in today's behavior.

If preloading is done, there is a problem with how I know when to reload the cache if it happens to change. I didn't want to force people to restart the entire pyhme process, but that is what it would have taken if I didn't do anything else.

What I did to solve this to to create a thread (only if preloadcache is True) that sleeps in an infinite loop, and when it wake up, it checks the timestamp on the cache file to see if it has changed. If it has, it reloads it. Note that if the GUI is active, reloading will have no effect on it - you MUST exit the app and re-enter to get the new cache. The frequency with which the thread wakes up is controlled by the second config.ini parameter:

cachewatchinterval = 600

This is the number of seconds between checking the file for changes. 10 minutes (600 seconds) is the default.

Thanks again to jcthorne for helping with this effort.
__________________
2 Series 3
1 HDTivo
1 Series 1 (Lifetime)
1 Win7 HTPC with Ceton Quad Tuner


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
jbernardis is offline   Reply With Quote
Old 01-17-2012, 07:46 PM   #30
windracer
joined the 10k club
 
windracer's Avatar
 
Join Date: Jan 2003
Location: St. Pete, FL
Posts: 11,232
Quote:
Originally Posted by jbernardis View Post
The time for building the cache depends largely on the artwork. This is when resizing is done. While I was developing the app, and before I put in the logic to resize the artwork, it took my rig about 25 seconds to build the cache. Adding the artwork logic took it up by a factor of 6 or 7.
I guess that explains my 20 minute cache time, then ... all of my MP3 files have artwork and they're not local to jukebox.

Code:
Tue Jan 17 02:08:43 2012 starting cache build from MP3 files
Beginning container: Music Library (/mnt/media/Music)
. . . . | . . . . + . . . . | . . . . + . . . . | . . . . + . . . . | . . . . + . . . . | . . . . + . . . . | . .
5763 music files in container
5763 total files in ALL containers

Tue Jan 17 02:27:10 2012 Starting sort
Tue Jan 17 02:27:11 2012 Saving cache to disk
Tue Jan 17 02:27:11 2012 Finished - 5763 music files, 2029 albums, 1247 album artists, 1244 track artists

__________________
840~Roamio Pro (TA, MoCA) + two A92~Minis, 758~Premiere XL4 (TA, MoCA)
S/old: 746~S4, 658~HDXL, 648~OLED S3, 565~TX20, 230~S2, 140~S2

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
windracer is offline   Reply With Quote
Reply
Forum Jump




Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Advertisements

TiVo Community
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
vBulletin Skins by: Relivo Media

(C) 2013 Magenium Solutions - All Rights Reserved. No information may be posted elsewhere without written permission.
TiVoŽ is a registered trademark of TiVo Inc. This site is not owned or operated by TiVo Inc.
All times are GMT -5. The time now is 11:02 AM.
OUR NETWORK: MyOpenRouter | TechLore | SansaCommunity | RoboCommunity | MediaSmart Home | Explore3DTV | Dijit Community | DVR Playground |