pyTivoX

Discussion in 'TiVo Home Media Features & TiVoToGo' started by Yoav, Dec 10, 2008.

  1. Jun 28, 2010 #981 of 1455
    Phantom Gremlin

    Phantom Gremlin Active Member

    1,579
    5
    Jun 20, 2002
    Tualatin,...

    Advertisements

    Perhaps that's just wishful thinking. :)

    The Unix underpinnings of OS X can help a great deal in diagnosing problems like this, but you must learn more about them. I can only point you in a general direction, since I have no way to replicate your exact environment. The following may seem like basic information for "hackers", but since you didn't do it I assume you're not familiar with it.

    You can examine IP packets sent/received at any interface by using the command line program "tcpdump". You run this using a command line interface called "terminal". You can usually start terminal by searching for that word in spotlight. It should be the "Top Hit". Unfortunately tcpdump is a complex program for those unfamiliar with it. I assume you are unfamiliar because if you were familiar you would already be using it.

    In order for tcpdump to know what to do, it must know what "interface" to use. Your wireless connection uses one interface, your wired ethernet uses another. You can find out the names of the interfaces on your computer by issuing the command (in terminal):

    ifconfig​

    On my 3 y/o iMac this command produces (partial output):

    Code:
    en1: flags=8823<UP,BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
    	ether 00:1c:b3:72:b2:d7 
    	media: autoselect (<unknown type>) status: inactive
    	supported media: autoselect
    
    en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
    	inet 192.168.17.80 netmask 0xffffff00 broadcast 192.168.17.255
    	ether 00:1b:63:95:1c:4f 
    	media: autoselect (100baseTX <half-duplex>) status: active
    	supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> none
    The above may differ for the Mini. I don't know since I've never owned a mini.

    Once you have identified the two relevant interfaces you need to start two separate tcpdump sessions in parallel. You do this by opening two separate terminal windows. The commands for each will be similar.

    If you are already an administrator on your computer you can issue the tcpdump commands more easily. If not, then the easiest thing is to do all this from a user who has administrative privileges.

    sudo tcpdump -l -n -i en0​
    sudo tcpdump -l -n -i en1​

    You will be prompted for your administrator password by the sudo command.

    The above will produce timestamped packet dumps for each interface. If your Mini is properly routing, you will see an IP packet arrive at an interface and very shortly later depart out of the other interface. The IP addresses will be re-written by the Mini, so it may be a little difficult to follow whats going on.

    Good luck.
     
  2. Jun 28, 2010 #982 of 1455
    Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    As far as I know the Zeroconf discovery protocol REQUIRES the Tivo and pyTivo machine to be on the same subnet. The pyTivo machine sends broadcast packets to announce it's presence. Those broadcasts won't cross subnet boundaries.

    In your case, your Mac Mini has TWO network interfaces. One that is on the same subnet as pyTivo and one that is the Internet connection.

    It sounds like pyTivo might be using the Internet connection to send it's broadcasts rather than using the second interface that provides the private subnet the Tivo is on.

    You could disable the newer Zeroconf style beacons and use the old beacon mechanism which allows you to select which subnet to send the beacons to.

    In your pyTivo.conf, you would need to set:

    zerconf = false
    beacon = <tivo IP or tivo subnet broadcast address>

    However, once you do so, you won't be able to use pyTivoX's gui to set any options as it will overwrite the manual settings you added.

    For more information on how to use the beacon config option, see:

    http://pytivo.sourceforge.net/wiki/index.php/Configure_pyTivo#beacon
     
  3. Jun 28, 2010 #983 of 1455
    Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Closed Captions and subtitles use different formats. Soft subs are stored as a separate stream in the video container. Close Captions are encoded into the video frame in an unused area.

    If you want subs that can be turned on an off during playback, then you need to use t2sami to convert the soft sub into Closed Captions.

    Otherwise, you'd have to burn the subs into the video directly with Handbrake or mencoder. Last I checked, ffmpeg didn't support burning the subs in yet.
     
  4. Jun 29, 2010 #984 of 1455
    kupe

    kupe Viva 'la Tivolution!

    381
    22
    Apr 9, 2003
    Thanks for the info! Alas it appears t2sami is Windows-only. I guess for now I'll stick with HardSubs.

    Kupe
     
  5. Jun 29, 2010 #985 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010

    Advertisements

    And Rdian06 saves the day.

    I didn't even need the "zeroconf" line. I just edited the "beacon" line in my pyTivo.conf file, and it works. Though I don't have a need for Streambaby, I tried adding changing the "ip" line of my streambaby.ini file, and Streambaby also works.

    So, in short, pyTivoX works just fine with the TiVo on a second subnet. Someone should add it to the FAQ.

    Of course that means I lose the use of Yoav's GUI, which I'm not thrilled about, but life goes on. And I've discovered wmcbrine's web interface, which is slightly easier than editing the conf file when I want to change my shares.

    ------

    And since I've lost use of the GUI, and since Yoav seems to have left us to fend for ourselves, if anyone is still working on the project, may I humbly suggest a new feature for pyTivoX to allow specifying the pyTivo beacon somehow without disabling the GUI features?

    I'm not even suggesting putting it into the GUI prefs, (though that would be nice). But even allowing for a "pyTivo-user.conf" file in the same way that there is a "streambaby-user.ini" file would take care of the issue. After reading more carefully through all 33 pages of the thread, I notice that I am not alone in having my TiVo on a second subnet, and given that it's pretty easy to get pyTivoX working on the second subnet on a technical level...
     
  6. Jun 29, 2010 #986 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010
    However, I am having one other problem. It may belong more in the pyTivo thread than here, but since I'm already here, and since wmcbrine seems to check in on this thread, here goes:

    I have a file which pyTivo failed to transfer due to "copyright reasons". Having just read all 33 pages of the thread, I understand that isn't what's really going on.

    The file

    - Transfered and decoded a file from my TiVo to my Mac using iTivo.
    - Edited out the commercials by hand using MPEG Streamclip.
    - File plays just fine on the Mac using VLC, Toast Video Player, and EyeTV.

    My confusion

    At this point, I assume I have an mpg2 file, all ready for the TiVo in native format, and one that needs no transcoding. I'm befuddled as to why transcoding fails, since to my (likely incorrect) understanding, no transcoding should be needed. The file should just be sent natively to the TiVo, no?

    And FWIW, I've used this precise workflow in the past with great success multiple times. Though I should note that now I'm on 10.6 and pyTivoX 1.3, while the last time I did this both my OS and my pyTivoX were of previous versions.

    Beyond my wanting to solve the issue of this particular file, I'm curious to figure out if I just bring a file from TiVo to Mac, decrypt it, and then send it right back to the TiVo, it shouldn't get transcoded, right?

    And if so, and given that the TiVo seems to be just fine with files edited via MPEG Streamclip, is there anything in the pyTivo.conf file that I can set to force pyTivoX to not even bothering to try to transcode a file and to just send it natively?

    The log

    (I've tried to clip it down to only the relevant part, but if more of the log is needed, I can certainly post more.)

    Code:
    Input #0, ac3, from '/Volumes/FW Media/TiVo Movies/NBA Finals/NBA Basketball - Finals Game 7.mpg':
      Duration: 59:24:53.68, bitrate: 384 kb/s
        Stream #0.0: Audio: ac3, 48000 Hz, 5.1, s16, 384 kb/s
    At least one output file must be specified
    
    DEBUG:pyTivo.video.transcode:failed at vCodec
    DEBUG:pyTivo.video.transcode:failed at mapVideo
    DEBUG:pyTivo.video.transcode:failed at vWidth/vHeight
    DEBUG:pyTivo.video.transcode:failed at vFps
    DEBUG:pyTivo.video.transcode:aFreq=48000; vFps=; container=ac3; kbps=384; mapAudio=[('0.0', '')]; vHeight=; vCodec=; Supported=False; aKbps=384; par=None; millisecs=213893680; par2=None; par1=None; mapVideo=None; vWidth=; dar1=None; aCodec=ac3
    DEBUG:pyTivo.video.transcode:FALSE, file not supported /Volumes/FW Media/TiVo Movies/NBA Finals/NBA Basketball - Finals Game 7.mpg
    INFO:pyTivo:192.168.2.2 [29/Jun/2010 12:13:52] "GET /TiVoConnect?Command=QueryContainer&Container=NBA%20Finals&SortOrder=!CaptureDate&ItemCount=1&AnchorItem=%2FNBA%2520Finals%2FNBA%2520Basketball%2520-%2520Finals%2520Game%25207.mpg&AnchorOffset=-1&Filter=x-tivo-container%2Ftivo-videos,x-tivo-container%2Ffolder,video%2Fx-tivo-mpeg,video%2F* HTTP/1.1" 200 -
    DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/FW Media/TiVo Movies/NBA Finals/NBA Basketball - Finals Game 7.mpg
    DEBUG:pyTivo.video.transcode:FALSE, file not supported /Volumes/FW Media/TiVo Movies/NBA Finals/NBA Basketball - Finals Game 7.mpg
    INFO:pyTivo:192.168.2.2 [29/Jun/2010 12:13:52] "GET /TiVoConnect?Command=TVBusQuery&Container=NBA%20Finals&File=%2FNBA%20Basketball%20-%20Finals%20Game%207.mpg HTTP/1.1" 200 -
    INFO:pyTivo:192.168.2.2 [29/Jun/2010 12:13:58] "GET /TiVoConnect?Command=QueryFormats&SourceFormat=video%2Fx-tivo-mpeg HTTP/1.1" 200 -
    DEBUG:pyTivo.video.transcode:CACHE HIT! /Volumes/FW Media/TiVo Movies/NBA Finals/NBA Basketball - Finals Game 7.mpg
    DEBUG:pyTivo.video.transcode:FALSE, file not supported /Volumes/FW Media/TiVo Movies/NBA Finals/NBA Basketball - Finals Game 7.mpg
     
  7. Jun 29, 2010 #987 of 1455
    wmcbrine

    wmcbrine Well-Known Mumbler

    11,932
    959
    Aug 2, 2003
    Don't give me credit for that -- it's KRKeegan's work. I've only revised it slightly.

    Re: your next post, it looks like ffmpeg couldn't read the file for some reason. The failure is not that it can't transcode it, but that it can't even get basic info about the video stream, which it needs in order to decide whether or not it has to transcode it. You could force it to go by the extension, just passing through all ".mpg" files, by disabling ffmpeg entirely. But it would be better, if possible, to figure out what's wrong with the file, from ffmpeg's perspective.
     
  8. Jun 29, 2010 #988 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010
    Ah. But I don't care about ffmpeg's perspective here. I'm generally opposed to transcoding down from broadcast mpg2.

    All I care about is TiVo's perspective here. If TiVo can't handle playback of the file, then I'd become interested in what's wrong with the file. (And while I'd be interested for curiosity's sake in figuring out why MPEG Streamclip was suddenly borking my files from TiVo's perspective, in a worst case scenario I can semi-happily live with just letting the Mac Mini handle playback. The remote control interface isn't nearly as elegant, but I prefer that to the loss in quality inherent in transcoding. I never playback files on the TiVo that didn't originate as files on TiVo.)

    Or put another way, I'm guessing my next troubleshooting step is to figure out the magic pyTivo configuration line to disable ffmpeg if I'm feeding it an .mpg file extension. After all, what do I have to lose other than possibly having to power cycle the TiVo?

    (However, if there is some simple way for me to run some type of ffmpeg diagnostics on the file that you think would be helpful, I could certainly go that way. My uneducated reading of the log is that the version of ffmpeg in pyTivoX thinks the file has no video.)
     
  9. Jun 29, 2010 #989 of 1455
    wmcbrine

    wmcbrine Well-Known Mumbler

    11,932
    959
    Aug 2, 2003
    There is no such line. You'd simply have to disable ffmpeg entirely, by removing it, so that pyTivo couldn't find it. Only then does pyTivo fall back on using the extension.

    pyTivo uses ffmpeg on all files, just to report on dimensions, length, etc. This is important even for plain old MPEG-2 files. Fallback mode is an inferior mode of operation, which is why it's a last resort. Transcoding is not the issue.
     
  10. Jun 30, 2010 #990 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010
    OK. I follow.

    Anything I can do to deal with the file from ffmepg's perspective?

    Does my reading of the log that ffmepg thinks the file has audio but not video seem correct?

    Anything I can do to fix the file for ffmpeg, such as remuxing the file somehow, or something similar? (My MPEG knowledge is somewhat minimal.)

    Any idea why simple editing in MPEG Streamclip would be causing such problems in the first place? I tried editing a second file, and got the exact same problem with pyTivoX. (I tried employing the "fix timecode" operation in MPEG Streamclip, but it didn't solve the issue.)

    Should I be trying to drop in a more current version of ffmpeg? (I don't have the skills to compile, so I'd be hoping there is an already compiled binary out there.)

    -----

    In short, what would you do in my shoes in such a situation?

    Perhaps I should try the latest MPEG Streamclip beta. I'm still on the last non-beta release (v1.9.2), since that's worked fine and dandy with pyTivoX in the past, and since nothing in the change log for the v1.9.3 betas seemed to apply to my situation, but given my minimal understanding of MPEG, perhaps some of those changes actually were important in some way.
     
  11. Jun 30, 2010 #991 of 1455
    Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Yes it looks like ffmpeg things the MPEG file only has an audio stream. What happens when you take the iTivo decoded MPEG and try to send it back to the Tivo (i.e. without editting it.)
     
  12. Jun 30, 2010 #992 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010
    If I just simply round-trip the file without editing it, pyTivoX sends it back to the TiVo just fine.

    Part of my befuddlement here is that the described workflow of editing decoded TiVo files in MPEG Steamclip and then sending them back to the TiVo using pyTivoX used to work just fine. I've done it many times without a hitch. But I haven't done it in four or five months, and since then, I've upgraded from OS X 10.5 to 10.6, and upgraded to pyTivoX 1.3, so there are multiple moving parts here, unfortunately. And thus whatever is going wrong doesn't seem obvious to me.

    -----

    Without guidance on how to further troubleshoot or fix the file from ffmpeg's point of view, I guess the next thing I'll try is taking ffmpeg out of the pyTivoX app bundle, thus forcing pyTivoX to just send the file over to the TiVo and see if the TiVo can grok the file or not. I assume I can't damage my TiVo by sending it a file it can't handle - that a worst case scenario here is just that the TiVo will hang and I'll have to power cycle it and then delete the file, no?
     
  13. Jun 30, 2010 #993 of 1455
    wmcbrine

    wmcbrine Well-Known Mumbler

    11,932
    959
    Aug 2, 2003
    Generally the TiVo will just drop the connection when fed something it doesn't like.
     
  14. Jul 1, 2010 #994 of 1455
    Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Try upgrading pyTivoX's ffmpeg using my Intel Mac build. See:

    http://www.tivocommunity.com/tivo-vb/showthread.php?p=7854308#post7854308

    I haven't used MPEG Streamclip in ages so I'm not sure what's happening.
     
  15. Jul 1, 2010 #995 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010
    Thanks for the help, both wmcbrine and Rdian06.

    I will first try Rdian06's build of ffmpeg, and if that doesn't help, I'll try just sending the file over without ffmpeg installed. I'm also going to try the 1.9.3 beta of MPEG Streamclip, to see if that makes an impact.

    I shall report back with results after it's all done.

    -----

    Do you use something else for MPEG-2 editing? I'm not aware I had any other options on the platform.

    (I keep meaning to research if there is some well-working automated comskip software I can run on Windows using VMWare, since I'm under the impression that such an animal doesn't exist on OS X, but I've been lazy on that front.)
     
  16. Jul 1, 2010 #996 of 1455
    Fofer

    Fofer Bo55man69

    93,394
    4,682
    Oct 29, 2000
    FWIW, iTiVo has comskip. It's billed as an "experimental" feature, as I understand it, but appears to work fine for folks who've used it.
     
  17. Jul 1, 2010 #997 of 1455
    chucky24

    chucky24 New Member

    20
    0
    Jun 17, 2010
    I was under the firm impression that the comskip feature in iTiVo doesn't work well, but I no longer remember how I arrived at that impression.

    After arriving at that impression, I tried KMTTG, which was advertised as working well for comskip, but only on SD material. (I've used KMTTG on SD material, and my experience was that it works pretty damn well about half the time, and not at all the other half of the time. But it's been a while, as I mostly watch HD material. So the state of the art may be different on that one too.)

    In short, I may not have a clue what I'm talking about here. And since this is turning into something far off-topic for the thread, I think it may be wiser for me to just go review the relevant threads rather than continuing to hijack this one.
     
  18. Jul 7, 2010 #998 of 1455
    unkle77

    unkle77 New Member

    3
    0
    Jul 7, 2010
    I just started having problems with pytivox 1.3

    Once i start up pytivox and click apply.. I can see my folder in the Now playing list but when i go into it, it says that there are no recording there.... even though there are plenty of AVI's in the folder.

    UPDATE:

    I just reinstalled pytivox 1.3 and now i cant even see the folders. seems like it all went down the sh__hole.... sigh.. so aggravating.

    I have little snitch installed... didnt change anything between yesterday and today. I even went into the preferences and told it to STOP and still nothing... anyone else having similar problems?
     
  19. Jul 8, 2010 #999 of 1455
    unkle77

    unkle77 New Member

    3
    0
    Jul 7, 2010
    update again:

    So after fiddling around with pretty much anything I can think of... I think it may be the tivo wireless adapter that crapped out on me.

    I repositioned it so that it is literally 10 ft away from my time capsule (the only obstruction is a wood panel where i store the capsule) and I can logon to the network within tivo and get 68-70&#37; signal strength. BUT when i try to transfer avi's it goes at a painstakingly slow pace and when i try to view the folder it takes 5-10 seconds for files to show up or tivo just says "there are no videos in this folder" when there are.

    can someone confirm my suspicion or give me some other avenues to get my pytivox-->tivo speeds back to normal?
     
  20. Jul 8, 2010 #1000 of 1455
    Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Perhaps another wireless network is operating on the same channel as yours causing collisions? For 802.11g equipment, there are really only three non-overlapping channels: 1, 6, 11. So first try power cycling the time capsule. If that doesn't help, try changing the channel it's using.
     

Share This Page

spam firewall

Advertisements