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...
    Well, OK, that's true. Windows Vista introduced an attempt at an analog to a *nix symlink, but I'm not sure whether in this context the distinction matters, or not. Whether it is a true symlink or a "shortcut", I suspect the system has to go through the same or similar gyrations in order to determine whether the link is unique, or not. I could be mistaken, of course. Perhaps jbernardis will chime in.
     
  2. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Let me look at the code to see what I can do here. If it's simple to simply turn off the logic if you do not have any links, then I will ad an option for doing so.

    My intent with the distribution file was to show you where you need to enter values, not to provide a syntax that results in the default values. I sorry that mislead everyone. You do NOT have to enter the default values - simply remove or comment out the line in the file and the default value will be used. Next distribution will have these lines commented out.
     
  3. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    OK - version 2.0d is up on git. I'm kind of eager for someone to let me know if there is an improvement under windows. Basically I added a new vidmgr.ini option - usefileid - the default value is true.
    • If you set it to false, it bypasses the logic used to determine the file's unique ID. This means that if you DO have links (hard or soft) vidmgr will treat them as two different files and they will show up twice (or more times) in the virtual shares.
    • If you set it to true, the logic of today is used, and the unique ID for each file is determined so that the duplication does not happen.

    BTW the simplest way to do this was to leave the existing routines in place and instead of returning the actual file ID, I return a sequential number - that way, each file is given a unique number and there will never be a match.

    I also editted the two dist files to comment out the lines that everyone thought was bringing in the default values.
     
  4. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    The thumbnail cache is built automatically, but it is statically sized at 100 entries. You CAN increase this by playing with the value of thumbcachesize in Config.py, but I would tend to agree with lrhorer. 1MB is a VERY large thumbnail. I have about 600 videos, and for the most part my thumbnails are images of the DVD case. They range in size from 30K to 70K and they look fine. They also load very fast even if they are not in the cache.
     
  5. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    It took about 2 minutes to load with dynamic cache the first time on my system with about 10,000 media files. Subsequent loads took about 45 seconds. That's better than before where it would drop back to live video before completing but it is still slow for regular usage.

    With a static cache, vidmgr loads in 5 seconds on my system.

    One potential problem that could happen by setting usefileid=false would be if someone had nested shares. Not quite the same as symlinks, but could cause multiple entries per file in virtual shares.

    Thanks for putting this in so quickly, however I think I'm going to revert back to static cache with a daily run of buildcache.py.

    Love your program, thanks for making it available to us.
     
  6. Squirl1899

    Squirl1899 New Member

    15
    0
    Jun 4, 2010
    Well, I was so frustrated (with TiVo, not Video Manager) that I went through and opend up EVERY port that TiVo had on their website. I have 2 routers (Netgear WNDR3700 for N capabilities connected to my Verizion FIOS MI424WR) and opened up all the ports on BOTH routers, including the pyTiVo and Video Manager ports and did the same on my Windows firewall. After about an hour of entering ports EVERYTHING is BLAZING fast, even with my 1MB thumbnails! I can't believe it but there is ZERO lag when I start Video Manager and when i go from one video to another the thumbnail pops up instantaneously.

    Even though my TiVo always said that the port configuration passed I always had issues with the HD menus, the top banner going blank in TiVo Central and when i would run pyTiVo, Stream Baby or Video Manager, the whole TiVo tended to freeze up and get the green circle of death. I have no idea which port on which router or windows firewall did the trick but something fixed it. I guess time will tell if it fixed my actual TiVo HD issues that everyone has been havning but at least I can now browse my WONDERFUL and GORGEOUS Video Manager Thumbnails with ease.
     

    Attached Files:

  7. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Great looking thumbnails - just as long as everyone realizes that is NOT what vidmgr looks like :)

    I'd be interested to see a total screen shot that shows your image in the lower right.
     
  8. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    One thing I've learned in 30+ years of software development - software is never finished.

    With that in mind, I have just posted version 2.0e on GIT. There was a nasty bug when parsing virtual share options - once it found one option, it stopped looking for any others. So if you tried to alter more than one option, only one of them would have been used. I'm actually surprised nobody reported this before.

    I couldn't be satisfied with just a bug fix. There are two new features as well:
    1. I added the shares= option to the vidmgi.ini to limit virtual shares to a list of pytivo shares, and
    2. I added a new virtual share type - alpha=tagname - that produces a folder for every letter (or digit) that the named metadata item begins with

    SO for example, the following lines in the ini file:
    Code:
    [alphabetical movies]
    alpha=title
    shares=My Movies
    
    will produce a virtual share of movies (from the "My Movies" share) that are arranged into seperate folders based on the starting letter of the title. So there will be an "A" folder, a "B" folder, etc. Digits are also used, and then a catchall <other> folder. If there are no titles for a given letter, that folder does not appear.
     
  9. Nov 5, 2011 #469 of 735
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Have latest version 2, just downloaded yesterday and installed today.

    OK, this sounds promising and since I'm already running Python 2.6.5(64bit) on Windows7-64 along with the latest pyTiVo, I thought i'd give it a try.

    After spending most of the day figuring out what pyHME was, installing it, figuring out where to put vidmgr, getting and installing WIN-64 PIL(64bit) I'm now stuck.

    Here's what I get launcing pyHME from a WIN7 commandline

    Code:
    C:\pyHME>C:\Python26\python.exe "C:\PyHME\start.py"
    HME Server for Python 0.19
    [COLOR="Red"]Skipping: vidmgr - No module named win32file <<==??[/COLOR]
    Sat Nov 05 17:16:21 2011 Server Starts
    Registering: animate
    Registering: clock
    Registering: effects
    Registering: fontinfo
    Registering: hello
    Registering: picture
    Registering: test
    Registering: tictactoe
    Registering: transition
    
    Anyone else using it on WIN64 w/64 bit Python and 64bit PIL?
    If so, what's the magic bullet?
     
  10. Nov 5, 2011 #470 of 735
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Apparently this win32file thing has been an issue for some. I didn't anticipate this since I didn't explicitly install this module on my PC - it came with python 2.7.

    It's available as a separate download - just google it. The question I have is whether it is compatible with 64 bit python - I am using 32 bit. If someone could chime is as to whether this module works in this environment, I'd appreciate it.
     
  11. Nov 5, 2011 #471 of 735
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    I just uninstalled PIL 1.1.7 64 bit for Python 2.6 and Python 2.6.5 64 bit for Windows. I then installed Python 2.7.2 32 bit and PIL 1.1.7 32 bit for Python 2.7.

    Getting same error.

    What is available as a separate download?
     
  12. Nov 5, 2011 #472 of 735
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    win32file.

    I'm not sure where it is because like I said it came with my 2.7 install (I have activestate python), but others in this thread have mentioned downloading it. Perhaps if they see this, they can post a download link.
     
  13. Nov 5, 2011 #473 of 735
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    What is "activestate python"? and where would I get it?
     
  14. Nov 5, 2011 #474 of 735
    jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    Active State is a company that packages python and other languages for business use. They charge for their normal products, but also provide free versions for personal use. I originally started using their products when I was more into perl, and have been happy with them.

    here is the link to their site to obtain python.
     
  15. Nov 5, 2011 #475 of 735
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Found the Win32 extensions and have it working with all 32 bit software. Since I have Win7-64 bit I'm going to try duplicating my success with all 64 bit versions of Python 2.6.5, PIL 1.1.7 and pywin32 build 216. Thanks for the quick responses :)
     
  16. Nov 6, 2011 #476 of 735
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    Working! Uninstalled, then reinstalled all 64 bit - Python 2.7.2, PIL 1.1.7 and pywin32 build 216.

    How can I get the filename to display in the info screen (when I press the remote info button). It appears I have recordings of shows where the metadata says they're an episode Title that they aren't and I need a way to identify what files they are. Would be nice to get filename.ext displayed. I tried editing the vidmgr.ini to include the following, but it didn't display the filename
    Code:
    # the next 4 options specify format information for the info screen that pops up
    # when you press the info button. 
    # specify a list of metadata tags for each.
    #       default: metaignore=isEpisode isEpisodic
    #                metafirst=title seriesTitle episodeTitle description
    #                metaspacebefore=
    #                metaspaceafter=
    #
    # metaignore=
    metafirst=[B][COLOR="Red"]file[/COLOR][/B] title seriesTitle episodeTitle description
    # metaspacebefore=
    # metaspaceafter=
    Also want to add that it appears it isn't parsing the pytivo.conf file correctly.
    It errors out stating there is no port= line in my pytivo.conf, but there is.
    Code:
    port = 9032
    I had to add this line in vidmgr.ini to stop the error
    Code:
    pytivo1.port=9032
     
  17. Nov 6, 2011 #477 of 735
    dlfl

    dlfl Cranky old novice

    6,998
    18
    Jul 6, 2006
    Near...
    What significant advantage do you see (or expect) from running 64 bit vs. 32 bit ?
     
  18. Nov 6, 2011 #478 of 735
    bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    None. Other than it's easier to remember always run 64 bit unless it's not available or causes incompatability issues. I already had 64 bit Python 2.6.5 and had been using it with pyTivo. In order to run vidmgr I had to get PIL and the win32 extensions. They all have to be matched (all 32 bit or all 64 bit). I decided since I have a 64 bit processor and a 64 bit OS, I'd stick with 64 bit Python and extensions since they're available.
     
  19. Nov 7, 2011 #479 of 735
    dlfl

    dlfl Cranky old novice

    6,998
    18
    Jul 6, 2006
    Near...
    That's reasonable. I follow the opposite policy (always install 32-bit versions). It's simpler and I've yet to see an application that had significant performance advantages using an (available) 64-bit version. Transcoding seems like it would benefit since it is compute-intensive, but I don't think the 64-bit versions of the transcoding software I use are available in general.
     
  20. Nov 7, 2011 #480 of 735
    txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    You can get 64-bit versions of x264.exe and ffmpeg.exe. Not sure what you use to transcode (besides VRD, if anything). I have done very little straight transcoding (always process with avisynth), but with 64-bit avisynth and 64-bit x264, I could see ~10% higher conversion speeds. 64-bit avisynth wasn't particularly stable though, so I reverted back to 32-bit.
     

Share This Page