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. May 10, 2007 #481 of 5683
    dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    Absolulutely, will do! (As soon as I can get to it this evening) Thanks! :cool:

    Will probably post the debug file (and perhaps cut-n-paste from command window) as attachments, since they get pretty large for a post. Any problems with that? BTW, do you think re-booting my TiVo before testing further is advisable?
     
  2. May 10, 2007 #482 of 5683
    ScaryMike

    ScaryMike New Member

    205
    0
    Aug 23, 2002
    Madison, WI
    Just FYI:

    I installed this version, and I am able to browse and watch shows from subfolders (have tried up to 3 deep, as thats all the further I have things stored).

    This is on a 140 tivo (S2 60 hour) and on a 590 (humax 80 hour)

    Thanks!!

    -Mike
     
  3. May 10, 2007 #483 of 5683
    1up

    1up New Member

    11
    0
    Apr 22, 2007
    dlfl,
    No, the vob that I've been working with is 720x480 (fairly standard widescreen DVD AR, I think?). The defaults that pyTivo (and & Tivo.net, by the way) uses to transcode a 720x480 video to fit a 4:3 television screen has two problems (at least with my TV & my Tivo):
    1. The left and right sides of the video on the TV are beyond the screen limits by about 8% on the left and another 8% on the right. In other words, the picture is cut off on both sides.
    2. The video is distorted slightly (didn't try to figure how much) in that the picture is 'squeezed' so that things look too elongated. For example, people are stretched & seem too tall.

    By padding the top, bottom, left & right as I did with my custom code, I got the picture to look exactly the same on the TV whether played through the DVD player or my Tivo. Whoo-hoo :D

    I couldn't have done it without your help. Thanks again.
     
  4. May 10, 2007 #484 of 5683
    dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    Did it. Before I rebooted my TiVo I could go into subfolders but they were all empty. This produced debug1.txt and CommandWindow1.txt in the attached zip.

    After rebooting, everything worked fine (I only have one level of subfolders), except if I tried to left-arrow out while a subfolder video was transcoding (so I could cancel the transfer), the NPL was messed up. It would say the folder I was just in was empty, for example.

    In general, I had to use a "work around" (enter key followed by left arrow) to get the NPL back in shape -- fairly often -- however this was not all that unusual even before 8.3 and it's not a major pain IMHO.

    The stuff after rebooting is more extensive and is in debug2.txt.

    Looks like a major step forward! :up: :up: (I'm now wishing I had tried the NPL work around BEFORE I rebooted -- that might have been all that it needed.)

    Thanks again!
     
  5. May 10, 2007 #485 of 5683
    dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    You're very welcome!

    I can't resist preaching about AR some more. ;) NTSC DVD's of any DAR (display AR) are typically encoded to dimensions of 720x480, i.e., whether intended for widescreen or 4:3 display. There is AR signalling data in the file that tells the display device what DAR is required. Note that 720x480 is 1.5:1 which doesn't match either 16:9 (1.77:1) or 4:3 (1.33). The display device knows from the DAR signaling how to stretch or compress the video horizontally, and how to letterbox or pillorize if necessary so the active video is at the desired DAR and uses the available screen efficiently. Unfortunately pyTivo can't get the DAR signalling info from the input file so it has to guess based on encoding dimensions and whether you have aspect169 set true or not. For display of 16:9 on a 4:3 TV, the size argument for ffmpeg needs to be 720xXXX where XXX is 480 scaled down by the ratio of the DARs. For 16:9 and 4:3, XXX is (1.33/1.77) times 480 = 360. Then top and bottom pads (letterboxing) of 45 each are needed so the total output height comes out to 480. The fact that 720:360 is not 4:3 or 16:9 does not matter. The 720 could also be 544 or 480 (whatever is one of the standard widths for your TiVo) and the displayed picture would come out the same AR. Basically the TiVo is just stretching or shrinking those pixels horizontally to the equivalent of 640 pixels at the display (640:480 = 4:3).

    Thus you need -s 720x360 (or -s 544x360 or -s 480x360) plus -padtop 45 , -padbottom 45, and -aspect 4:3. The pad numbers may need to be multiples of 2 so use 44 and 46. There isn't any way for pyTivo to know the right thing to do in this case. Fortunately most non-mpeg2 video formats use square pixels (most of the time) so you can just assume DAR = ratio of encoding dimensions, as pyTivo does.

    Well that's what I think, anyway. It does get complicated doesn't it!
     
  6. May 10, 2007 #486 of 5683
    Iluvatar

    Iluvatar New Member

    377
    0
    Jul 22, 2006
    Ok so this is my first post in this thread but first I would like to acknowledge the hard work that has been put into this program it has definitely been enormous time saver (coming from Videora TivoConvert).

    After editing some of the transcoding options to my liking (namely hardcoding in specific padding on 4:3 content to properly see subtitles that were being cut off on my tv) I have noticed that some video files do not properly obey the bitrate setting of 4096 kb/s and are varying in the 1500-2000 kb/s speeds. It only happens with a few video files but it seems random as all my videos are the same type of video (divx). No matter how many times I cancel the transcode and restart it these particular files never reach the full 4096 kb/s bitrate, which makes for a very poor video on my TiVo.

    Having reached my abilities already with changing the padding options I am not sure how to analyze the problem and hope some one would have better information on this issue.

    BTW this is something I saw with Videora as well periodically so it is possible that it may be some issue within FFMPEG.

    Taylor
     
  7. May 10, 2007 #487 of 5683
    dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    Iluvator,
    I've seen this too, but I haven't noticed the lower video quality. What I think happens is ffmpeg finds it doesn't need the full bitrate to encode with good quality. It's always seemed to happen for input videos that had low quality. In the command window while transcoding there is a last line output by ffmpeg that is continuously updated. Toward the left end is a q value that fluctuates. This is a measure of how well ffmpeg thinks it is capturing the quality of the input. Lower values mean better quality and usually when I see sub-target output bitrates, this q value is bouncing around 2 or less.

    However, ffmpeg shouldn't lower bitrate below target if it isn't capturing the quality of the input. Maybe there is a problem with its bitrate control (or how it computes the q value).

    My TV is a mediocre quality 27" so maybe that's why I don't notice the quality degradation.
     
  8. May 11, 2007 #488 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    This is a function of ffMpeg I am afraid. Ages ago(It seems like ages now) we struggled with trying to force ffMpeg to a specific bitrate. After hours of tampering I discovered you can't.

    Someone mentioned it earlier, but yes the answer is that simply the videos just cant get any better. Here is a test you can try: If have a file that is not filling all 4mbps encode it and determine the overal bit rate after the file is done. Now do the same file but set ffMpeg to 8mbps, you should end up with roughly the same bitrate. I think this is a function of ffMpeg's speed, I really dont know.

    Sorry nothing we can do on our end.
     
  9. May 11, 2007 #489 of 5683
    TreborPugly

    TreborPugly Unreal!

    4,542
    0
    May 2, 2002
    Eastern TN
    Also, if you are talking about a DivX file for a 40 minute show that is 300 MB, then transcoding it up to a bitrate that makes it take up 1200 MB isn't giving you higher quality, it's just making it bigger. Why bother to do that?

    (I use a low bitrate because my home wireless isn't up to the task of sending higher quality in real time, and because the source is often low bitrate)

    I must say I'm always pleased with how much better stuff looks on my TV than on my computer, particularly really low res stuff from youtube.
     
  10. May 12, 2007 #490 of 5683
    Iluvatar

    Iluvatar New Member

    377
    0
    Jul 22, 2006
    OK, well I thought this might be the case. Thanks.
     
  11. May 12, 2007 #491 of 5683
    govardha

    govardha New Member

    36
    0
    Jan 11, 2004
    Hello,

    I tried to get pyTivo going on my Intel iMac, but I was having issues with the ffmeg binary which is alluded to in the installation documents found in the Wiki. I have included steps to compile a version of ffmpeg which is relatively straightforward and further helped me resolve the issues I had.

    My pyTivo instance works like a champ now(save for the issues with navigating through sub directories, which seems more like a Tivo SW issues rather than anything to do with pyTivo).

    My apologies in advance if I was not supposed to edit the wiki. Please let me know if anybody here needs any further assistance in getting pyTivo to work in their Macs.

    Best,
    G
     
  12. May 13, 2007 #492 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    No apologies needed. That is why it is a wiki, if you figure something out please tell everyone else.

    As for your subfolders issue, you should try the subfolders branch. The most recent zip is pytivo-subfolders-8.3-200.zip. I think it will work for you without any issues.

    Kevin
     
  13. May 14, 2007 #493 of 5683
    CheezWiz

    CheezWiz ReplayTV->S3 Tivo

    211
    0
    Dec 29, 2006
    Middle...
    So what do you do when Python just stops working for no reason?
    I have uninstalled it, installed the newest version, etc.. But I just get a blank box when I start pytivo.py. Just stopped working while I was playing with the newest version of pyTivo.
     
  14. May 15, 2007 #494 of 5683
    dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    CheezWiz,
    Are you sure it isn't running? Sometimes I get a blank command window at first until the TiVo sends a message. In other words, have you checked the NPL?

    Will Python run at all? On your Python submenu start "Python (command line)". A command window should pop up with a ">>>" prompt. Enter "a=3" then "print a". It should print "3".

    Make sure no Python-based programs or services are running, then open Task Manager and look for python.exe on the Processes tab. It should not be there. If it is, my theory is you have a rogue python process running and it's blocking starting up any other python process -- just a theory. If it's there, select it and click the End Process button.

    Have you been running pyTivo as a service? If so look on the MyComputer | Manage | Services list. Maybe a pyTivo service was left running (?). (If so stop the service and you probably need to uninstall it -- not sure because I don't run pyTivo as a service.)

    Beyond this, my only thought is there is something left in your Registry from the previous Python installations that needs to be removed.

    Edit: Yeah, the firewall should have been my first thought :eek: (see next post). You should be able to leave it running if you just open up the port that pyTivo uses (as set in pyTivo.conf). This applies to either software or hardware firewalls.
     
  15. May 15, 2007 #495 of 5683
    govardha

    govardha New Member

    36
    0
    Jan 11, 2004
    Hello Cheezwiz,

    I was walking through a family member with their pyTivo setup in Windows, we had a similar issue and I noticed that there was a firewall program which was holding up pyTivo from broadcasting. The moment we shut down the firewall, pyTivo was up and the Tivo noticed it.

    I do have a question about the Mac though. Is there anyway to start up pyTivo in verbose mode to see what is going on ? I was working on my brother's Mac yesterday.

    When I start up the pyTivo in his desktop, nothing happens in the prompt and neither do I see anything showing up on his TiVos.

    Any thoughts?

    G
     
  16. May 17, 2007 #496 of 5683
    ScaryMike

    ScaryMike New Member

    205
    0
    Aug 23, 2002
    Madison, WI
    Note: SubFolders version 200 running with a 140 tivo (S2 60 hour upgraded to 180gig)

    Just a note. If I use this slowly, it works great. But if I try to get to "wild" with it, for example, que up a bunch of transfers, navigate through a lot of folders back and forth while a transfer is happening, and so on, I can consistently cause the Tivo to reboot.

    Just FYI.
     
  17. May 17, 2007 #497 of 5683
    dlfl

    dlfl Cranky old novice

    6,995
    16
    Jul 6, 2006
    Near...
    I wonder how well "normal" TiVo-go-back handles queuing up a lot of transfers?
     
  18. May 17, 2007 #498 of 5683
    KRKeegan

    KRKeegan Im lost and confused

    215
    0
    Jul 20, 2004
    Los Angeles, CA
    Yeah that is kinda the nature of the beast I am afraid. I am doing my best to compensate for an error in TiVo, but unfortunately I can't fix that. My hope is that TiVo will fix this bug in the next release and then we can disable the HACK

    Kevin
     
  19. May 17, 2007 #499 of 5683
    armooo

    armooo pyTivo Developer

    81
    0
    Feb 1, 2003
    From my tests this happens when the over one second go up a folder condition is met.
     
  20. May 17, 2007 #500 of 5683
    TreborPugly

    TreborPugly Unreal!

    4,542
    0
    May 2, 2002
    Eastern TN

    Sorry, I don't understand that. Can you spell out what to avoid?


    (I never "queue up" transfers because I never had much success with Tivo Desktop doing that, and since I encode them at a lower bit rate, transfer speed is always a bit faster than play speed)
     

Share This Page