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. Nov 9, 2007 #921 of 5684
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    You can always change transcode.py to remove the check for tivocompatible() (or something like that..don't have the source handy at the moment).

    What I did was change the "if tivo_compatible()" to "if 1" right before the call to FFMPEG. I'm sure there are better ways, but that seemed pretty easy.
     
  2. Nov 9, 2007 #922 of 5684
    MasterCephus

    MasterCephus New Member

    309
    0
    Jan 2, 2005
    Hueytown,...
    Just wondering, but does the person who develops pyTivo look at this thread often?

    If the person doesn't wouldn't it be a good idea to voice the problems to the person and maybe the coders and the developer could get together and try to figure out some of the major problems (subfolders, etc) and they could also prioritize some of the bugs and features?

    Just wondering...
     
  3. Nov 10, 2007 #923 of 5684
    smilerz

    smilerz Guest

    7
    0
    Nov 9, 2007
    I've been thinking about the subfolder issue and think I have a potential fix. Unfortunately I don't know enough about Python to test the theory. It could possibly offer performance enhancement too. Perhaps someone that knows the code could run with it or let me know if its just not possible.

    If you abstract the actual file structure from Tivo by storing the library in an XML document you can present all of the videos in a flatter directory structure. For instance, if you had a file directory like this:

    /videos/TV/
    /XFiles/
    /Season 1/
    /Season 2/
    /Buffy/
    /Season 1/
    /Season 2/
    /videos/Movies/
    /Star Wars/
    /X-Men/
    /Kill Bill.avi
    /Resevoir Dogs.avi

    You could have a process populate Library.xml like this:

    <Container>TV
    <Folder>XFiles - Season 1
    <Video>Episode 1
    <FilePath>/videos/tv/XFiles/Episode1.avi</FilePath>
    <checksum>12345566</checksum>
    <TivoCompat>0</TivoCompat>
    </video>
    ...
    </folder>
    <Folder>XFiles - Season 2
    <Video> ....
    <video>

    </Folder>
    </Container>
    <Container>Movies
    .....
    </container>

    etc, etc.
    when browsing with Tivo you would just get a single level of folders without completely rearranging your library.
    Xfiles - Season 1
    Xfiles - Season 2
    Buffy - Season 1
    Buffy - Season 2
    Movies - Star Wars
    Movies - XMen
    ...
    This would also provide a cached version of the library with all of the necessary information without having to spawn ffmpeg to check the files everytime. It would only check if the checksums were different.
    The library population could be kicked off at service start or on demand.

    thoughts?
     
  4. Nov 10, 2007 #924 of 5684
    TheAmigo

    TheAmigo New Member

    13
    0
    Dec 28, 2001
    Glendale...
    I don't know python either, but was able to hack in similar concept:
    recursive dir hack

    But since folders don't work at all making it look like a single level doesn't really help (9.2 didn't fix it either).

    There is a workaround though...
    - Create a folder at the top of each share called "AAA - tivo bug" (or whatever).
    - When a request for a folder index is received, wait ~.5sec... if any others are received in that time, answer all requests with the folder listing for the folder not named "AAA - tivo bug".

    To the user, it means that when you first boot your tivo, when you browse into a pyTivo share, you have to click on the "AAA - tivo bug" folder first. After that, all other folders would work fine.

    But like I said earlier, I don't know python, so I can't code that... I've started learning it though because I really want this to work!
     
  5. Nov 10, 2007 #925 of 5684
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    I'm just getting up to speed on python right now by reading the excellent on-line manuals at the python site. It's actually a pretty neat language. Coming from a very extensive C background makes it fairly easy to understand what's going on. I would imagine it would be even easier for a Java coder.

    The recursive hack could definitely be implemented as a short-term fix for the folders problem. I might attack the problem slightly differently code-wise, but I think the solution you propose should work.

    When I get some time, and get a little more confident in my python ability, I think I might take a crack at it.
     
  6. Nov 10, 2007 #926 of 5684
    fred2

    fred2 New Member

    509
    0
    Jan 20, 2006
    I'm new and accidently created "shares" (names) that I do not want and I cannot figure out how to DELETE them. I have tried manually editing the CONF file but something is amiss.

    I have tried stopping the service (Manage under MyComputer) and editing.

    Any other ideas for newbies?

    In other words H E L P!!!

    Thanks
     
  7. Nov 10, 2007 #927 of 5684
    Tobashadow

    Tobashadow Read over there --->

    2,340
    0
    Nov 11, 2006

    What i normaly do is to open the pytivo config program and the config file at the same time.

    i delete the share section i dont want (or edit it) then save the config file and hit restart pytivo service button on the config program.

    That should do it.
     
  8. Nov 10, 2007 #928 of 5684
    wgw

    wgw New Member

    217
    0
    May 16, 2007
    One way to handle the subfolder problem until a Tivo or pyTivo fix comes along is to create Hard Links to all of the files in the tivo folder, all subfolders or any other folder on the same drive. Place all the hard links in the root of a different folder and then point pyTivo to the folder with the hard links instead of the folder with the actual files. All of the files appear to pytivo (or Tivo Destop) in one folder.

    Works fine but you have to manually select all the files in each subfolder and create the links. I have not found a program that will scan a folder and all subfolders and then create hardlinks. Any volunteers to create one?

    Here are links to a couple Windows shell extention programs I'm using.

    http://schinagl.priv.at/nt/hardlinkshellext/hardlinkshellext.html
    http://forge.novell.com/modules/xfmod/project/?ntfslink

    The option to create hard links using the right mouse button to drag and drop files to the link folder works well.
     
  9. Nov 11, 2007 #929 of 5684
    John Slider

    John Slider New Member

    48
    0
    Apr 16, 2006
    I'm a newbie at this, I have everything set up to the point that it shows up on my Now Playing list, but whenever I go into any of my folders it shows up as containing the file from the first folder.

    Like lets say I have it set up:
    Now Playing List > PC: MyTelevision >
    Folder (0)
    Folder (0)
    Folder (0)
    Folder (0)
    Folder (0)
    Folder (0)

    Yes, it actually has (0) when I actually have about 12-24 files in each folder... It doesn't matter which folder I go into it shows the contents from the very first folder on the list, also when I close the commandprompt the source folders in my Now Playing list disappear. :S

    Could it be a problem that some of the folders have a folder inside of it that you must go through in order to get to the media files. Also 99&#37; of the media files are AVI's if that's a problem.

    I running on that pyTIVO thing..

    EDIT: I just read there is some sort of glitch with subfolders, got it, but does TTG+ have a glitch with subfolders?
     
  10. Nov 12, 2007 #930 of 5684
    fred22

    fred22 New Member

    41
    0
    Nov 11, 2007
    Hmm. I still have problems. I have tried adding an MP3's section and it won't take.

    Also I noticed that my slashes backslashes seem, well, arbitrary.

    Ex:

    [Space]
    path = C:/Program Files/pyTivo
    type = video

    [MyMovies]
    type = video
    path = L:\Movies\Various
     
  11. Nov 12, 2007 #931 of 5684
    glaviolette

    glaviolette New Member

    25
    0
    Nov 12, 2007
    John,

    I have the EXACT same problem, however mine is with Galleon, so I'm wondering if it's a Fall 2007 update issue? Also, if there is more than one page I can't scroll to the next page. I've had to go back to Tivo Desktop. Bleh... It works, but I miss the folder groups..

    Anyone else have similar issues??
     
  12. Nov 12, 2007 #932 of 5684
    BrianAZ

    BrianAZ Back on the wagon

    386
    0
    Aug 13, 2007
    Chandler, Az
    I believe there was something posted on one of these forums indicating that with a recent update, Tivo removed some piece of code that would tell the servers (pyTivo/Galleon/etc) that it was exiting a directory. Something like that. I don't think anyone's found a resolution to it yet.
     
  13. Nov 12, 2007 #933 of 5684
    glaviolette

    glaviolette New Member

    25
    0
    Nov 12, 2007
    Brian,

    Thanks for the quick reply and additional confirmation. John, after searching further I found this post (http://www.tivocommunity.com/tivo-vb/showthread.php?t=373469) that has a workaround that works for me. It isn't elegant, but what what else can you do! :p
     
  14. Nov 13, 2007 #934 of 5684
    Tobashadow

    Tobashadow Read over there --->

    2,340
    0
    Nov 11, 2006
    You have to pick a direction so it knows what its looking for.

    Example: My config file

    Code:
    [Start Cooking]
    path = C:/Documents and Settings/Administrator/My Documents/My Music/iTunes/iTunes Music/Podcasts/Start Cooking videoblog
    type = video
    
    [Ctrl-Alt-Chicken]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/Ctrl+Alt+Chicken (Large Xvid)
    
    [AmateurLogic.TV]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/AmateurLogicTV (Video)
    
    [Movie Trailers]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/TrailerCast Large mov
    
    [Diggnation]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/Diggnation (Large Xvid)
    
    [GeekBrief]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/GeekBriefTV  Windows Media Edition (Beta)
    
    [Systm]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/Systm (Large Xvid)
    
    [Movies]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/Movies
    
    [TV Show's]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/TV Show's
    
    [Server]
    ffmpeg = C:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
    video_br = 2048k
    width = 544
    path = /media/media/video
    debug = true
    guid = {4B91BDFF-2960-4D7B-9877-DECA4ECA2B15}
    port = 9032
    
    [TekZilla]
    type = video
    path = C:/Documents and Settings/Administrator/My Documents/Pytivo/Tekzilla (Large WMV)
    You notice the line that say's, path = /media/media/video ?

    And notice all my folder's go with the / instead of the \ .

    Feel free to edit mine to fit your needs.
     
  15. Nov 13, 2007 #935 of 5684
    mulscully

    mulscully Member

    321
    0
    May 31, 2003
    Malvern, Pa
    OK, so I am been looking through the thread, does anyone know the reason for my problem???
     
  16. Nov 13, 2007 #936 of 5684
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    d is acquired at line 255 :

    Code:
    [FONT="Courier New"][SIZE="2"]    durre = re.compile(r'.*Duration: (.{2}):(.{2}):(.{2})\.(.),')
        d = durre.search(output)[/SIZE][/FONT]
    It looks like it's trying to parse through the output of the initial ffmpeg pass (which is being written to stderr). Specifically, it's looking for the duration of the video file in question. Apparently, in your case, it can't find it. So, you've likely got a poorly encoded video file. pyTivo is kicking an exception because there isn't any error checking being done to ensure that 'd' has a valid value before it's used.

    If you look down a few lines, you'll see how 'x' is being handled properly. This is how 'd' should be handled as well. Try this (keep the spacing and indentation, it's important in python) :


    Code:
    [FONT="Courier New"][SIZE="2"]
        durre = re.compile(r'.*Duration: (.{2}):(.{2}):(.{2})\.(.),')
        d = durre.search(output)
    
        if d:
            millisecs = ((int(d.group(1))*3600) + (int(d.group(2))*60) + int(d.group(3)))*1000 + (int(d.group(4))*100)
        else:
            info_cache[inFile] = (mtime, (None, None, None, None, None))
            debug_write(['video_info: failed at duration\n'])
            return None, None, None, None, None
    [/SIZE][/FONT]
    I've entered ticket #30 into pyTivo so that armooo can fix this properly.
     
  17. Nov 13, 2007 #937 of 5684
    Chew

    Chew New Member

    284
    0
    Jan 22, 2003
    I tried to make use of the transcode.py file and pyTiVo did not read any of the files in my folders. I replaced yours with my old copy and it went back to reading the files, but would not transfer anything. Then I replaced all of the files with a copy from a working version and now my folders don't even show in the NPL at all!

    Now what do I do? Can't live without my pyTiVo. :(
     
  18. Nov 14, 2007 #938 of 5684
    Chew

    Chew New Member

    284
    0
    Jan 22, 2003
    Uninstalled pyTivo, removed the service, rebooted, reinstalled, restarted the service, rebooted.

    All's good. :up:
     
  19. Nov 14, 2007 #939 of 5684
    designbot

    designbot Internet Cliché

    77
    0
    Mar 29, 2002
    Atlanta, GA
    I'm trying to follow the installation instructions here to install PyTiVo for the first time on my Intel iMac running Mac OS X 10.5.

    Specifically, I installed MacPorts, and then tried to run the following commands in terminal:
    Code:
    sudo port selfupdate
    
    sudo port install lame
    
    sudo port install subversion
    
    sudo port install ffmpeg +lame +libogg +vorbis +theora +faac +faad +xvid +x264 +a52 +dts
    
    Installing MacPorts and LAME seemed to go fine.

    When I tried to install Subversion, though, I got this error:
    Code:
    Error: The following dependencies failed to build: apr-util sqlite3 neon openssl zlib
    Error: Status 1 encountered during processing.
    I also noticed that the "installation instructions" don't actually tell you how to install or run pyTivo itself. Where do I need to put it, and how do I make it go? :)
     
  20. Nov 14, 2007 #940 of 5684
    wmcbrine

    wmcbrine Ziphead

    10,368
    22
    Aug 2, 2003
    You don't need subversion to run pyTivo. I dunno why that's in the instructions.

    You can put it anywhere (no installation needed, really), and run it by typing "python pyTivo.py" in Terminal.
     

Share This Page