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

    boandmichele New Member

    4
    0
    Apr 6, 2009
    pytivo gurus! i come here for help as i cannot login to pytivo.krkeegan.com, even if i make a new account. :/

    this past weekend i went ahead and updated to ubuntu 9.04, i was using one of mr. mcbrine's forks from early april in 8.04, and just reinstalled the latest one tonight (the 'add unicodeencode' one)

    so, i am very used to and comfortable getting everything installed in just a minute or two. i started it running and i can access my share via the now playing list. however, there are no videos in there. it simply says there are no recordings.

    so of course i go and make sure its pointing to the proper folder, and it is. i do a few soft resets and suddenly it works just fine! well i am baffled, and this occurs everytime i restart my computer. i was just going to deal with it but tonight i cannot get it to work whatsoever. i even installed it on my laptop with 9.04 and it is doing the exact same thing.

    any advice? :(

    *edit* port 9032 is open and forwarded properly, btw
     
  2. wmcbrine

    wmcbrine Ziphead

    10,440
    55
    Aug 2, 2003
    I'm not sure what you mean about the port being forwarded. You shouldn't have to do that unless you're trying to access pyTivo from outside your LAN, via your router.

    I'm running Ubuntu 9.04 myself, and I don't have this problem.

    Are your laptop and desktop pointing to the same shares?
     
  3. bkdtv

    bkdtv New Member

    7,902
    2
    Jan 9, 2003
    DC Metro Area
  4. txporter

    txporter One sec, almost done

    666
    0
    Sep 17, 2006
    Austin, TX
    Nice work! Looks great!

    Jason
     
  5. boandmichele

    boandmichele New Member

    4
    0
    Apr 6, 2009
    ah, i thought maybe the port needed to be forwarded, even though i hadn't done it in the past. so disregard that...

    they are not pointing to the same shares. both machines are running amd64 ubuntu, pointing to different shares both on those specific machines.

    *edit* here is what it says when i run it in the terminal on the laptop. just for testing, i put a sample avi in /home/bo/videos, and still nothing. conf file is pointed correctly:

    edit again... i went over to the desktop in my frustration, changed the share name from "Movies" to "Videos", do a soft reset, and now we are watching Flight of the Conchords. i dont understand...
     
  6. May 7, 2009 #2286 of 5866
    NYHeel

    NYHeel Well-Known Member

    2,176
    35
    Oct 7, 2003
    In the interest of full disclosure I also posted this on the pytivo board but I figured I'd post it here also.

    OK, I just installed pyTivo and I have a few issues. I'm using Tivo HDs version 11.0c.

    One, immediately after I installed pytivo my firewall (Norton internet security 2009) blocked something from my Tivo ip address called invalid TCP destination port. It was 3474. Is this a problem?

    Second, although my Tivo sees Pytivo neither push or pull videos are working. On push I get an error message saying No option 'tivo_username' in section: 'Server'. I added my tivo.com username and password and now I'm getting an error message that says: list index out of range. On pull it starts the transfer but nothing happens afterwards. It just stays at pause as it never transfers anything. I assume that my annoying firewall is the problem here but I don't know what to do about it. I've already added all of the relevant programs to the program control. I've even turned off the firewall. What else could I do? Should I uninstall and then reinstall?

    Third, how do I get music and photos to work via pytivo? I had it working via Tivo Desktop but it's not finding a server on my PC with Tivo desktop paused. I looked in the music, photos, and showcases menu and there's nothing there.

    Fourth, do I need to leave the Tivo Desktop server paused for pytivo to work? If so should I just uninstall it?

    Thanks for the help and sorry for the pain in the neck questions.
     
  7. albokay

    albokay New Member

    4
    0
    Aug 4, 2007
    Just found out about pvtivo yesterday and am so mad I didnt find it sooner.

    Anyway, I was able to get it running but ran into a weird issue. Was hoping someone else had the same problem and was able to fix it.

    I have 2 tivos. A series 2 and an TivoHD. The series 2 is going thru a tivo wireless adapter and transfers the movies fine. Slow but thats no big deal.

    Now the TivoHD starts to transfer but then stops at a random point. The last time I tried it stopped at 37 minutes. I tired the same movie for both tivos and series 2 is good. TivoHD is not. My tivoHD is online via a homeplug and not wireless. Was wondering if that was a problem?

    Also my series 2 is on a widescreen tv and I get black bars. The Tivo HD is also on a widescreen tv and plays it in full screen no black bars. Im guessing tivoHD is converting it to full screen thru the HDMI but just want to make sure.

    Thanks to anyone who can shed some light on this problem.

    Update: I tried to transfer uploaded shows from series 2 to HD and it works but I get the black widescreen bars where if i download to HD directly I get no bars. I found that to be weird and makes me think that possibly the HD transfer might be a higher quality and more likely to not be able to transfer.
     
  8. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    @wmcbrine:

    I installed your latest PyTivo (3/19/2009 I think?) and found that all of my files were in the wrong order.

    It appears you have a fix for this, so I "installed" that by stopping the PyTivo service, copying all of the files in your zip over to my PyTivo directory, and re-starting the PyTivo service. I then added "force_alpha" to my share in the config. (force_alpha = true)

    All my files are now showing in the correct alphabetical order, but now, there is a problem. When I go to transfer a file, I now always get the message saying the file will be transferred after previously scheduled recordings have finished transferring. HOWEVER, the file is actually transferring. I can see it going out from the pc, out from the router, and the blue light on my series 3 comes on to indicate that the file is transferring.

    However, it is not listed at all in the now playing list. Viewing the recording history gives the same message about the file being transferred after previously scheduled recording have finished transferring.

    Did I do something wrong by copying the files over to fix the sort issue?

    Furthermore, since it doesn't show up in the "now playing" list, have I basically just lost the part of my Tivo's hard drive that the partial version of the file resides on?

    Thanks in advance for any assistance you can offer.

    (Am running as a service on Windows Vista Home Basic)

    EDIT: Went back to your 8/2008 "stable" RC, and after re-booting my Tivos, this one works except that the included FFMPEG crashes eventually on large files. Perhaps because I only have 1 gig of ram on the machine I'm running it on? (it runs fine on anything less than 1 hour in length, but on movies FFMPEG always crashes somewhere between the 1 and 2 hour mark). Don't know why - there is no error message, just "ffmpeg has stopped working." This has nothing to do with PyTivo per se, though, because just running the included version of ffmpeg from the command line gives the same results. My machine I guess?

    So I've gone back to the May, 2008 version, where the included ffmpeg_mp2 does not work correctly with 5.1 audio, but everything else seems to work fine. (it doesn't crash, anyway!)
     
  9. wmcbrine

    wmcbrine Ziphead

    10,440
    55
    Aug 2, 2003
    Not my latest. Presumably you're talking about the Windows Installer, which makes that rdian06's latest. My latest is what's in my repo.

    No, they were in date-sorted order -- the order actually requested by the TiVo, and indeed the order that the bottom line of the screen described them as being in.

    Not a fix, because it wasn't a bug. Just an option to return to the old behavior, for those who want it.

    You could also have switched to name-sorted by pressing "1". However, that doesn't affect subfolders, because the TiVo still requests them as date-sorted; hence the need for the force_alpha option.

    The blue light indicates that something is transferring, but not necessarily the file you just selected. It sounds like it's retrying a bad transfer, which the other files are queued behind.

    Probably -- rdian06's code was modified from my original, and I assume you overwrote his modifications. But I doubt if that's related to your problem. I think the main effect would be to lose track of the old pyTivo.conf file.

    That's a hell of a conclusion to jump to. No.

    Again -- not mine. I don't brand anything as "stable", nor as "RC".

    :rolleyes: A gig is plenty. I don't even have a system with more than a gig of RAM myself.

    But I've never heard of an issue with ffmpeg like the one you describe.

    I suspect the thing that helped was rebooting the TiVos, not the musical chairs with pyTivo versions.
     
  10. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    Well, first of all, I apologize for the misunderstanding with the verbiage of my post... yes, obviously I'm using the windows installer. I was under the impression that this was, in fact, your code that someone has just built a windows installer around.

    In fact, it even has your name as part of the file name. So you can see how it may be easy to get confused.

    I'll install YOUR code and see what happens, and skip the windows installer version. I REALLY appreciate your help and the fact that you frequent these forums to assist. After all, we get this awesome software for free, so that is totally awesome of you.

    However, along the same lines, I certainly can not expect you to support someone else's modifications to your code. I completely understand that.

    When I say "the wrong order" and you say no it's not the wrong order... again... I didn't use the correct wording. OF COURSE... not the WRONG order like it's a bug or something (didn't mean to imply that), but the wrong order >FOR ME<. I have all of my files named in such a way so that they show up in a certain order (for example, to list all of the James Bond films in chronological order.) I will be more clear and instead say "non-alphabetical order."

    Ok, a bit off of my topic here, but while we're on the subject, I wonder how difficult it would be to make the Tivo list the files in date order as specified by the MetaData rather than the actual file date? That would be a cool feature, I think... but I digress...

    I'm having a hard time building a logical case around that. It just doesn't seem likely. Why would it be "re-trying a bad transfer" only when I select a new file from a clean install?

    To give you some more information, here's what I did:

    I started with clean boot of all systems (even including the router, just to be sure) and made sure nothing was transferring or scheduled to transfer. I then went to the Now Playing list and requested a file from a completely clean install of PyTivo (Yes, new config file and everything). I then got the message on the Series 3 saying that the file would be transferred after previously scheduled recording were finished transferring. THEN the blue light came on, but nothing ever showed up in the now playing list. So, if SOMETHING was transferring as you suggest, what could it possibly be? I don't think that's the case, but you are more knowledgeable about this that I, so maybe you have some ideas?

    (Just FYI, the exact same behaviour repeated itself on the Series 2 Tivos, but they don't give me any kind of indicator to let me know that something is transferring, but I could see FFMPEG running on the host machine and could see it being sent out.)

    That's good to know. I was afraid that my transfer was sitting on my Tivo's Hard Drive but just not showing up in Now Playing. I don't think it was a "hell of a conclusion to jump to" at all. I think it's a perfectly logical hypothesis to make, but as I mentioned, I don't have as good of a technical understanding of the inner workings of the Tivo as you do. (That's why I'm asking for help with your code. Hey... I love PyTivo... what can I say?)

    Of course, you're right. One question though... is the version of FFMPEG included with rdian06's windows installer the same as the one you include? It does seem to me that that's where my problem is.

    Well, now you have. :)

    A good thought, but it doesn't seem likely, since I re-booted the Tivos each time. I really have nailed down the major issue (transfers not completing) to FFMPEG. If you really don't think that it could possibly be a memory problem then I dunno... I got nothing. Could be some kind of incompatibility with my machine, but it doesn't really make sense that it only happens on large files then. I've run FFMPEG from the command line with (basically) no paramters, and the same thing happens every time on files larger than about 500MB.

    I do wonder about the memory issue, because, after all, I am running Windows Vista which as you know is memory-hungry (with 1 gig of ram on Windows Vista home Basic with Python, Java, Galleon, AVG, and Pytivo running, I'm left with 297MB). Also, I tested this by running the included version of ffmpeg on a different windows vista machine... this one with Windows Vista Ultimate, and 2 gigs of ram, and it did not crash. Of course, that doesn't necessarily mean it's a memory problem, but I'm running out of ideas here. Again, this appears to be an ffmpeg problem and not a PyTivo one, but it just doesn't seem to want to work on my machine, where as the ffmpeg_mp2 included with the May, 2008 windows installer version always works. It's very strange.... I wonder what could possibly going on?

    Maybe my next step should be dumping Windows alltogether and installing Ubuntu (that's what you're using, correct?).

    I only run PyTivo and Galleon on that machine and I gather Galleon, being Java, will also run fine under Ubuntu.

    What do you think? It doesn't seem like I'm going to get anywhere with the ffmpeg issue.

    Is it possible to use a different version of ffmpeg with your code?
     
  11. wmcbrine

    wmcbrine Ziphead

    10,440
    55
    Aug 2, 2003
    I don't include any version of ffmpeg with my code. pyTivo is designed to work with pretty much any version, though some of the recent versions of ffmpeg change things in ways that are only accommodated by recent versions of pyTivo.

    Certainly I always recommend Ubuntu over Windows, but you shouldn't have to change OSes just for pyTivo's sake. :) And if this is a problem for Windows users in general, we need to know that so we can fix it.

    If you want more help, please provide more data, like log files. I actually have an idea about the original problem now, based on someone else's post on the pyTivo forum, who had a similar description but included a log file. And I'd ask you to please refrain from further theorizing... it's not helpful.
     
  12. Iluvatar

    Iluvatar New Member

    377
    0
    Jul 22, 2006
    Of course. I would substitute an ffmpeg version that works for you. Just place the new version in your pytivo\bin folder.

    If you run out of version to try you can attempt my personal build that I posted at the pyTivo site.

    Works for me perfectly. To each their own though.
     
  13. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    Yes, I see that now, after looking at your latest .zip

    Actually, you can't help me anymore. Sorry. I'm afraid I'm just not "python-savvy" enough to be able to run this without the "crutch" of the windows installer. I gave it a shot.

    Thanks for your willingness to assist though. I do really appreciate it.
     
  14. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    Thank you so much for pointing me to your version of FFMPEG.
    I tested it with the same file from the command line, and it worked without a hitch. I do notice that your exe is smaller than the one that kept crashing on me. Don't know if that has anything to do with the issue, but it worked well from the command line at least!

    I'm now testing it with PyTivo.

    Thanks again for the help, I really appreciate it!

    EDIT: worked just fine under PyTivo as well. See my next post for what I think the problem actually might have been.
     
  15. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    @wmcbrine:

    Don't read this if you don't want to read my "theorizing" - I'll try to stick to the facts but I do actually have a "theory" based upon available data.

    I posted the above because when trying to "install" your latest PyTivo version I just could not get it to run from the console at all. (I didn't even try it as a service, because I've always wanted to get it to run from the console instead of a service so I could keep an eye on what the heck it's doing.)

    In fact, even going back and using the windows installers (any version) also gave me the same result and I could not get this to run from the console. (I've always ended up running it as a service.) Unfortunately I can't give you the exact error message as I didn't save it anywhere. I apologize for that.

    I basically thought I was just an idiot and maybe didn't know enough about Python to do whatever I needed to do to make it work, even though I was following the instructions.

    THE FACTS:

    I have always installed the windows installer version of PyTivo under "C:\Program Files\PyTivo" on my "Windows Vista Home Basic" machine, which is the directory the installer defaults to.

    While recently researching a completely un-related-to-PyTivo issue, I came across some information out there in the cloud saying that Windows Vista Home Basic has certain restrictions that are not present in the other versions of Windows Vista, and one of these restrictions has to do with how the "Program Files" directory is handled.

    I have not confirmed this information with Microsoft, it's just information I've looked at on various Windows Vista forums and help sites.

    So, remembering this from the other day, I decided to try and "install" your latest PyTivo in "C:\PyTivo" rather than "C:\Program Files\PyTivo"

    It works without a hitch, running from the console.

    NOW MY THEORY:

    Therefore, my "theory" is that because of these restrictions on Windows Vista Home Basic, there is some additional step that would need to be followed to actually make PyTivo run at the console from under the "Program Files" folder on "Windows Vista Home Basic." I don't know what that additional step (or steps) would be, but my THEORY is that this was the root cause of my issues all along.

    I haven't finsihed transferring the same movie that kept crashing ffmpeg on me before, but when it's done I'll let you know how it worked out. (it wasn't just that particular file that crashed ffmpeg before, it's just that I know for certain that one did every time in almost exactly the same place.)

    I do apologize for theorizing after you asked me not to, but I felt that if indeed this could be at the very least "on the right track" that my information and theory might assist someone else out there who finds themself in the same situation.

    And by the way... I do really appreciate the ability to use force_alpha per video share. I have some that I want to use it in, and others that are updated frequently where it's much better not to use it, so thanks for adding that option!

    EDIT/UPDATE: Transfer completed successfully to my S2DT. It does actually show up as "partial" with a time of 2:21. PyTivo reports the length as 2:22. The entire file was transferred though, so I'm assuming this is an issue with that file. FFMPEG didn't give any errors. No other strange behaviour though! WOO-HOO! I'm gonna go buy me a bottle of champagne!

    WE ARE THE KEEPERS OF THE SACRED WORDS: NEE, PENG AND NU-WOM!
     
  16. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Vista locks down the C:\Program Files sub-folders to prevent write access. On Vista Home Premium and Vista Enterprise (the ones I have access to) attempts to write to C:\Program Files sub-folders from python programs trigger a Vista compatibility feature to redirect the file write to a folder within the current user profile. It's possible Vista Home Basic disables this compatibility feature and simply lets the write fail causing your problem.

    pyTivo will sometimes need to write a temp file. With the current Windows installer, I patched wmcbrine's code at the time to change the temp folder to something writeable without triggering Vista's compatibility feature. wmcbrine has more recently updated his code to use python's temp file name feature and so my patch won't be needed anymore. This will get included in the next Windows installer I'm working on.

    The other patch I applied to wmcbrine's code has to do with the location of the pyTivo.conf file. It moved to a common folder rather than being in Program Files. And you wouldn't really notice a problem unless pyTivo tried to write to it, which it really shouldn't do unless you're saving a change in the web admin.

    As for ffmpeg crashing on "large files", I'm guessing you're having problems with divx video or aac audio. There were bugs in ffmpeg that caused timestamp inconsistencies and ffmpeg would stop with a "non-monotone timestamp" error often on certain avi and mp4 files. Unfortunately all my released ffmpeg builds were from code containing the bug.

    Iluvatar's ffmpeg build is from a code snapshot AFTER the bug was fixed, but still contains the 5.1 channel mapping problems inherent in ffmpeg.

    I'm working on a new ffmpeg build that uses the most recent ffmpeg code which mostly fixes the 5.1 channel mapping problem except for AAC 5.1 to AC3 (which is what pyTivo needs to send to the Tivo). I'm trying to patch ffmpeg to fix the AAC 5.1 to AC3 issue and then I'll release a new Windows installer with it.
     
  17. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    It's great to hear from you here as well, as I've been using your installers all along (until today.)

    You're right that these are mp4 files with AAC audio.

    All I have to say about the ffmpeg issue is: OH NOOOOOO!!!!! Why didya have to go and tell me that? ARRRGH.

    Back to square 1. The whole reason I started mucking about with this in the first place was to fix the 5.1 mapping issue.

    <sigh>

    So, if I understand you correctly, there is no version of ffmpeg that won't crash on me on large files AND has the correct 5.1 mapping?

    THANKS FOR RUINING MY DAY! <--- lol, jk, I know it's not your fault :)

    Thanks for your Vista explanation as well. One other factor that may or may not have anything to do with it is that my "Windows Vista Home Basic" is a DELL OEM version (came with the machine). It's possible there could be differences there as well. (Unlikely that it would affect any of this, but don't get me started on Dell in general! lol! Stranger things have happened!)
     
  18. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    I thought it was working! But now that I am finally able to run PyTivo from the console I can finally see exactly what's happening.

    When I request a file from my my Tivo (any Tivo, S2 or S3) and it gives me the BS message about it being transferred after previously scheduled transferes have completed (of which, of course, there are none) what's actually happening is that ffmpeg is barfing on the file. For some reason it keeps trying to decode it and just keeps going... rebooting all systems just continues with the bad decode. It does at least appear to be actually transferring something, since I can watch the light on my Tivo wireless adapater go crazy like it's receiving something, but nothing shows up in the Now Playing List.

    The reason I thought that Iluvatar's FFMPEG was actually working for me was that I was trying it only on .avi files and not my Nero-Digital encoded mp4's.

    I tried about 5 different versions of FFMPEG today, including the one in rdian06's recent windows installer packagaes and Iluvatar's version.

    Same result with all of them, they all barf on my Nero-Digital-Encoded mp4's.

    I went back to the original ffmpeg_mp2.exe that was included with a much older windows installer package, and no more problems.

    This is the version of ffmpeg that has always worked for me (except the 5.1 mess-up, of course.)

    So... HMMMMMM!!!

    What is it about Nero Digital that the newer FFMPEG's don't like but this old version I'm using does? Or, are there some tweaks that I can make to the PyTivo config to make it work? (I've tried all the FFMPEG's from the command line with basically no parameters, and still just barfs on the Nero Digital mp4's while it seems to work with everything else.)

    Also, how do I turn on logging in PyTivo, and will it log my FFMPEG messages?

    Thanks again to ALL that have tried to assist today!

    Edit: can't believe I spent the whole day on this. Ugh!
     
  19. Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    What is showing up in the console when ffmpeg is barfing?

    And no, turning on logging unfortunately will NOT capture all ffmpeg output. You pretty much have to copy and paste from the console.
     
  20. Gavroche

    Gavroche Member

    404
    0
    May 26, 2007
    State of...
    "Error while decoding stream #0.1"

    over and over again.

    Further testing with my mp4 files reveals that it appears to only occur on Nero-Digital-Encoded files with 5.1 audio like this:

    [​IMG]

    For some reason, the much older ffmpeg_mp2.exe handles it fine. Files encoded exactly the same way, but with 2-channel audio, or with mono, also seem to work fine.

    EDIT: Same result when I told PyTivo to convert the audio to 192K, 2-channel, mp2.

    It also took me a while to figure out how to recover from this situation, because once it starts trying to transfer a file like this, it won't let go of it, and nothing else will ever transfer, since I can't cancel it. To recover, I close the PyTivo server (console window), copy over the ffmpeg_mp2 that I know works, and restart PyTivo. At that point, the file will decode normally and display in the now playing list, allowing me to cancel the transfer.
     

Share This Page