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. reneg

    reneg Member

    699
    0
    Jun 19, 2002
    Try changing ffmpeg=C:\Documents and Settings\Mike\My Documents\pyTivo
    to ffmpeg=C:\Documents and Settings\Mike\My Documents\pyTivo\plugins\video\ffmpeg_mp2.exe

    I don't think setting the beacon to the IP address of your Tivo is necessary, I'd also try it without that line.

    You need to open port 9032. There are different ways to open the port depending on what flavor of Windows you have. If you read the other mega-thread in this forum on Tivo.NET, there is a command line method to open the port, here is a link to the command line method.
     
  2. Hercules67

    Hercules67 TiVo addict

    354
    0
    Dec 8, 2007
    I appreciate the quick response!

    I don't know why I didn't see the ffmpeg file problem! I was troubleshooting until 4:30 in the morning. I only got 2 hours of sleep.

    I fixed the location.

    So don't need the beacon IP address? Ok! I deleted it. Alright. I will see how I can open port 9032 through ZONEALARM (I should have mentioned I am using it) as my software firewall. I am also using Win XP Service Pack 2. Can you all not tell I am a nut about Security?

    Yesterday, I read about 35 of the 46 pages (10 more to go). Hopefully, after I get this working, I won't bother you folks with questions about aspect ratios and such. I have an LCD TV which is 4:3. Maybe in the future I can help too.... I hope.
     
  3. wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    OK, it's not a Bonjour thing, solely a Tivo thing... here's what it says in TiVoConnectDiscovery.pdf:

    So, Tivo Inc. is recommending a constant ID per installation, but there doesn't seem to be a strong reason. Do we want (or need) our Tivos to unambiguously identify pyTivo servers across restarts? I'm thinking, not particularly.

    (BTW, they do anyway -- I was hoping that changing the GUID might make the Tivo forget the old directory it was caching (i.e. the subfolder problem), but no such luck.)
     
  4. jcthorne

    jcthorne Active Member

    2,721
    3
    Jan 28, 2002
    Houston
    Yes that is the line I am using except for the threads parameter as noted.
     
  5. dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    I agree. jcthorne's ffmpeg options (if I have them correct) do not specify a bitrate but rather a quality goal. This leads to VBR encoding, which apparently the HD Tivo's can handle. Thus choosing a video bitrate based on frame size or rate is not an issue. -- neat solution assuming the HD TiVo's can handle it. As you suggested, there is no issue at all for Series 2 TiVo's -- just choose a width, height and bitrate and stick with it.
     
  6. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Why stop with the video bitrate? Just a suggestion but why not also pass the original video's audio bitrate, without modification, unless it's too high for the Tivo to support?

    I'm sure there are a number of optimizations along these lines we can come up with. I'd like to do everything possible to speed up transfers especially when I'm transferring HD content.
     
  7. dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    Think I got it. What's ironic is it requires adding a line right after (or before) the line that was added to fix videos (done in build d4219....). (What's really ironic is it took me hours to figure this out!)

    Anyway add the following line after line 133 in plugin.py:

    Code:
                    if os.path.isdir(os.path.join(file)): 
                         file_url = '/TiVoConnect?Command=QueryContainer&Container=' + cname + file_name 
                     else:                                 
                        file_url = '/' + cname + file_name 
                     file_url = file_url.replace('\\', '/') 
                     [COLOR="Red"]anchor = anchor.replace('\\', '/')[/COLOR]
    
    The added line is highlighted in red.

    Haven't tested it thoroughly but initial tests indicate music works and video is not disturbed by the change.
     
  8. wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    If I might suggest instead:
    Code:
                    if os.path.isdir(os.path.join(file)): 
                         file_url = '/TiVoConnect?Command=QueryContainer&Container=' + cname + file_name 
                     else:                                 
                        file_url = '/' + cname + file_name 
                     [COLOR="Red"]if os.path.sep != '/':
                         file_url = file_url.replace(os.path.sep, '/') 
                         anchor = anchor.replace(os.path.sep, '/')[/COLOR]
    
    Less Windows-specific, and removes (most of) the penalty for doing unnecessary replaces on Linux, Mac OS X, etc.

    Although my own solution for the path problem was much different (see my Photo plugin)...
     
  9. jcthorne

    jcthorne Active Member

    2,721
    3
    Jan 28, 2002
    Houston
    Edit: Nevermind, I see you guys already figured this out while I was asleep.
     
  10. jcthorne

    jcthorne Active Member

    2,721
    3
    Jan 28, 2002
    Houston
    Very good question. I have not tried higher bitrate ac3 files. Did find out that AAC and DTS audio do NOT work, and the AC3 audio must be at 48000Hz sample rate. But as for the bitrate?

    Does ffmpeg have a parameter to allow setting a maximim bitrate rather than a specific one? Can TivoHD handle VBR ac3 audio? Will Tivo rule the world?

    All questions that need answers. Anyone try these combos?
     
  11. dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    Yes, this is more elegant .... practical difference is nil I suspect. A few microseconds faster on Linux (actually a few microseconds slower on Windows, since the "if" statement isn't needed there). Also would handle an OS that used a path delimiter other than '/' or '\\' -- does such a thing exist?
     
  12. wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    It does, or did -- MacPython-OS9 used a colon ':' as the delimiter, as I understand it, following old Mac conventions. But it seems to have stopped at Python 2.3.3, and I doubt if it would run pyTivo anyway. So, in practice, the use of os.path.sep is more of a self-documentation thing. :)
     
  13. ruttmeister

    ruttmeister New Member

    18
    0
    Dec 8, 2007
    West Des...
    I've posted a new version of Metadata Generator on the site linked in my signature line, for those who are interested. As with all these projects, all input is welcome and encouraged, for that is the only way we can create something that really works.

    Anywhoo, on with your regularly scheduled program...
     
  14. tlc

    tlc Member

    710
    0
    May 29, 2002
    I'm new to pyTivo so this may be obvious...

    I have an Tivo HD, the latest pyTivo-2007-12-09-master-*, and used
    as described in this thread.

    Anyway, I ran into the following error:
    Input #0, avi, from '/home/media/Videos/Features/test.avi':
    Duration: 01:58:39.4, start: 0.000000, bitrate: 824 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 608x336, 23.98 fps(r)
    Stream #0.1: Audio: mp3, 44100 Hz, stereo, 112 kb/s
    Output #0, vob, to 'pipe:':
    Stream #0.0: Video: mpeg2video, yuv420p, 608x336, q=2-31, 200 kb/s, 23.98 fps(c)
    Stream #0.1: Audio: ac3, 48000 Hz, stereo, 192 kb/s
    Stream mapping:
    Stream #0.0 -> #0.0
    Stream #0.1 -> #0.1
    [mpeg2video @ 0xb7e2b508]bitrate above max bitrate
    Error while opening codec for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height​

    Is there a max bitrate for mpeg2 ??

    Ideas?
    tlc
     
  15. tlc

    tlc Member

    710
    0
    May 29, 2002
    Never mind. Solved. I googled up a similar issue in the trouble tickets and changed '17Mi' to '17408' in my ffmpeg_prams.

    The best part is that my 900MHz P3 Ubuntu server is keeping up! Faster than real time!

    Thanks for pyTivo!
     
  16. steve101

    steve101 Member

    76
    0
    Jan 4, 2005
    Virginia, USA
    Is there a way to specify the interface? When I am using
    extranet (a vpn) and start pyTivo it grabs the wrong
    interface and only responds from the local computer (using
    127.0.0.1) none of my tivo's can see it. As long as the
    vpn is not up, pyTivo works fine.
     
  17. ruttmeister

    ruttmeister New Member

    18
    0
    Dec 8, 2007
    West Des...
    I've figured out how to format the tvRating field in the metadata file, and have updated my generator as well as my notes to reflect that. I also decided to put back in a lot of the more "advanced" fields in the generator. Check it out, let me know what you think, as well as any questions or concerns (bugs...).

    Unfortunately, the tvRating field only returns standard TV ratings (TV-PG, TV-14) and not movie ratings (PG-13, R, etc) or custom ratings, but TV ratings are very similar to movie ratings in their structure (TV-14 = PG-13, TV-MA = R, etc).

    I currently don't see it as possible to display any other rating than the standard TV ratings, as it's more programmed into TiVo than pyTiVo. Unless the movie rating system is also stored in TiVo and we just don't know about it.

    Anyways, there you go.
     
  18. scrappydog65

    scrappydog65 Long Time TiVo User

    29
    0
    Dec 29, 2003
    Pennington, NJ
    Steve.

    You just have to change the Beacon subnet mask. In my case, I use the following to make sure that it looks at the correct network adapter.

    [Server]
    beacon = 192.168.2.255​


    Mike
     
  19. Hercules67

    Hercules67 TiVo addict

    354
    0
    Dec 8, 2007
    Can you explain this a bit more?

    I think this is what I am running into myself. I 've turned off the software firewall (Zonealarm) and shut off Wireless Security on my Linksys. Still, I can't get pyTivo to work. Something in my network set-up is preventing it, I think.
     
  20. dlfl

    dlfl Cranky old novice

    6,997
    18
    Jul 6, 2006
    Near...
    Thanks! Looking at your "notes", I have some insight on the "Showing Bits" number. It is a bit-flag encoded field, which means if you express the number in binary format, a 1 or 0 in a particular column means the feature is on or off. The conversion between normal (decimal) and binary is easily done in the Windows calculator, or in any programming language -- and I assume in Excel. Your data shows the following flag assignments:

    Bit# Feature
    0 CC
    1 Stereo
    2 Sub
    3 In prog
    4 Class
    5 SAP

    Where bit #0 is the right-most binary column, #1 is the second from right, etc. The decimal equivalent of a bit# is just 2 raised to the bit# power, i.e.,
    bit #0 = 1
    #1 = 2
    #2 = 4,
    etc.
    Thus to find out what the decimal numbers above 53 do you only need to try values of 64, 128, 256, etc. until nothing happens or it crashes.
     

Share This Page