1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Breaking News - The sale is back... "Our “once in a lifetime” PLS promotion was such a hit, that we’ve decided to launch it again! The PLS Transfer Sale will be available again for the last 3 days of the month. This will include the BOLT+ 3TB, and 4 refurb units (BOLT 500GB, BOLT 1T, Roamio Pro and the TiVo Mini)." https://www.tivo.com/secondchancelifetimesale#/secondchancelifetimesale

pyTivo - Transcoding server

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

  1. grahamg

    grahamg New Member

    Aug 18, 2006
    Pasadena CA
    Thanks for the tip, I have used the web admin, and see how it works. I tried the -async, max_video_br=12000k and max_audio_br=384k as suggested. But there is no change. I doubled checked by recording a couple of 2 minute videos of a news program, again tried I to play them via PyTivo but they have the same "stuttering" problem. I believe the PC video files are good. I then tried VideoReDo on them. I tried the Quickstream fix with but it found no errors and there is no improvement.

    I then tried doing "set start" and "set end" - "add selection" - "save as" with the options all set at "no change".

    However, the original file shrank from 3.2gb to 1.5gb. But lo and behold the Pytivo transfer now plays fine.

    But when I check the original versus "save as" files I see the following changes.

    Original = MPEG2 video, 1280x720 59.94fps 13894kbps, audio Dolby AC3 48000hz 5.1ch 448 kbps filesize 3.1gb

    Save as = MPEG2 video, 1280x720 59.94fps 13160kbps, audio Dolby AC3 48000hz 1ch 192 kbps filesize 1.5gb

    So it seems that the VideoReDo "no change" does change things - especially the sound channel. But it now works.

    So the new question. Can ffmpeg_mp2.exe handle 5.1 surround sound? Could this be the problem?
  2. grahamg

    grahamg New Member

    Aug 18, 2006
    Pasadena CA
    Edit 4/17/08

    Today I tried tried 3x utilities (Super ver 2008/bld.30, AVS Video Converter, VideoRedo) all were able to convert the 3.1gb original source to playable Pytivo versions. None of these were able to retain the AC3 audio and converted to mono or stereo.

    I have to conclude that at present Pytivo cannot accept native MPEG2 OTA HDtv content. I believe the Tivo unit can play AC3 content because I used Tivo for a long time to record Charter Comm's cable video content which is known to use AC3 on their HD content.

    Thanks for all the help, but it looks like this could be something that needs some attention. I would be happy to make 1 minute OTA DVR recording and upload it somewhere if that would help.

    Thanks Guy's
  3. tfratzke

    tfratzke Disgustipated

    Jul 11, 2003
    No kidding! Can't agree more! Just installed today for the first time. I should have never purchased TD+!!
  4. lgkahn

    lgkahn Member

    Apr 3, 2002
    there seems to be a problem with tytivo and windows 2000 ... I could not get it working that my shares show up in my series 3 tivo.. I basically reinstalled on my xp box and pointed it to the same directory on the w2000 box via a mounted share/drive and it comes up fine in the now playing on my series 3... no errors in the console for tytivo and i can see the now playing fine via he web but when running directly on the w 2000 box nothing ever shows up in the now playing.... anyone else test this with w 2000...

  5. lgkahn

    lgkahn Member

    Apr 3, 2002
    another problem trying to transfer a .tivo I converted from a .tmf file.. could it be the funky msftp name ie - - [19/Apr/2008 10:50:18] "GET /PC%20K%20Drive%20Videos/horror/%
    D%7BHBOS%7D.tivo HTTP/1.1" 200 -
    Exception happened during processing of request from ('', 2439)
    Traceback (most recent call last):
    File "H:\Python25\lib\SocketServer.py", line 464, in process_request_thread
    self.finish_request(request, client_address)
    File "H:\Python25\lib\SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File "H:\Python25\lib\SocketServer.py", line 522, in __init__
    File "H:\Python25\lib\BaseHTTPServer.py", line 316, in handle
    File "H:\Python25\lib\BaseHTTPServer.py", line 310, in handle_one_request
    File "C:\pytivo\httpserver.py", line 55, in do_GET
    plugin.send_file(self, container, name)
    File "C:\pytivo\plugins\video\video.py", line 215, in send_file
    handler.wfile, tsn)
    File "C:\pytivo\plugins\video\transcode.py", line 29, in output_video
    shutil.copyfileobj(f, outFile)
    File "H:\Python25\lib\shutil.py", line 24, in copyfileobj
    File "H:\Python25\lib\socket.py", line 262, in write
    File "H:\Python25\lib\socket.py", line 249, in flush
    error: (10054, 'Connection reset by peer')
  6. lrhorer

    lrhorer Active Member

    Aug 31, 2003
    OK, now that they've fixed TTCB on the S3, there's no longer any reason to rate shape any videos. Doing so fixed the stuttering and stammering, but it made the video look terrible. How can I change the config file so pyTiVo no longer rate limits at all?
  7. PaulS

    PaulS Member

    Sep 16, 2002
    Southern NH
    When you say "fixed TTCB", do you mean the macroblocking and picture/sound break-ups when transferring a file (likely to be 1080i) to an S3/THD ?

    pyTivo really doesn't "rate limit" per se. If/when it has to transcode, "video_br" is the maximum video bitrate that the transcoder will use to convert the video. Rate limiting is more of a function of the speed at which the file is transmitted from the PC to the TiVo.
  8. substance12

    substance12 Member

    Feb 6, 2008
    all of a sudden tivohd cannot see any of the videos in my share folder. is this because of 9.3?
  9. steve614

    steve614 what ru lookin at?

    May 1, 2006
    Dallas, TX
    Do you happen to be doing something on your computer that's using most of the CPU cycles?

    I'm currently using my computer to author a DVD and the computer icon disappeared from my TivoHD.
  10. lrhorer

    lrhorer Active Member

    Aug 31, 2003
    The symptoms are variable, and include stuttering audio and/or video, momentary freezes, and pixelization, yes.

    Since there is no rate limit on the stream being passed to the TiVo, your distinction is rather moot. I also don't really know what else to call transcoding with a maximum bit rate set other than rate limited. Nonetheless, the version of pyTiVo which I have automatically transcodes any video whose bitrate exceeds a certain threshold and drops the bit rate to something like 8Mbps. I don't recall the actual threshold at the moment. It's mentioned further up in this thread, but the bottom line is it is no longer necessary. It was a stop-gap measure in any case, because the transcoded video looks terrible. My question remains: how do I get pyTiVo to stop this behavior now it is no longer necessary?

    Edit: Never mind. I removed everything from the server section and it works just fine, now.
  11. PaulS

    PaulS Member

    Sep 16, 2002
    Southern NH
    Either you didn't read what I wrote, or can't understand it. Regardless, there is most definitely a difference between the transcode bit rate and the transmission bit rate. If you've been paying attention, wgw has proven this most conclusively here and at the pytivo forums. Apparently, you haven't been, so I'll illustrate.

    There are THREE maximum values that we need to pay attention to when transferring videos to a TiVo. Exceeding SOME of them will cause playback problems on the TiVo.

    The maximum bit rate ("max_video_br") specifies the maximum bitrate at which a video may encode video. It's defaulted to 17Mbps in pyTivo. Usually, this handles spikes in the encode rate when there's a lot of motion or a scene transition. Exceeding this value caused picture break-ups during playout. Typically, videos play out at a much lower rate (8-10Mpbs). I don't expect that 9.3a fixed this, as it's probably a hardware constraint on the TiVo itself.

    The video bit rate ("video_br") specifies the ENCODING bit rate for ffmpeg when a transcode is necessary. I can't recall off the top of my head if it uses a VBR, CBR or ABR algorithm. This is currently defaulted to 8Mbps, as seen as a resonable compromise between encoding CPU utilization, file size and picture quality. Previous defaults of 10 and 12Mbps didn't seem to impact picture quality negatively, so they might be considered usable values for someone desiring a higher level of picture quality for their encodes.

    The transmission bit rate (no pytivo configuration option) specifies how quickly your PC transfers the video to your TiVo. This is not a direct function of pytivo (really, ffmpeg). It is highly dependent upon other factors, such as the speed of your PC and network. Faster machines running on faster networks (i.e. dual-core running on a gigabit wired) can throw the video at the TiVo faster than a slower one (i.e. P3 running on an 802.11b network).

    wgw has shown that pre-9.3a versions of the TiVo hardware would suffer macroblocking and picture breakups when the transmission rate exceeded 8Mbps. See HERE for details. Reducing the speed of the NETWORK TRANSFER alone resolved the playout problems he was experiencing on his TiVo. This mirrors the problems that people were seeing when doing TTG/TTCB transfers of known good content.

    You would typically see this situation in cases where transcoding was NOT required. Such as a .tivo file from a TTG transfer, or the file is already digestable by an S3/THD because it's MPEG-2. Ordinarily the CPU utilization of the transcode operation is the bottleneck, as I've only hard of one pyTivo machine (an 8-core Mac!!!) that could possible transcode fast enough to encounter this problem. On files that don't need to be transcoded, all you're really doing is copying the file from the PC to the TiVo. In this case, even lowly PCs can transmit the files at speeds that cause the TiVo problems.

    The guess behind the root cause of the problem is that some portion of the TiVo network receive logic was being overwhelmed and caused the recordings to get munged. It's my guess that this is what has been fixed with the 9.3a drop. If that's the case, there isn't a pyTivo configuration option that needs to be altered to take advantage of this.

    Incorrect assumption. See above.
  12. moyekj

    moyekj Well-Known Member

    Jan 23, 2006
    As some of you may be aware it's possible to pull the raw, encrypted transport stream from S3/THD units by specifying a change in video format. For example, in the usual download url:
    Simply replace x-tivo-mpeg with x-tivo-raw-tts so the above becomes:
    What this accomplishes is you get MRV speed downloads to your PC instead of normal TTG speeds since the originating Tivo doesn't have to do any work re-muxing or re-encrypting, it's simply passing along the raw recording to your PC. This results in ~ 2x speedup for downloads in my experience.

    So that's great, so I can double my download speeds using this method, however there is not much I can do on the PC side with the resulting .TiVo file since I can't break it's encryption (that may be the subject of a different thread). But what would be useful is if I could feed back the raw .TiVo files back to my Tivos using pyTivo. So I guess what I'm asking is would it be possible to have pyTivo serve back to Tivos in raw format using the x-tivo-raw-tts tag instead of the usual x-tivo-mpeg tag?
  13. FreydNot

    FreydNot New Member

    Feb 6, 2002
    Seattle, WA
    Just a shot in the dark, but could this be related to the recently expired tivo certificate?

    TivoPony's post about the new version of TivoDesktop and the need to update the cert on older versions are here:

    Instructions for upgrading the TivoDesktop cert is here:
  14. SMWinnie

    SMWinnie Dis Member

    Aug 17, 2002
    Can the output from Metagenerator be tweaked to group arbitrary files after transfer to the TiVo? I have files from a bunch of sources that I'd like to keep together on the TiVo's NPL.

    Looking at the output .txt file, is one of these fields key to grouping in the eventual NPL?

    title : Kids' Movies
    episodeTitle : Learning to Ride
    movieYear : 200X
    description : Dan learns to ride a bike; Ben learns to ride a trike.
    isEpisode : true
    episodeNumber : YYYYY
    seriesTitle : Kids' Movies
    Thanks for your attention.
  15. ojag

    ojag New Member

    Sep 11, 2006
    Hello, I used to use pyTivo on my PC but I got a Macbook a few months ago and I'm having a little trouble following the installation instructions on the website. Would anyone be willing to walk me through it? If so, can you please PM me? Thanks.
  16. dizziness

    dizziness New Member

    May 7, 2006
    Its worth noting that I am the 8-core user, and I'm lucky to hit 29% CPU usage due to ffmpeg's limitation on multithreading and TivoHD's TTG network bottleneck. So I expect you could have faster than realtime conversion with a quad core 2.6/2.8 machine as well. No need to go 8-core! :)
  17. dizziness

    dizziness New Member

    May 7, 2006
    This will also happen with Apple Trailers Quicktime HD downloads that have 5.1 AAC soundtracks. The channels map incorrectly.
  18. PaulS

    PaulS Member

    Sep 16, 2002
    Southern NH

    Yes. You can insert a "seriesId" tag in the metadata file to get the files to group, provided that the seriesId you choose is one that is currently in your TiVo's guide data.
  19. lgkahn

    lgkahn Member

    Apr 3, 2002
    hi looking at pursueing adding .tmf support to tytivo since no one has responded.. I am able to convert .tmf in place to the original .xml
    and a .mpg

    any ideas where this needs to be hooked into ty tivo..

    here is a batch file I call for conversion

    C:\utils>cat tmfconv.bat

    REM Extract xml and ty files
    7z -y e %1 showing.xml

    REM rename xml file
    makeshowing %1

    REM convert to mpg
    tytompg.exe -y %1

    as far as I can tell the last step could be run instead of ffmpeg since it could output a .mpg stream and no further transcoding would be necessary

    thanks in advance.
  20. gonzotek

    gonzotek tivo_xml developer

    Sep 24, 2004
    Without getting deep into code details, it looks possible...

    As long as tytompg can output to a stream instead of a file, there doesn't seem to be much in the way, at least on Windows. Are the tytools crossplatform? pyTiVo runs on MacOS and Linux too, and the developers try to maintain feature compatibility across the platforms. pyTiVo is setup as a plugin system, so each type of media (music, photos, webvideo(feeds), video, etc.) has it's own plugin. So a ty plugin could be attempted without messing with the other parts of pyTiVo.

    Most of the technical discussion is happening over at the pyTiVo forum:

Share This Page