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

PyTivo Video Manager HME App for pyhme

Discussion in 'Developers Corner' started by jbernardis, Apr 20, 2011.

  1. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    For those wondering what all the fuss about vidmgr is, as they say, "A picture is worth a thousand words." Here are four screen shots of vidmgr 2.0 using my own background. I like the gray background.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     
  2. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Oh, I do, and one of my Genres is "Series". Every TV series metafile has that in it.
     
  3. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    You can - but you have to make some changes. What I'd do is name version 2 vidmgrHD, make sure it is in a directory named vidmgrHD, and inside that directory, edit __init__.py and change the name of the main class from Vidmgr to VidmgrHD.

    I guess the reason you want to do this is because you have both SD and HD tivos on your network. If this is the case, be aware that BOTH the SD and HD versions of the program will appear on both tivo's menus. You just cannot select the HD version from the SD tivo (well- you can, but it wont work :) )
     
  4. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Actually I've found that there is a significant difference between windows and linux when it comes to building the cache, and the culprit is the mechanism I use to determine if two files are in fact the same file (they are links to the same physical file). On Linux, I simply stat the file and get the inode number - a very inexpensive operation. Although the windows library gives us a stat function, it returns inode number 1 (or was it 0?) for every file, so it couldn't be used. I found some godawful algorithm on the internet that does what I want, but it's quite expensive.

    If you are running on Windows and have a video collection of any significance, I recommend that you build the cache ahead of time.
     
  5. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    This is a good point. You are NOT limited by the metadata tags or values that tivo/pytivo/kmttg/metagenerator gives you - you can invent your own and base your virtual shares on that new data. The only caveat that I mentioned above is that a tag beginning with a lower case 'v' is assumed to be a list (an array) and will be parsed as such. Because of this, it cannot be used as a grouping item.
     
  6. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Oh. I've never tried it under Windows. (You have a flair for under-statement. A factor of 60 is definitely "significant".) I've gone through my server and deleted a bunch of junk I no longer want, but still:

    Code:
    RAID-Server:/usr/share/pyhme# time ./BuildCache 
    Processing video share RAID Server
    1466 Videos found
    Processing video share Videos by Genre
    5067 Videos found
    Processing DVD share DVD
    83 DVD Videos found
    Processing video share Unverified
    0 Videos found
    Browse Series count: 411 videos in 9 groups
    Browse by Actor count: 1466 videos
    Browse by Channel count: 1461 videos
    Browse by Director count: 1449 videos
    Browse by Genre count: 1050 videos
    Browse by Producer count: 195 videos
    Videos Sorted by Alpha count: 1053 videos
    Videos Sorted by Date count: 1549 videos
    
    real    0m5.686s
    user    0m5.424s
    sys     0m0.264s
    That's on an older 2.4 GHz dual core AMD system.

    Yeah, I would say so, for certain. I even recommend it for Linux or Mac systems. Six seconds isn't really that much, but people can be impatient.
     
  7. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Right. To handle that limitation, I also have isEpisodic set to true in every series video. Thus, the "Browse by Genre" share has a group named "Series" in it with all the series sorted by name and (if it exists) episode number, while the "Browse by Series" share only has series in it, grouped by series name.
     
  8. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    I take a little different approach. I simply create a separate directory under the main share for each series, and the file naming rules are different in the series directories. In the main share, I simply have

    <Video Name> (Recorded <Day> <Date>, <Channel>).mp[4g]

    In the series directories I use either

    <Series Name> - <Episode Name> (Recorded <Day> <Date>, <Channel>).mp[4g]

    if the series is not chronological (i.e. - the original Star Trek TV series). or else

    <Series Name> - Sxx Eyy - <Episode Name> (Recorded <Day> <Date>, <Channel>).mp[4g]

    if it was a serial where order was important.
     
  9. cweb

    cweb New Member

    106
    0
    May 29, 2004
    I apologize, I am confused by what we are talking about regarding HD. I have all TiVo HDs and premieres. However, I have recode non HD content such as the BBC when it was only available as a non Hd channel. Should I be able to push these SD shows with ver 2.0?
     
  10. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Vidmgr does not do any of the transferring. It is merely a front end for pyTivo that is available on the TiVo. Other than the file extension and the information in the metafile, vidmgr neither knows nor cares anything at all of the video itself. Vidmgr will simply notify pyTivo it needs to induce the Tivo to transfer the file in question. If it is a valid video file as recognized by ffmpeg, then pyTivo will tell the mind server to have the TiVo request the video. It doesn't make any difference in this context whether the video is SD or HD.
     
  11. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    I've been running v1 of Video Manager on a Windows Home Server for a while and just I installed v2 of Video Manager and ran across the following issues. I think most of these have already been covered:

    1) v2 dependancy on windows extensions for Python. I'm running python 2.6 and and v2 errorred out on the import of win32file. Fixed by installing win32 extensions for python.

    2) Config file defaults not excepted. Had to enter values in the config file for various options. For example, had to changed
    descsize= to descsize=20
    infolabelpercent= to infolabelpercent=30
    inforightmargin= to inforightmargin=20
    thumbjustify= to thumbjustify=left

    3) Caching performance on startup. Caching took a long time and once the Tivo dropped back to live TV before caching was finished so when I went back in the app had exited so I had to re-cache again. I need to spend more time playing here to find the right balance for my system.

    Edit: After spending more time, dynamic caching performance on start-up is unusuable in my configuration. Had to switch to static caching and a scheduled task to run buildcache.py on a daily basis.
     
  12. cweb

    cweb New Member

    106
    0
    May 29, 2004
    Can I get some clarification on what is the difference between vidmgr virtual shares and the shares you can create through pytivo (which then are reflected in vidmgr)?
     
  13. Squirl1899

    Squirl1899 New Member

    15
    0
    Jun 4, 2010
    Is there a way to build the Thumbnail cache without having to click on each individual movie? My thumbnails are created with Thumbgen and are about 1MB a piece so it takes a long time to load each one nd I have over 1,500 movies with thumbnails.

    I have tried the "BuildCache.py" but that doesn't seem to build the thumbnails, just the shares I have in my pyTivo.conf. I also tried "ThumbCache.py" but that didn't seem to do anything. any help would be greatly appreciated.
     
  14. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    Virtual shares allow you to create different views into your archived media. You can create additional logical groupings on values in the metadata. For instance you could create a virtual share on the genre science-fiction, or on the director Alfred Hitchcock. Lots of flexibility to access your archived media in different ways if you choose.
     
  15. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    I suggest you take a batch photo editor such as ReaConverter Lite and use it to convert all those thumbnails to .jpg files of under 100K each. You can also re-size them, while you're at it.
     
  16. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    To expand on that a bit, vidmgr takes all the metafiles for all the videos in all the real video and DVD shares specified in the pyTivo configuration file and combines them into a single database. From that database, then, one can create individual objects that sort and / or filter the database in unique ways, based mostly upon the contents of the metafiles. One can sort / group based on pre-defined meta-tags, or one can create one's own. For example, I insert into every metafile a tag that is equal to the first character in the file name after excluding leading articles. Thus, the metavalue for that tag for the film The 39 Steps is simply the number "3". I then collect all numeric tags into a group named "[0-9]", while all the remaining videos are sorted into groups labeled, "A", "B", "C", etc., representing the first letter of the file name. IOW, I have one group for movies starting with a number, another for those starting with "A", another for those starting with "B", etc.
     
  17. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    Yeah, I ran into that one, too. It's easily fixed.

    It's probably unusable on just about any Windows system with any significant number of videos. The routine jbernardis had to use to identify multiple symlinks to the same source file on a Windows system as not being unique takes a lot of CPU resources. Linux and Mac systems take a small fraction of the time - about 5 seconds for nearly 2000 videos, here. Even so, I still run a Cron job every hour or so that re-builds the cache.
     
  18. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    It seems like the default path is the uncommon configuration case on Windows. In my opinion, most Windows users have no idea how to create a symlink. Perhaps a config option whether your windows systems contains symlinks or not would increase usability.

    Also, first timers would benefit by either having the distribution config file have the default values prepopulated or having better error recovery in the program.
     
  19. lrhorer

    lrhorer Active Member

    6,924
    0
    Aug 31, 2003
    San...
    It's hard to imagine one that doesn't. Right click on the source, drag it to the new location, and select <Create Shortcut>. If anyone doesn't know, it's certainly not hard to learn.

    Ummm. I have no idea how he coded the routine. I've only taken the very briefest peek at the code. The notion leaves a bit of a sour taste in my mouth. OTOH, I'm not running Windows, so it ultimately doesn't impact me in any case.

    For that, you'll need to talk to jbernardis.
     
  20. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    Shortcuts are not the same as symlinks, but that's a different discussion for another thread.
     

Share This Page