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

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Or not. There's nothing wrong with shaing both. I have multiple shares, one consisting only of hard links, all the others consisting of symlinks.
     
  2. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    A symlink is merely a pointer to a directory entry. Some operations, such as reading and writing, typically occur on the data contained in the file referenced by location pointed to by the symlink. Delete operations and certain ohter manipulations on a symlink, however, should only access the link, not the data. A symlink is typically less than 2K in size.
     
  3. jbernardis

    jbernardis New Member

    1,072
    0
    Oct 21, 2003
    Princeton NJ
    The way I think of it is that a file is physically identified by a number, known as an inode. A directory entry is merely a reference to that inode. When you create a hard link, you are making a second reference to that same inode. The inode knows it is being pointed to by 2 (or more) directory entries. When you delete a file, you are actually deleting a directory entry and decrementing the reference count in the inode. When the reference count reaches 0, the inode is physically deleted and the space is freed. It is very difficult (if not impossible) to break a hard link.

    A symbolic link is actually a directory entry that refers symbolically to another directory entry. The inode reference count in this case is still 1. If you delete the actual directory entry, you also delete the inode, and the symbolic link is now broken. If you delete the symbolic link, the original entry, and therefore the inode, knows nothing of what you did.
     
  4. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Only on *nix file systems, and not on all file systems on *nix computers, at that. I don't think the ISO 9600 file system employs indoes, for example, even when mounted on a *nix computer. I couldn't swear to it, though.

    Only on *nix systems. Windows file systems handle things quite a bit differently.

    That's in *nix. Windows actually does suport hard links on NTFS file systems, but they are arcane and difficult to create and manage. Consequently, no one uses (and few people even know about) hard links in Windows.

    That's also why one can freely move files in *nix, as long as the movement does not span logical volumes, without disturbing any reads or writes that are underway. I frequently rename files while the application is writing them. Try that in Windows and it whines about the file being in use.

    Windows symlinks, or "shortcuts" as they are called, work similarly in some respects and differently in others.

    Well, not quite. As you mention, there can be multiple hard links, and deleting only one when there exists more than one does not free up the inode. (One does not actually delete an inode, and even when the hard link counter reaches zero, the inode is not released if some process has the file open.) Nonetheless, if the hard link happens to be the directory entry to which the symlink points, then the symlink is broken, even though the inode is still in use by the file. What's more, one does not have to delete the hard link. Simply renaming it will break the symlink.

    Or rename it, move it to another drive, whatever. As long as the directory entry to which the symlink points remains unchanged, however, the symlink remains intact. It is noteworthy hard links cannot span logical volumes, which symlinks can. Moving or copying a symlink happens in the blink of an eye. Moving a hard link within the confines of a mount point is similarly instantaneous, but issuing a mv command from one volume to another can takes hours or even days, depending on the size of the file and the transfer speed of the I/O system. What actually happens in this case is the file is copied to the foreign file system, a new hard link is created, and the hard link counter for the old inode is decremented by one. If the hard link counter is then zero, the inode is released.
     
  5. orangeboy

    orangeboy yes, I AM orangeboy!

    4,083
    0
    Apr 19, 2004
    East Moline, IL
    I'm not sure I'd agree with all your statements, lrhorer. I frequently use hardlinks in Windows using the FSUTIL command with the appropriate hardlink create switches, and find it quite a bit more convenient to reference the same file by two different applications. It may be just good timing on my part, but I've not encountered the "file in use" problem with such files. Testing the number of links a files has can be accomplished with the HLSCAN command found in various Resource Kits or Support Tools for Windows.
     
  6. lrhorer

    lrhorer New Member

    6,922
    0
    Aug 31, 2003
    San...
    Yes, but how many people know about the FSUTIL command or how to use it? What's more, it only works on NTFS file systems, not FAT.

    I think you misunderstand. Forget about FSUTIL. Take a large file, say a video file, and perform some sort of write operation on it. As an example, take, say, a 10GB file named video.mpg and in one window, issue the command

    Code:
    copy video.mpg video1.mpg
    Depending on the speed of your I/O subsystem, that should take at least a few minutes to complete. Now in a second window, issue the command

    Code:
    ren video1.mpg video2.mpg
    You will get an error. Try:

    Code:
    move video1.mpg <directory name>
    and you will get the same error. You will also get the same error if you try dragging the file from one window to another. Try doing the same thing with an ftp client, and you will get the same error.

    Not so with Linux. I have scripts, for example, that perform automatic file processing, including moving the files to specific directories and renaming them, while programs like kmttg, VideoRedo, or VAP are creating them. I never have to worrry about whther the apps are done writing to the files, or any such nonsense. I just rename them and / or move them however and wherever I like, as long as I don't attempt to move them outside of the mount point. I never have to wait for a web download to complete in order to rename or move the file.

    I never claimed otherwise. Again, however, how many people know about HLSCAN?
     
  7. enclave000

    enclave000 New Member

    11
    0
    Jan 8, 2011
    does this support subtitles in mkv files?
     
  8. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    Nope.
     
  9. innocentfreak

    innocentfreak Active Member

    8,950
    3
    Aug 25, 2001
    Florida
    I am wondering if my Premiere is dying or if there is something with PyTiVo pushes that my TiVo is hiccuping on. In the last month my TiVo started rebooting, and I noticed this only happens during a push. Sometimes I have no issues and then sometimes a couple episodes will transfer fine and then reboot in the middle of another transfer.

    Any ideas?

    This is over a wired connection and my PC is sending them from my WHS via a network share. I am usually pushing AVIs or MKVs. It may just be a bug in 14.8, but I wasn't sure if you knew of anything else that might cause this.
     
  10. toddeades

    toddeades New Member

    36
    0
    Jul 21, 2002
    I've been trying to get pyTivo working for a few days. While I've been able to get the Push to work I can't get the list of videos to be shown on the NPL.

    I see the "MyMovies" option at the bottom on the NPL but I when I select it, it says that I don't have any recordings.

    Here is my config:

    HTML:
    [Server]
    port = 9032
    ffmpeg = c:\Program Files\pyTivo\bin\ffmpeg.exe
    tivo_password = xxxxxx
    tivo_username = xxxxxx
    debug = true
    tivodecode = C:\Program Files\pyTivo\bin
    beacon = 192.168.0.255
    
    [MyMovies]
    type = video
    path = c:\videos
    
    [_tivo_SD]
    
    [_tivo_HD]
    
    
    I do see this message on the console when I select "MyMovies" on my tivo.

    HTML:
    INFO:pyTivo:192.168.0.117 [26/Jul/2011 17:53:02] "GET /TiVoConnect?Command=Query
    Container&Container=%2F HTTP/1.0" 200 -
    ERROR:pyTivo:Exception during request from ('192.168.0.116', 33021)
    Traceback (most recent call last):
      File "C:\Python27\lib\SocketServer.py", line 582, in process_request_thread
        self.finish_request(request, client_address)
      File "C:\Python27\lib\SocketServer.py", line 323, in finish_request
        self.RequestHandlerClass(request, client_address, self)
      File "C:\Program Files\pyTivo\httpserver.py", line 64, in __init__
        client_address, server)
      File "C:\Python27\lib\SocketServer.py", line 639, in __init__
        self.handle()
      File "C:\Python27\lib\BaseHTTPServer.py", line 343, in handle
        self.handle_one_request()
      File "C:\Python27\lib\BaseHTTPServer.py", line 313, in handle_one_request
        self.raw_requestline = self.rfile.readline(65537)
      File "C:\Python27\lib\socket.py", line 476, in readline
        data = self._sock.recv(self._rbufsize)
    error: [Errno 10035] A non-blocking socket operation could not be completed imme
    diately
    INFO:pyTivo:192.168.0.116 [26/Jul/2011 17:55:02] "GET /TiVoConnect?Command=Query
    Container&Container=%2F HTTP/1.0" 200 -
    A Few Notes:
    • I'm running the latest "master" version from wmcbrine from this location:

    http://repo.or.cz/w/pyTivo/wmcbrine.git/snapshot/d2e63d53ecdaf80ce39ad134e7e8466b58c75dcb.zip

    • I have UDP port 5353 open
    • I've even just turned off the Windows Firewall.
    • I have Vuze installed and I use it to copy videos to my Tivos. I've tried with it running and not running, can't get pyTivo working either way.
    • I have Tivo Desktop installed but have the server stopped.

    Anyone have any ideas?

    Thanks!
    Todd
     
  11. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    Huh, that's a new one. And this is repeatable -- the same message every time?
     
  12. toddeades

    toddeades New Member

    36
    0
    Jul 21, 2002
    Yes, every time.

    I was trying to think what might make my computer different and the only think I came up with was that I had pyTivo installed a couple of years ago as a Service. I couldn't figure out how to remove the services so I just disabled it. Deleted the entire contents of the pytivo folder and copied the new code base over.

    Other then that I can't think of anything.
     
  13. bwall23

    bwall23 New Member

    73
    0
    Jun 8, 2009
    If you're running it on Vista or Win7, install it to a different directory. If installed to C:\Program Files or C:\Program Files (x86) you will have problems.

    I setup a pyTivo.cmd file to launch it since double-clicking the pytivo.py file would not start python.

    pyTivo.cmd file contents;
    Code:
    C:
    CD [I]C:\path_where_you_extracted_pytivo[/I]
    [I]C:\path_where_python_is_installed[/I]\python.exe "[I]C:\path_where_you_extracted_pytivo[/I]\pyTivo.py"
    EXIT
    Replace C:\path_where_you_extracted_pytivo with the path to your pyTivo installation. In my case it's C:\pyTivo

    Replace C:\path_where_python_is_installed with the path to your Python installation. In my case it's C:\Python26, in your case it's C:\Python27

    So the example would be;
    pyTivo.cmd file contents;
    Code:
    C:
    CD C:\pyTivo
    C:\Python27\python.exe "C:\pyTivo\pyTivo.py"
    EXIT
     
  14. wmcbrine

    wmcbrine Ziphead

    10,364
    22
    Aug 2, 2003
    I really don't think that's the issue here. Not that I have anything helpful to offer in its place yet.
     
  15. Aug 3, 2011 #3075 of 5683
    toddeades

    toddeades New Member

    36
    0
    Jul 21, 2002
    I tried moving it out of the program file folder and I'm getting the same errors.
     
  16. Aug 7, 2011 #3076 of 5683
    loganasu

    loganasu I'm a lurker

    286
    0
    Jan 17, 2005
    I am having trouble pulling files off of the TiVo.

    The following is from my log:

    Code:
    
    INFO:pyTivo.beacon:Announcing shares...
    INFO:pyTivo.beacon:Registering: MyMovies
    INFO:pyTivo.beacon:Scanning for TiVos...
    INFO:pyTivo.beacon:HDTivo
    INFO:pyTivo.beacon:LivingRoom
    INFO:pyTivo.beacon:Life-Down
    INFO:pyTivo:pyTivo is ready.
    INFO:pyTivo:10.0.0.10 [07/Aug/2011 11:38:51] "GET /TiVoConnect?Command=QueryCont
    ainer&Container=%2F&DoGenres=1 HTTP/1.0" 200 -
    INFO:pyTivo:10.0.0.11 [07/Aug/2011 11:38:51] "GET /TiVoConnect?Command=QueryCont
    ainer&Container=%2F HTTP/1.0" 200 -
    INFO:pyTivo:10.0.0.6 [07/Aug/2011 11:38:52] "GET /TiVoConnect?Command=QueryConta
    iner&Container=%2F HTTP/1.0" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:06] "GET / HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:06] "GET /main.css HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:11] "GET /TiVoConnect?Command=NPL&Cont
    ainer=ToGo&TiVo=10.0.0.10 HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:11] "GET /main.css HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:11] "GET /folder.png HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:11] "GET /soon.png HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:11] "GET /nocopy.png HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:11] "GET /expired.png HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:13] "GET /TiVoConnect?Command=NPL&Cont
    ainer=ToGo&Folder=37283&TiVo=10.0.0.10 HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:13] "GET /main.css HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:13] "GET /back.png HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:13] "GET /expired.png HTTP/1.1" 200 -
    INFO:pyTivo.togo:[07/Aug/2011 11:39:21] Queued "http://10.0.0.10:80/download/Who
    se Line Is It Anyway?.TiVo?Container=/NowPlaying&id=640429" for transfer to E:\M
    edia\Media\Tivo
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:21] "POST /TiVoConnect HTTP/1.1" 200 -
    
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:27] "GET /TiVoConnect?Command=NPL&Cont
    ainer=ToGo&Folder=37283&TiVo=10.0.0.10 HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:27] "GET /main.css HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:27] "GET /back.png HTTP/1.1" 200 -
    INFO:pyTivo:10.0.0.104 [07/Aug/2011 11:39:27] "GET /expired.png HTTP/1.1" 200 -
    INFO:pyTivo.togo:[07/Aug/2011 11:39:27] Start getting "E:\Media\Media\Tivo\Whose
     Line Is It Anyway? - 640429.TiVo" from LivingRoom
    Unhandled exception in thread started by <unbound method ToGo.process_queue>
    ERROR:pyTivo:Exception in pyTivo
    Traceback (most recent call last):
      File "C:\Program Files\pyTivo\plugins\togo\togo.py", line 299, in process_queu
    e
        self.get_tivo_file(tivoIP, url, mak, togo_path)
      File "C:\Program Files\pyTivo\plugins\togo\togo.py", line 250, in get_tivo_fil
    e
        f = open(outfile, 'wb')
    IOError: [Errno 22] invalid mode ('wb') or filename: 'E:\\Media\\Media\\Tivo\\Wh
    ose Line Is It Anyway? - 640429.TiVo'
    

    And here is the pytivo.conf:
    Code:
    [Server]
    port = 9032
    ffmpeg = C:\Program Files\pyTivo\bin\ffmpeg.exe
    tivo_password = XXXXXXXX
    tivo_username = XXXXXXXX
    tivo_mak = ################
    togo_path = E:\Media\Media\Tivo
    
    [MyMovies]
    type = video
    path = E:\Media
    
    [_tivo_SD]
    
    [_tivo_HD]
    
    



    Any help with this would be greatly appreciated.
     
  17. Aug 7, 2011 #3077 of 5683
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    My guess is it's the question mark in the show name:

    Code:
    IOError: [Errno 22] invalid mode ('wb') or filename: 'E:\\Media\\Media\\Tivo\\Wh
    ose Line Is It Anyway? - 640429.TiVo'
    It looks like you're running pyTivo on Windows, which doesn't support the question mark in a file name. I thought pyTivo was supposed to strip out those 'special' characters but I could be wrong. Can you try transferring a different show and see if it works?
     
  18. Aug 7, 2011 #3078 of 5683
    moyekj

    moyekj Well-Known Member

    11,140
    31
    Jan 23, 2006
    Mission...
    This looks like an invalid path to me:
    Code:
    togo_path = E:\Media\Media\Tivo
    
    I'm guessing it has an extra \Media that shouldn't be there.
     
  19. Aug 7, 2011 #3079 of 5683
    loganasu

    loganasu I'm a lurker

    286
    0
    Jan 17, 2005

    I got that with all of the shows that I attempted, but it's working for everything else now.
    now I wonder if all of my tests were with the same show just different episode.



    This is the correct path. Had a reason for this naming convention, but it's obsolete now.



    Is there a way to strip out the special characters?
     
  20. Aug 7, 2011 #3080 of 5683
    thomb

    thomb New Member

    60
    0
    Jan 22, 2008
    Mill Creek, WA
    How do you run pyTivo as a service in Windows 7?? Pytivo works fine if I manually launch it and keep the window open.

    I followed the directions in the pyTivo wiki:
    1) Installed "pywin32"
    2) tried running pyTivoService.py from a DOS prompt, but got an error message:
    What did I do wrong?
     

Share This Page