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. Mar 18, 2007 #181 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    I thought of that but they you would have multiple shares showing up at the bottom of the screen and people may not like that as much.

    Currently my thought is to select it by IP address, this would require static IPs but I think it is a doable solution.

    Very happy to hear that solved your problem.
     
  2. Mar 18, 2007 #182 of 5683
    Tegan

    Tegan New Member

    34
    0
    Jan 2, 2007
    HELP! Ok, I'm a stupid newbie. Installed Python. Installed PyTivo according to the directions on the site. I tried to run it, and got this:

    C:\Program Files\pyTivo>pyTivoService.py
    Traceback (most recent call last):
    File "C:\Program Files\pyTivo\pyTivoService.py", line 2, in <module>
    import win32serviceutil
    ImportError: No module named win32serviceutil

    Clearly I've missed a step or something. Help?
     
  3. Mar 18, 2007 #183 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    16
    Jul 6, 2006
    Near...
    Looks like you're trying to run it as a service. I've never done that but I know you have to download and install pyWin32 (assuming you're on Windows OS -- you didn't say). See this post for details on this download.

    I would suggest you try running it in command line mode by just double-clicking pyTivo.py. Get it running good that way before making it a service.

    Not sure what "directions on the site" you used, but be sure to check out the new pyTivo Wiki. Unfortunately I just checked it and couldn't find the deal about needing pyWin32 to run as a service -- I'm sure this will be corrected soon! (Or maybe I just missed it :rolleyes: )
     
  4. Mar 18, 2007 #184 of 5683
    Tegan

    Tegan New Member

    34
    0
    Jan 2, 2007
    C:\Program Files\pyTivo>pyTivo.py
    Traceback (most recent call last):
    File "C:\Program Files\pyTivo\pyTivo.py", line 10, in <module>
    httpd = httpserver.TivoHTTPServer(('', int(port)), httpserver.TivoHTTPHandler)
    File "C:\Program Files\pyTivo\httpserver.py", line 14, in __init__
    BaseHTTPServer.HTTPServer.__init__(self, server_address, RequestHandlerClass)
    File "C:\Program Files\python25\lib\SocketServer.py", line 330, in __init__
    self.server_bind()
    File "C:\Program Files\python25\lib\BaseHTTPServer.py", line 101, in server_bind
    SocketServer.TCPServer.server_bind(self)
    File "C:\Program Files\python25\lib\SocketServer.py", line 341, in server_bind
    self.socket.bind(self.server_address)
    File "<string>", line 1, in bind
    socket.error: (10013, 'Permission denied')
     
  5. Mar 18, 2007 #185 of 5683
    dlfl

    dlfl Cranky old novice

    6,996
    16
    Jul 6, 2006
    Near...
    I'm sure someone more expert than me will jump in here soon but I'm pretty certain this means you failed to make a network connection to your TiVo. Do you have TiVo Desktop installed? If so does it work?

    Try to ping your Tivo:
    1. Get the IP address for your tivo: Settings->Phone & Network
    2. Open a Command Prompt Window and enter "ping <Tivo IP #>"

    Yous should see something like this:

    Code:
    C:\Documents and Settings\Dave>ping 192.168.0.153
    
    Pinging 192.168.0.153 with 32 bytes of data:
    
    Reply from 192.168.0.153: bytes=32 time=3ms TTL=64
    Reply from 192.168.0.153: bytes=32 time=1ms TTL=64
    Reply from 192.168.0.153: bytes=32 time=1ms TTL=64
    Reply from 192.168.0.153: bytes=32 time=1ms TTL=64
    
    Ping statistics for 192.168.0.153:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 3ms, Average = 1ms
    If you don't get the replies, you are not able to reach the Tivo via your network. This could be due to a firewall (e.g. Windows firewall) on your PC. Try temporarily disabling your firewall (OR) open up ports 9032 and 9033 on whatever firewall you have (at least one of these is used by pyTivo).

    Another way to test network connection to a TiVo is via the http interface which will display the now playing list in your browser, see this post for details.

    Do you have "Allow Transfers" checked in the DVR Preferences section of your on-line TiVo account management? Note it can take hours after this is checked for it to be pushed into your TiVo from their network.
     
  6. Mar 18, 2007 #186 of 5683
    dlan1000

    dlan1000 New Member

    2
    0
    Mar 14, 2007
    KRKeegan,

    yes, I was referring to subtitles in a separate .srt file.

    Great job on the new Wiki you started on armooo's site btw... should I assume that discussions should be migrated to there?
     
  7. Mar 18, 2007 #187 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    I will do my best to help you:
    1. Yes you should run pyTivo.py alone first and make sure everything works before trying to install it as a service. Here you can find instructions for installing pyTivo. If you want to install as a service the instructions are at the bottom. I added the note that this requires pywin32.

    2. A search of your socket area gives us this reponse from microsoft:

    Code:
    WSAEACCES
    10013 
    Permission denied. 
    An attempt was made to access a socket in a way forbidden by its access permissions. An example is using a broadcast address for sendto without broadcast permission being set using setsockopt(SO_BROADCAST). 
    Another possible reason for the WSAEACCES error is that when the bind function is called (on Windows NT 4 SP4 or later), another application, service, or kernel mode driver is bound to the same address with exclusive access. Such exclusive access is a new feature of Windows NT 4 SP4 and later, and is implemented by using the SO_EXCLUSIVEADDRUSE option.
    What it looks like this error means is that pyTivo.py cannot bind to the socket 9032. I don't know what is causing this but I have some suggestions.
    1. If you are running something that uses socket 9032 such as TivodotNet or TiVo desktop?? Try closing these first and try again.
    2. Maybe your firewall is blocking pyTivo.py from using this port?? Try opening port 9032 in your firewall.
     
  8. Mar 18, 2007 #188 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    No you can keep discussions here. In terms of bugs or feature requests you can add them as a new ticket. Which I already did for subtitles. But this is still a good place to discuss pyTivo in general.
     
  9. Mar 19, 2007 #189 of 5683
    armooo

    armooo pyTivo Developer

    81
    0
    Feb 1, 2003
    I am going to be making pyTivo auto select 16:9 or 4:3 based on the tivo making the request. I am going to do this by making a blacklist of tivo models that do not honor the aspect ratio set in the mpeg. 16:9 files will be a better quality even on a 4:3 tv because we will be wasting less of the resolution encoding black bars.

    I am going to need people to report if 16:9 mode works on there tivo and the first 3 digits of the tivo's service number.

    I have 2 240's and they both can play back 16:9 files with out any problems.
     
  10. Mar 19, 2007 #190 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    To clarify, this means 16:9 videos play fine on your TV if you have 4:3 mode selected in your TiVo settings.

    Very cool I like the idea. Sabu since I know it doesn't work for you be sure to tell us the first three of your TSN. I think someone said their DT tivo didn't work either.

    Mine is 230 and 16:9 works great.
     
  11. Mar 20, 2007 #191 of 5683
    A@ron

    A@ron New Member

    113
    0
    Jul 18, 2003
    Got the version of 173 working on Mac OS 10.4.9 with python 2.5 installed. Let me know if anyone wants my compile of ffmpeg which did it. I built it from source with as many libraries as I could compile. I could also make a preference pane for pyTivo like I made for Tivo.Net if there is an interest in it.
     
  12. Mar 20, 2007 #192 of 5683
    gonzotek

    gonzotek tivo_xml developer

    2,401
    3
    Sep 24, 2004
    Outside...
    You may be interested in this technical note from Justin Thyme:
    http://www.tivocommunity.com/tivo-vb/showthread.php?p=3199608&&#post3199608

    He started a table of TiVo model numbers and how they handle 16:9/4:3 issues. It's incomplete, but lists the 240, 540 and a Toshiba RS-TX.
     
  13. Mar 20, 2007 #193 of 5683
    CheezWiz

    CheezWiz ReplayTV->S3 Tivo

    211
    0
    Dec 29, 2006
    Middle...
    How will this change effect Tivos who do not handle when in 4:3, but in 16:9 connected to a 16:9 TV look great. I guess I am worried that this will add black bars to the sides or the top and bottom, or require the TV to be run in 4:3 stretched mode?

    I think it would be nice to be able to specify a full TSN that would get the 4:3 setting, but allow others to remain at 16:9.. Or deoes that even matter?
     
  14. Mar 20, 2007 #194 of 5683
    sabu

    sabu New Member

    17
    0
    Jan 29, 2002
    Harrisburg, PA
    TSN starting with 649 that does not play 16:9 videos with 4:3 mode selected.
     
  15. Mar 20, 2007 #195 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    Well I think, armooo is working on this so I can't be sure, pyTivo will still be able to handle this. I am a big fan of flow charts so here is what I think it will do with a 16:9 video on the pc:

    1. If the TiVo is capable of playing nice with 16:9 videos even when the TiVo is in 4:3 mode, then just send the file as 16:9.
    2. If the TiVo is a listed black list device then send as 4:3, UNLESS
    3. Some override setting has been set in the configuration file then send as 16:9

    Again this override will probably be global, to all TiVos, in the first iteration. But this can be a per TiVo setting in the future.
     
  16. Mar 20, 2007 #196 of 5683
    MT-Hand

    MT-Hand New Member

    26
    0
    Mar 5, 2005
    A@ron,

    Yes Please! I have your TiVo.Net Preferance Pane running on my 20" iMac G5 (OS X 10.4.9). I too had installed the latest version of Python and pyTivo, and saw the same results that you had. I would be very interested in trying pyTivo for comparison (especially if it had a slick Preferance Pane front-end like the one you did for TiVo.Net!).

    Todd
     
  17. Mar 20, 2007 #197 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    So far I understand the requirements of installing on OS X to be:
    1. python 2.5
    2. a different compiled version of ffmpeg?

    If you could post some note here I am sure all OSX users would appreciate it. And if you want you can send me the compiled ffmpeg in some format that won't corrupt it, "zip" maybe?? I dunno.
     
  18. Mar 20, 2007 #198 of 5683
    panacea

    panacea New Member

    2
    0
    Jan 31, 2007
    The updates in the 178 build fixed my aspect ratio issue (16:9 videos not playing correctly on a Tivo set to 4:3). Apologies for my inarticulate description, it was exactly as inthewoods said, "the screen gets whacked like every other scanline is shifted and the picture ends up in 3 interlaced sections".

    If it helps, the first 3 of my TSN is 540.

    You guys rock!
     
  19. Mar 20, 2007 #199 of 5683
    inthewoods

    inthewoods New Member

    12
    1
    Feb 21, 2005
    This patch has a few edits from the baseline 178:
    • Configuration to specify if you want 720, 704 or 544 pixel output
    • Enhanced the beacon code to take a list of broadcast addresses to work around problems with multi-interface (multi-home) machines
    • Configuration for Audio and Video bitrate in case you are using a newer version of ffmpeg that doesn't like 192 and 4096 but needs 192K and 4096K, respectively
    • Aspect code works with variable output resolution (WARNING: it has only been tested going to 4:3 output though... so I might've messed up for screen size != 720)
    • Rewrote 4:3 padding algorithm to assume square pixels in the source, which is usually safe for files downloaded from the internet. I get better results on my 540 Tivo when viewing widescreen source on my 4:3 TV with this algorithm.
    • Updated config file to include all the new options along with documentation
     

    Attached Files:

  20. Mar 21, 2007 #200 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    Thank you for the updates I will look them over. Already I have a few issues.
    1. you can safely add 'K' to the bitrates on old versions of ffmpeg and is doesnt pose a harm. I know I am missing it on the audio i forgots to fix that part.
    2. "Rewrote code to assume square pixels in 4:3" hmm the original code did this. You should see a .888 multiplier or its inverse. This is because TV's while having 4:3 frame aspect only have 720x480 lines or 3:2. Thus when determining the aspect or padding, you have to remember that a line in the output is not equal to a line in the input.

    Edit Ok further review. You appear to come to the same conlusion your stretch_ratio factor is equal to .8888 under the default setting. But you are right if we start allowing other dimensions we will need this change. Give me a day or two to put this in a branch and check it out there are a lot of changes here.
     

Share This Page