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

pyTivo - Transcoding server

Discussion in 'TiVo Home Media Features & TiVoToGo' started by armooo, Nov 25, 2006.

  1. Jun 6, 2014 #4721 of 5682
    lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    Attempt to push to remote TiVo fails with the following:

    Code:
    ERROR:pyTivo:Exception during request from ('127.0.0.1', 52512)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Pusher pyTivo\httpserver.py", line 91, in __init__
        client_address, server)
      File "C:\Python27\lib\SocketServer.py", line 649, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 342, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
        method()
      File "C:\Pusher pyTivo\httpserver.py", line 145, in do_POST
        self.handle_query(query, tsn)
      File "C:\Pusher pyTivo\httpserver.py", line 176, in handle_query
        if self.do_command(query, command, basepath, tsn):
      File "C:\Pusher pyTivo\httpserver.py", line 155, in do_command
        method(self, query)
      File "C:\Pusher pyTivo\plugins\video\video.py", line 144, in Push
        ip = config.get_ip(tsn)
      File "C:\Pusher pyTivo\config.py", line 89, in get_ip
        dest_ip = tivos[tsn]['address']
    KeyError: 'address'
    ERROR:pyTivo:Exception during request from ('127.0.0.1', 52517)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Pusher pyTivo\httpserver.py", line 91, in __init__
        client_address, server)
      File "C:\Python27\lib\SocketServer.py", line 649, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
        method()
      File "C:\Pusher pyTivo\httpserver.py", line 145, in do_POST
        self.handle_query(query, tsn)
      File "C:\Pusher pyTivo\httpserver.py", line 176, in handle_query
        if self.do_command(query, command, basepath, tsn):
      File "C:\Pusher pyTivo\httpserver.py", line 155, in do_command
        method(self, query)
      File "C:\Pusher pyTivo\plugins\video\video.py", line 144, in Push
        ip = config.get_ip(tsn)
      File "C:\Pusher pyTivo\config.py", line 89, in get_ip
        dest_ip = tivos[tsn]['address']
    KeyError: 'address'
     
  2. Jun 6, 2014 #4722 of 5682
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    OK, how about now?
     
  3. Jun 6, 2014 #4723 of 5682
    lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    That problem is fixed but while testing I encountered another problem that seems to have been around for at least a few months.

    If zeroconf is disabled either explicitly or implicitly, none of the TiVos shows up in the pull from list and any attempt to transfer a recording to the TiVo results in the following:
    Edit: problem actually occurs unless zeroconf is set to "Auto".

    Via pull:

    Code:
    ERROR:pyTivo:Exception during request from ('192.168.1.107', 50182)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Pusher pyTivo\httpserver.py", line 91, in __init__
        client_address, server)
      File "C:\Python27\lib\SocketServer.py", line 649, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
        method()
      File "C:\Pusher pyTivo\httpserver.py", line 128, in do_GET
        self.handle_file(query, splitpath)
      File "C:\Pusher pyTivo\httpserver.py", line 245, in handle_file
        plugin.send_file(self, path, query)
      File "C:\Pusher pyTivo\plugins\video\video.py", line 193, in send_file
        tivo_name = config.tivos[tsn].get('name', tsn)
    KeyError: '<redacted>'

    via push:

    Code:
    ERROR:pyTivo:Exception during request from ('127.0.0.1', 56632)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Pusher pyTivo\httpserver.py", line 91, in __init__
        client_address, server)
      File "C:\Python27\lib\SocketServer.py", line 649, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 342, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
        method()
      File "C:\Pusher pyTivo\httpserver.py", line 145, in do_POST
        self.handle_query(query, tsn)
      File "C:\Pusher pyTivo\httpserver.py", line 176, in handle_query
        if self.do_command(query, command, basepath, tsn):
      File "C:\Pusher pyTivo\httpserver.py", line 155, in do_command
        method(self, query)
      File "C:\Pusher pyTivo\plugins\video\video.py", line 141, in Push
        tivo_name = config.tivos[tsn].get('name', tsn)
    KeyError: '<redacted>'
    ERROR:pyTivo:Exception during request from ('127.0.0.1', 56635)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Pusher pyTivo\httpserver.py", line 91, in __init__
        client_address, server)
      File "C:\Python27\lib\SocketServer.py", line 649, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 340, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 328, in handle_one_request
        method()
      File "C:\Pusher pyTivo\httpserver.py", line 145, in do_POST
        self.handle_query(query, tsn)
      File "C:\Pusher pyTivo\httpserver.py", line 176, in handle_query
        if self.do_command(query, command, basepath, tsn):
      File "C:\Pusher pyTivo\httpserver.py", line 155, in do_command
        method(self, query)
      File "C:\Pusher pyTivo\plugins\video\video.py", line 141, in Push
        tivo_name = config.tivos[tsn].get('name', tsn)
    KeyError: '<redacted>'

    One other thing I noticed which has been around longer and may be WAD:

    If I push an h.264 1080P, it gets re-muxed to a temp file and then the temp file is transferred. If I pull the same file, it gets re-muxed on the fly.
     
  4. Jun 6, 2014 #4724 of 5682
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    No, that hasn't been a few months -- it's the same new behavior I just described here: http://www.tivocommunity.com/tivo-vb/showthread.php?p=10127166#post10127166

    In your case, the problem arises because you have empty "_tivo_" sections declared, with no names or addresses (or anything besides the TSN). I don't see the purpose of that (besides the externals), but since it did work before, I'll try to come up with a non-kludgy way to support it.

    Those should work now.

    Yes. Pushes use MP4s, which can't be created in a single pass. Pulls use transport streams, which don't have that problem.
     
  5. Jun 6, 2014 #4725 of 5682
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    OK, I think I've got it now. This should be minimally disruptive to existing configs while still removing as many bogus Stream entries as possible.
     
  6. Jun 6, 2014 #4726 of 5682
    lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    Did some more testing. Removed one of the emoty "_tivo_" sections, and added "shares = Nimitz Video" to the other one and restarted pyTiVo. There were no TiVos in the "Pull From Tivos" list and the only ones in the "Send to Tivo" list were the two that were explicitly defined. This seems to be the case whenever zeroconf is disabled.

    It does.


    Based on what VideoReDo is reporting for the source, I assume that it is the audio that is forcing the re-mux.

    VideoReDo info:
    Code:
     File:                                     Name : D:\Video\Wreck-It Ralph\Wreck It Ralph.mp4
                                               Size : 1.772 GB
                                           Duration : 01:41:13.10
                                           Mux type : MP4
     Video:                                Encoding : H.264
                                      VideoStreamID : x201
                                         Frame rate : 23.98 fps
                                      Encoding size : 1920 x 808
                                       Aspect ratio : 2.38:1
                                    Header bit rate : 20.000 Mbps
                                         VBV buffer : 380 KBytes
                                            Profile : High/4.0
                                        Progressive :  Progressive
                                             Chroma : 4:2:0
                                       Entropy mode : CABAC
                                           Bit rate : 2.241 Mbps
                                         Captioning : None found
     Audio Stream: 1 (Primary)                Codec : AAC
                                             Format : ADTS
                                           Channels : 6.0
                                           Language : eng
                                                PID : x202
                                      PES Stream Id : xC0
                                      Sampling rate : 48000
     Audio Stream: 2                          Codec : AAC
                                             Format : ADTS
                                           Channels : 2.0
                                           Language : eng
                                                PID : x203
                                      PES Stream Id : xC0
                                      Sampling rate : 48000
    

    edit: Started this post a while back and posted it before I saw your most recent post.
     
  7. Jun 6, 2014 #4727 of 5682
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    Yes, that's how it's supposed to be now.
     
  8. Jun 6, 2014 #4728 of 5682
    lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    Ok. Thanks for making these changes so quickly.
     
  9. Jun 8, 2014 #4729 of 5682
    caddyroger

    caddyroger New Member

    1,730
    0
    Mar 14, 2005
    Some where...
    Will Pytivo push 264 mp4 programs to a Roamio pro? The Pytivo is the wmcbrine fork 2009 version with the updates probably dating to the early 2011.
     
  10. Jun 8, 2014 #4730 of 5682
    wmcbrine

    wmcbrine Ziphead

    10,363
    22
    Aug 2, 2003
    The current version will certainly do that. I'm not going to look up what it did in 2011. You should use current code.
     
  11. Jun 9, 2014 #4731 of 5682
    caddyroger

    caddyroger New Member

    1,730
    0
    Mar 14, 2005
    Some where...
    I would not know how to start to install using the new codes.
     
  12. Jun 9, 2014 #4732 of 5682
    lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    Stop pytivo. Download zip file from here.Unzip. Copy everything in pytivo-master into whatever directory you currently have pyTivo installed. Restart pyTivo.
     
  13. Jun 9, 2014 #4733 of 5682
    bareyb

    bareyb Under Maintenance TCF Club

    25,940
    5
    Dec 1, 2000
    Silicon Valley
  14. Jun 9, 2014 #4734 of 5682
    caddyroger

    caddyroger New Member

    1,730
    0
    Mar 14, 2005
    Some where...
    Ok I went to https://github.com/wmcbrine/pytivo Downloaded the zip file on the right hand side. It was the master. Copied the the files to my pytivo folder and restarted the computer but I get this when open my videos.

    This page can’t be displayed

    •Make sure the web address http://localhost:9032 is correct.
    •Look for the page with your search engine.
    •Refresh the page in a few minutes

    This this the version of Pytivo I am using pytivo-Wmcbrine-2009.13.09-RC1
     
  15. lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    this sounds like you were trying to access pyTivo via a browser and that it is not running.

    What platform is this (windows, mac, linux)? How are you starting pyTivo?
     
  16. caddyroger

    caddyroger New Member

    1,730
    0
    Mar 14, 2005
    Some where...
    I am running Windows 8.1 pro. The browser is IE11. Starting the way pytivo-Wmcbrine-2009.13.09-RC1. I believe it is localhost1032.
     
  17. lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    You do not start it with "localhost:9032". Did someone else set this up for you initially?

    Try this. Open up a command prompt. cd to the pyTivo directory. Enter "pyTivo.py". Post the output here. (to copy text from the command prompt window to the clipboard, left mouse on the upper left corner, select edit->mark. Click & drag to highlight the text, then edit->copy)
     
  18. caddyroger

    caddyroger New Member

    1,730
    0
    Mar 14, 2005
    Some where...
    Here is a screen shot of the Command prompt. I installed the program. After installing and in the pytivo folder there is a file called internet short cut. I just sent a copy to my desktop. I just click it and it takes to the web configuration with my now playing list.
     

    Attached Files:

  19. HerronScott

    HerronScott Active Member

    2,748
    19
    Jan 1, 2002
    Staunton, VA
    Caddy,

    You did not cd to the pyTivo folder before running pyTivo.py in your screenshot.

    Scott
     
  20. lpwcomp

    lpwcomp Active Member

    8,075
    2
    May 6, 2002
    John's...
    All your internet shortcut does is bring up the web interface that enables you to change settings and initiate pulls from and pushes to your TiVos. It does not start pyTivo. pyTivo must be running in order for it to work. That is why you are getting the message "This page can’t be displayed". Your browser is trying to communicate with an app running on the local computer (localhost) communicating on port 9032, which is the port that oyTivo uses by default.

    +1.
     

Share This Page