pyTivo auto pushes

Discussion in 'TiVo Home Media Features & TiVoToGo' started by moyekj, Oct 18, 2009.

  1. caddyroger

    caddyroger New Member

    1,730
    1
    Mar 14, 2005
    Some where...

    Advertisements

    never mind I tried taking the pytivo.conf from the end and it started to work.
     
  2. Dec 4, 2010 #182 of 216
    tjtv

    tjtv Member

    43
    2
    Jul 3, 2007
    Hi,

    I was wondering if it would be possible to modify this program, such that it only pushes certain file types. I pre-process all of my mkv files, by extracting the audio/video streams and remuxing to mp4. After the processing is done, I'm left with a valid mp4 file, and the mkv file is deleted. I'd like to be able to have the mp4 auto-pushed, but I don't want the mkv to be pushed.

    Any hints you can give me to where I should start looking to made this modification?
     
  3. Dec 4, 2010 #183 of 216
    ebf

    ebf New Member

    542
    0
    Mar 21, 2005
    Can't you just have your mkv file outside of the push location and setup your processing app to put the resulting file in the push location?
     
  4. Dec 5, 2010 #184 of 216
    tjtv

    tjtv Member

    43
    2
    Jul 3, 2007
    Thanks. I've changed my processing script to move the file to the push location. Can't believe I didnt' think of that!

    One other question. I have two tivos. I have a folder that I want to be auto-pushed to BOTH tivos. Is there any easy way to accomplish this?
     
  5. Dec 5, 2010 #185 of 216
    Phantom Gremlin

    Phantom Gremlin Active Member

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

    Advertisements

    I don't know the answer to your question, because I don't auto-push. But I wanted to highlight your question as being exactly the type of thing that TiVo should be making very easy to do. TiVo can easily differentiate themselves from the "cheaper" cable company DVR by doing stuff like this; all kinds of stuff like this. Everybody should be raving about how flexible and how powerful the TiVo boxes are. But, alas, accomplishing anything that's even slightly out of the ordinary is left to third party programs and third party forums.
     
  6. Dec 7, 2010 #186 of 216
    tjtv

    tjtv Member

    43
    2
    Jul 3, 2007
    After spending a few hours learning how to use svn to checkout the source, learning a bit about java, and how to compile build.xml with ant I think I found a solution that works for me. It's a piece of code that I hardcoded, since I don't have the time/skill to understand the source code to determine how the gui works and how the config file is read.

    The original piece of code in the auto_push.java file is:
    if (watching.get(videoFile).get("mtime").equals(mtime) && watching.get(videoFile).get("size").equals(size)) {
    // File is not changing so push it and mark it as processed
    log.print("pushing file: " + videoFile);
    if( push(tivoName, share, path, videoFile) ) {
    watching.get(videoFile).put("status", "pushed");
    config.appendTrackingFile(share, path, file.basename(videoFile));
    }
    }

    I modified it to be:
    if (watching.get(videoFile).get("mtime").equals(mtime) && watching.get(videoFile).get("size").equals(size)) {
    // File is not changing so push it and mark it as processed
    log.print("pushing file: " + videoFile);
    if( push(tivoName, share, path, videoFile) ) {
    watching.get(videoFile).put("status", "pushed");
    config.appendTrackingFile(share, path, file.basename(videoFile));
    }
    log.print("pushing file: " + videoFile);
    if( push("Bedroom", share, path, videoFile) ) {
    watching.get(videoFile).put("status", "pushed");
    config.appendTrackingFile(share, path, file.basename(videoFile));
    }
    }

    It's ugly, and I'm not really sure what the watching.get.... line and config.appendTrackingFile.... line really do and if I should have duplicated them, but it seems to work for me so far.

    Thanks again for writing this great program, and for providing the source so that I could modify it for my needs.
     
  7. Jan 8, 2011 #187 of 216
    robbroy

    robbroy New Member

    26
    0
    Feb 21, 2002
    I use pytivo, streambaby and autopush on my Tivo HD.

    Recently, videos in my ubuntubox autopush push folder stopped transcoding in realtime and I am rewarded with checkback in x hours box if I move to play the transcoding file. If I do a pytivo or streambaby pull from the Tivo box on the same material from the same location, however, realtime transcoding is not a problem.

    Any clues on what's going on?
     
  8. Chew

    Chew New Member

    284
    0
    Jan 22, 2003
    Is there anyway to automatically grab metadata before auto-pushing?

    It's the only thing missing from the perfect "hands-free" pytivo set-up. :)
     
  9. Feb 9, 2011 #189 of 216
    robbroy

    robbroy New Member

    26
    0
    Feb 21, 2002
    I am trying to get the python script to work on my Debian install.

    I have a low power Debian pyTivo server installed on a pogoplug and everything works fine. I can push to the tivo from my desktop and pull onto the tivo from the Debian box. I am trying to configure the auto_push.py script to work with my install. I am not using the java script because of the overhead of java.

    When I run python auto_push.py, I get essentially the message quoted below by an earlier poster, so I figure I share his config problem:

    Since I am using Debian, my edits are as follows:

    I think I have the same problem in that the pointer to ffmpeg is incorrect. Just a different operating system.

    I have tried the variations of "//" versus "/" in the path statement to point to ffmpeg at /usr/bin to no avail. I just can't get the syntax right. Can someone help?

    Any help would be appreciated.
     
  10. Feb 9, 2011 #190 of 216
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,089
    0
    Apr 19, 2004
    East Moline, IL
    Are file extensions not used in Debian? That was my issue: I didn't specify ffmpeg.exe. How do you know what files are executable programs and what are data?
     
  11. Feb 9, 2011 #191 of 216
    robbroy

    robbroy New Member

    26
    0
    Feb 21, 2002
    Are file extensions not used in Debian? That was my issue: I didn't specify ffmpeg.exe. How do you know what files are executable programs and what are data?

    The Debian executable is /usr/bin/ffmpeg with no .exe or any other extension. In windows I would use <path to>ffmpeg.exe

    On my setup, my pyTivo.config points to /usr/bin/ffmpeg and transcodes fine.

    I think my problem involves nesting "/" in the pointer to ffmpeg.
     
  12. Feb 9, 2011 #192 of 216
    wmcbrine

    wmcbrine Well-Known Mumbler

    11,861
    900
    Aug 2, 2003
    File extensions are not used for executables in Debian (or Linux generally), no; and double slashes are not used for paths. The only reason backslashes are doubled is that the single backslash is the escape character; the forward slash doesn't have that problem.
     
  13. Feb 9, 2011 #193 of 216
    orangeboy

    orangeboy yes, I AM orangeboy!

    4,089
    0
    Apr 19, 2004
    East Moline, IL
    Interesting. I've only had very limited unix exposure with IBM's z/OS Unix System Services. The folks where I worked didn't embrace the exploitation offered, so mostly I dealt with configuration stuff, such as setting up the tcpip stack, ftp daemon, and resolver parms.

    Edit: I wish I still worked on a 'frame. I see this port: python-MVS. Would've been fun to play with :D
     
  14. Feb 9, 2011 #194 of 216
    robbroy

    robbroy New Member

    26
    0
    Feb 21, 2002
    When I remove all coding to the isVideo file check, autopush works for a while but then crashes out probably because of my removing the file check.

    So the problem is definitely related to why auto_push.py is not reading:

    ffmpeg = "/usr/bin/ffmpeg"

    as the path to ffmpeg (which should be the correct syntax for the auto_push script in Debian).

    Could I have a permission or ffmpeg version issue. I'm running both pytivo and auto_push.py as root on a version of ffmpeg which pytivo transcodes.
     
  15. moyekj

    moyekj Well-Known Member

    12,282
    936
    Jan 23, 2006
    Mission...
    What's the python stack trace look like exactly? i.e. post it here. If you can execute /usr/bin/ffmpeg on the command line as root and it works then I don't see any reason why python system call should fail.
    Note that the isVideo check is to guard against trying to push non-video files (such as accompanying metadata files).
     
  16. robbroy

    robbroy New Member

    26
    0
    Feb 21, 2002
    Here's some more info:

    When I run python auto_push.py, I get:

    My edits to auto_push.py in bold:

    when I call ffmpeg, I get

    Whereis ffmpeg results in:

    I hope this helps.
     
  17. robbroy

    robbroy New Member

    26
    0
    Feb 21, 2002
    I never solved the problem with auto_push.py finding /usr/bin/ffmpeg.

    I even set up a test rig, reinstalled everything from sources and reproduced the problem.

    In the end I modified the script replacing the ffmpeg video check with a check for a video variable before passing the file to pyTivo:

    So far it works but chokes on illegal characters which I gather is more a pyTivo issue than an auto_push issue.

    I also had to rename DVR 3402 to DVR_3402 to fight off a host of other errors.
     
  18. caddyroger

    caddyroger New Member

    1,730
    1
    Mar 14, 2005
    Some where...
    What entries can deleted for this to work ok.

    [Admin]
    tivo_mak = xxxxxxx
    type = admin
    togo_path = G:\FROM THE TIVO

    [handlers]
    keys = console,rotfile

    [Server]
    tivo_password = xxxxxxx
    tivo_mak = xxxxxxxxxxx
    ffmpeg = C:\Program Files\pyTivo\bin\ffmpeg.exe
    temp = C:\Users\Public\Documents\pyTivo
    tivodecode = C:\Program Files\pyTivo\bin\TIVODECODE
    tdcat = C:\Program Files\pyTivo\bin\tdcat
    beacon = xxxxxxxxxxxx
    togo_path = G:\FROM THE TIVO
    tivo_username = xxxxxxxxxxxxxxxxxxxxx
    port =9032

    [formatter_basicform]
    format = %(asctime)s %(levelname)-5s %(name)s: %(message)s

    [handler_rotfile]
    formatter = basicform
    class = handlers.RotatingFileHandler
    args = ('C:\Users\Public\Documents\pyTivo\debug.log', 'a', 10485760, 5)

    [_tivo_HD]
    def ishdtivo(tsn) = # tsn's of High Definition Tivo's
    return bool(tsn and tsn[:3] in ['648', '652', '658', '663', '748', '746'])

    [logger_root]
    handlers = console,rotfile
    level = DEBUG

    [formatters]
    keys = basicform
     
  19. Aug 9, 2011 #199 of 216
    johnjay829

    johnjay829 New Member

    41
    0
    Jan 2, 2007
    i'm getting double entries in the auto push txt file sending the video twice to my tivo. in the folder i'm saving the video file and a metadata file with the same name with.txt. example is:

    Movie.avi
    Movie.avi.txt

    update: tried just saving only an .avi file in the autopush folder still getting double entries in the txt file and on the tivo
     
  20. Sep 1, 2011 #200 of 216
    jcncamsdad

    jcncamsdad New Member

    5
    0
    May 1, 2009
    I have two Tivos and I am running Pytivo and Kmttg with no problems. I am trying to setup Auto Push, but it will not show my Tivos in the Tivo window. I can push through the web page and kmttg. What have I done wrong?
     

Share This Page

spam firewall

Advertisements