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

VidMGR

Discussion in 'Developers Corner' started by Soapm, Jan 8, 2012.

  1. larrs

    larrs Movie Fan-Addict

    1,011
    0
    May 2, 2005
    DFW
    Crap, I just noticed that. Maybe I will change them this weekend. Is there a quick rundown of the other features?
     
  2. johnh123

    johnh123 New Member

    429
    0
    Dec 7, 2000
    Over there
    OK, i'm trying to install this on a synology nas. I got pyhme up and running, but get this after I installed vidmgr:


    DiskStation> python /usr/local/pyhme/start.py
    HME Server for Python 0.19
    Skipping: .git - Empty module name
    Skipping: vidmgr - No module named Image
    Skipping: picture - No module named Image
    Wed Apr 18 15:03:37 2012 Server Starts
    Registering: animate
    Registering: clock
    Registering: effects
    Registering: fontinfo
    Registering: hello
    Registering: test
    Registering: tictactoe
    Registering: transition

    any thoughts as to what I am doing wrong?
     
  3. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    I believe you need to install the Python Imaging Library (PIL).
     
  4. johnh123

    johnh123 New Member

    429
    0
    Dec 7, 2000
    Over there
    Great, thanks, that seems to work.
     
  5. johnh123

    johnh123 New Member

    429
    0
    Dec 7, 2000
    Over there
    OK, now I get this:


    192.168.1.125:41301 - - [18/Apr/2012 22:23:16] Starting HME: vidmgr
    Vidmgr thread entering startup
    ----------------------------------------
    Exception happened during processing of request from ('192.168.1.125', 41301)
    Traceback (most recent call last):
    File "/opt/lib/python2.5/SocketServer.py", line 464, in process_request_thread
    self.finish_request(request, client_address)
    File "/opt/lib/python2.5/SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File "start.py", line 141, in __init__
    client_address, server)
    File "/opt/lib/python2.5/SocketServer.py", line 522, in __init__
    self.handle()
    File "/opt/lib/python2.5/BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
    File "/opt/lib/python2.5/BaseHTTPServer.py", line 310, in handle_one_request
    method()
    File "start.py", line 232, in do_GET
    self._page(True)
    File "start.py", line 186, in _page
    appinst.mainloop()
    File "/usr/local/pyhme/hme.py", line 1134, in mainloop
    self.startup()
    File "/usr/local/pyhme/vidmgr/__init__.py", line 108, in startup
    raise ConfigError("No Tivos found - exiting")
    ConfigError: No Tivos found - exiting

    the pyhme config.ini is like so:

    [hmeserver]
    apps=vidmgr

    [vidmgr]
    exts=.mpg .mp4 .avi .wmv .m4v .mkv
    descsize=16

    [tivos]
    tivo1.name=Basement
    tivo1.tsn=xxx-xxxx-xxxx-xxxx

    [pytivos]
    pytivo1.config=/usr/local/pyTivo/pyTivo.conf
    pytivo1.ip=192.168.1.113
    pytivo1.port=9032

    what next?
     
  6. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    It looks like you've got the ini files all combined somehow. The config.ini file for HME for Python should only contain the [hmeserver] section. The [vidmgr] and [pytivos] sections should be in the vidmgr.ini in the vidmgr folder and the [tivos] section should be in your pyTivo.conf.
     
  7. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    Well I don't know what VidMGR wants, but that wouldn't be the right format to list TiVos in pyTivo.conf.
     
  8. johnh123

    johnh123 New Member

    429
    0
    Dec 7, 2000
    Over there
    OK, configs fixed, and here we are:

    Exception happened during processing of request from ('192.168.1.125', 37346)
    Traceback (most recent call last):
    File "/opt/lib/python2.5/SocketServer.py", line 464, in process_request_thread
    self.finish_request(request, client_address)
    File "/opt/lib/python2.5/SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File "./start.py", line 141, in __init__
    client_address, server)
    File "/opt/lib/python2.5/SocketServer.py", line 522, in __init__
    self.handle()
    File "/opt/lib/python2.5/BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
    File "/opt/lib/python2.5/BaseHTTPServer.py", line 310, in handle_one_request
    method()
    File "./start.py", line 232, in do_GET
    self._page(True)
    File "./start.py", line 186, in _page
    appinst.mainloop()
    File "/usr/local/pyhme/hme.py", line 1134, in mainloop
    self.startup()
    File "/usr/local/pyhme/vidmgr/__init__.py", line 108, in startup
    raise ConfigError("No Tivos found - exiting")
    ConfigError: No Tivos found - exiting
     
  9. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Ok, I misspoke in my prior post. There should be a [tivos] section in your vidmgr.ini file (not pyTivo.conf). Sorry about that.
     
  10. larrs

    larrs Movie Fan-Addict

    1,011
    0
    May 2, 2005
    DFW
    I love vidmgr and thanks for developing it!

    I believe I have found an issue, or I am doing something wrong and need help rectifying it.

    When I access the vidmgr app on my Tivos (and I think the issue may be that I have 5 of them listed in my config file) and select the video to push, there are 4 of them listed in the display that pops up "push to xx Tivo"- to get to the 5th Tivo, I have to scroll down and that one displays. However, if I choose that 5th one to push the video to it actually selects the 4th Tivo rather than the 5th and says "queued to push to tivo 4" and pushes the video to the 4th rather than the 5th Tivo.

    If I then go back up and select the 4th tivo, it pushes to the 3rd, etc.

    I went into my config and reordered them so the 5th tivo is one we never push videos to but I wanted to let everyone know. Seems once you scroll past the 4th tivo, it gets off by one.

    If this was not the place to post this, please let me know.
     
  11. jasondeangelo

    jasondeangelo New Member

    5
    0
    Jan 23, 2007
    Hi everyone...First off, I need to thank all of you for the hard work and dedication you put into this poject. Seriously, you guys go above and beyond to make Tivo so much better! I truly can't thank you enough.

    That being said (lol)...I am having a bit of trouble with VidMGR. I can see my videos without issue, but when I click on one to initiate the transfer, it tells me that it has been sent to my DVR (basement) but never shows up in my Now Playing. I've followed all the guides and played around with the settings in the vidmgr.ini file, but no luck. I can post the file if you want.
    I've opened up the ports on the PC firewall. Checked the port number matches in the pyTivo config.ini and vidmgr.ini. I'm clearly missing something. Any help would really be appreciated.

    Thanks so much!

    Tivo: Series 3 HD
    PC: Windows 7 32bit
     
  12. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Are you able to initiate a push from the pyTivo web interface? Do you have the correct values in tivo_password and tivo_username in your pyTivo.conf file?
     
  13. jasondeangelo

    jasondeangelo New Member

    5
    0
    Jan 23, 2007
    I appreciate you getting back to me so quickly!

    I did solve this issue, but I can’t tell you exactly what it was that I did. I tried transferring it through the pytivo web interface, and it worked without issue. I did notice, as you mentioned, that I did not have my username and password set in the config. I added that, but it still did not work…even though I did restart pytivo. I let it sit for a bit, went back, restarted pytivo again, and magically I was able to transfer the video within Tivo. Again, not sure what I did, but it works. However, I have another issue now…

    While the video was transferring, I tried to play it. It gave me some sort of message that “you cannot play this until the transfer is complete, and it will take X hours, etc.”. Well, it only took 20 mins. When it was complete, I was able to play it. Isn’t the whole point of vidmgr to play while it is transferring? I’m clearly missing some sort of setting. Could this be an issue with how the file was originally transcoded? It’s an .avi.
    Also, and this is just curious to me…when I click on the “info” button of the transferred video, there is a message “Due to policy set by the copyright holder, this recording: Cannot be transferred to VCR, DVD, or any other media device. To learn more, visit tivo...” Why/how on earth does Tivo know the source of this file? It happens to be legit, but still… Is it just going by the “name” of the file/movie? Could that be the issue with not being able to stream as it copies?

    Again, thank you so much for all your help!
     
  14. jasondeangelo

    jasondeangelo New Member

    5
    0
    Jan 23, 2007
    UPDATE: Just tried another video. .MPG this time. This time I wrote down the full message: “This program is downloading. It cannot be played now because the download speed is not fast enough or not enough video has been received. Please try to play this program again after 4 hours, 5 minutes have passed.”

    The transfer is already 10 mins down, and that estimated time continues to decrease, and is obviously inaccurate.

    Thanks again, everyone!
     
  15. jasondeangelo

    jasondeangelo New Member

    5
    0
    Jan 23, 2007
    UPDATE 2: I have to apologize. The second file was a .mkv file. I just tried an .mpg and it worked! Meaning, I can play it as it copies (streams). Can you guys explain to me what this exactly means? Do I need to convert all my files to .mpg? I’m hoping not!
     
  16. windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    I've seen that message when downloading content from Amazon, but never from pyTivo. I think it has something to do with how the TiVo is calculating the transfer speed. Your .mpg file doesn't need to be transcoded so it will copy faster than the .mkv so that's probably why you're seeing that. What's your network setup like?

    As for the copyright notice, that's just the generic message TiVo puts on content that cannot be transferred (copy protection flag). It has nothing to do with the name of the file or its content, so don't worry about that. I forget the exact criteria that will cause a pyTivo-transferred video to exhibit this, but I've seen it in the past and it's not really a big deal.
     
  17. wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    No, it's not. The point of VidMGR is to initiate "pushes", a special type of transfer, from the TiVo rather than from a browser. If your goal is to watch videos while they're transferring, then you should use the standard pyTivo "pull" interface at the bottom of the Now Playing list. You don't need VidMGR for that. (Alternatively, you could use HME/VLC and/or Streambaby.)

    TiVo Inc. attaches this absurd notice to everything transferred via push, quite apart from any expressed wish of any copyright holders. The upshot of it is that you can't transfer the video back out (although you can stream it, Premiere-to-Premiere). You can, again, avoid this issue by using pull rather than push.

    No.

    Because push is based on the TiVoCast system (aka Video on Demand podcasts), which (depending on your Internet speed, etc.) can come in very slowly, TiVo decided not to allow instant playback unless the stream is coming in at a real-time playable rate -- to, I suppose, "improve the user experience", instead of presenting users with the equivalent of "buffering" messages.

    Now, in the case of a pyTivo transfer, the stream generally is coming in at an acceptable rate, but the TiVo thinks it's running slow, because pyTivo has to give the size beforehand, and when it's transcoding, it has to overestimate -- since, if it underestimated, the video would be automatically deleted once it exceeded the given size, because the TiVo didn't clear enough disk space for it.

    Certain types of files don't require transcoding: MPEG-2 program streams (as you discovered), h.264 MP4 files, and a subset of VC-1 WMV's. In this case, pyTivo can give the exact size, so you won't get the warning message, because the TiVo can see that the file is coming in as expected.

    The "download speed is not fast enough" message doesn't come up with pulls, because the TiVo knows they originate from the LAN, so it doesn't feel the need to improve the user experience. (Note that pulls can only pass MPEG-2 program streams without transcoding, but that doesn't matter for purposes of avoiding the blocking.)
     
  18. jasondeangelo

    jasondeangelo New Member

    5
    0
    Jan 23, 2007
    Thanks so much!!!! You both have been so helpful! I really apprecaite it.
    Also, again, thanks for all your hard work.
     
  19. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    To add a bit to William's post:

    1. Transcoding speed will make a big difference to how long the TiVo buffers the material. If no transcoding is done, the buffering time may be significantly decreased or eliminated. A faster processor on the server can make a significant difference if transcoding is being done.

    2. It's a trade-off between initial buffering and buffering pauses during playback. With a pull, one may immediately start playing the program, but may then experience numerous pauses during playback, especially if the video bit rate is very high or the video is 720p. OTOH, when pushing, the amount of time spent pre-buffering the video should be very similar to the amount of time spent pausing during a pull.

    3. Pushing h.264 content should eliminate any buffering. H.264 coding in a .mp4 container transfers more than 3 times faster than the same content coded as .mpg on an S3 and more than 4 times faster on a THD. I have never encountered the buffering message when pushing h.264 content.

    4. The initial buffering estimates are usually quite far off. If one waits a minute or two before attempting to play, the estimated time required to complete buffering is much more accurate and much lower than the initial estimate.
     

Share This Page