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

    armooo pyTivo Developer

    81
    0
    Feb 1, 2003
    We should be able to create the TvBusMarshalledStruct from an external file like we currently do. What would need to happen is to send a TiVoVideoDetails node in the first QueryContainer request. This creates a directory listing of the files. Each node in the list can have a TiVoVideoDetails node that has a URL to get the detailed info in the TvBusMarshalledStruct format.
     
  2. dlfl

    dlfl Cranky old novice

    7,162
    74
    Jul 6, 2006
    Dayton OH
    Well thanks for trying anyway. :eek: I'm sure you're right -- I just don't understand enough about the messages going between pyTivo and the TiVo.

    Can you just confirm what I hope you're saying, i.e., the original .TiVo file would not have to exist at the time pyTivo serves the video file? (Rather an external file would contain the xml metadata?)

    Thanks
     
  3. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Can someone point me to where the path to the actual video file is created within pyTivo? Since v. 201 I haven't been able to get pyTivo to work, I'm getting the following error then I request a video be transfered:

    FFmpeg version SVN-r10461, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    [configuration....] built on Sep 11 2007 01:30:32, gcc: 4.2.1-sjlj (mingw32-2)

    Seems stream 0 codec frame rate differs from container frame rate: 23.98 (65535/2733) -> 23.98 (2997/125)
    Input #0, avi, from '\\G-nt5\Videos\Dexter/Dexter [01x01] Dexter.avi':
    Duration: 00:51:22.2, start: 0.000000, bitrate: 952 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x368, 23.98 fps(r)
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, 32 kb/s
    %(in_file)s: no such file or directory


    The last slash in the path to the video file is incorrect and I can't seem to find the location where this is being assembled.

    I'm able to browse my shares and I'm only seeing this error when I try to transfer the video. I assume the error is related to the fact that I'm running pyTivo on a win32 server and the paths use the opposite slashes to Linux.

    Thanks!
     
  4. dlfl

    dlfl Cranky old novice

    7,162
    74
    Jul 6, 2006
    Dayton OH
    Looks like you've substituted a later version of ffmpeg than the one distributed with pyTivo, correct? If so, try using the distributed version. Versions can vary in the details of how they parse their input command line.
     
  5. Mark.Tolman

    Mark.Tolman New Member

    10
    0
    Oct 12, 2006
    I know neither Python nor pyTivo's code well enough to try this on my own. I keep my video files on my pc organized as follows:

    /Title/Title - EpisodeTitle.avi
    or
    /Title/Title EpisodeId EpisodeTitle.avi

    Examples:
    /Doctor Who/Doctor Who - Smith and Jones.avi
    /Doctor Who/Doctor Who S03E11 Blink.avi

    Would it be possible to easily parse the values? That way I wouldn't have to create a separate txt file for every video on my drive. If a txt file is present, its values could override the ones parsed from the filename.

    Also, if the video's filename starts with the directory, could a SeriesId be added to the response - so the transferred videos are put into folders on my TiVo? In this case, wouldn't the Title have to be set to the directory's name rather than the filename?

    I think this would make a great new feature for pyTivo. Maybe even allow the users to setup their own formats, like the one used by TiVo Desktop:

    Title - ''Episode Title'' (Recorded Date, Channel).tivo

    OK I'm done. Thanks
    mark
     
  6. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Thanks for the suggestion dlfl, but this was an attempt on my part to solve the problem. Here's the error using the distributed ffmpeg executable:

    FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.
    [configuration...] built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)

    Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 23.98 (24000/1001)
    Input #0, avi, from '\\G-NT5\Videos\Boondocks/Boondocks - 02 - The Trial of R. Kelly.avi':
    Duration: 00:21:51.1, start: 0.000000, bitrate: 1115 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x480, 23.98 fps(r)
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
    %(in_file)s: I/O error occured
    Usually that means that input file is truncated and/or corrupted.


    You'll note that while the specific error is different, the underlying problem is the same. The input video path is incorrectly formed for a Windows file path.

    Thanks! Any idea where this path is generated? I'm sure it would be a simple fix.
     
  7. PaulS

    PaulS Member

    688
    3
    Sep 16, 2002
    Southern NH
    First of all, I think it's great that there's such an uptick in activity for this project. It's great to see features and bugs being worked on daily.

    Now, a question. Why is it that pyTivo is still using an older version of ffmpeg ? Is it simply "if it ain't broke, don't fix it" thing, or is there a more compelling reason than that ?
     
  8. jcthorne

    jcthorne Active Member

    2,797
    25
    Jan 28, 2002
    Houston
    Hey Thanks Armooo! Tivo's lack of documentation on what works and what don't has left us all in a trial and error mode. I found some combos that work for me, but am sure there are plenty of others that work too, perhaps better. If I know more about ffmpeg, I could likely get better mpeg2 encodes than I am now getting.

    Its really neat that the metadata thing is finally moving forward, what a breakthrough.

    I did use your latest build with the txt file for input and it works like a champ. An unexpected surprise is that it ADDED data that was missing from a .tivo file I had downloaded from the TivoHD.

    Thanks for your work, look forward to this idea of using the metadata in new ways, especially for groups.
     
  9. TreborPugly

    TreborPugly Unreal!

    4,548
    2
    May 2, 2002
    Eastern TN
    Has any of this activity been related to the increased folder problems we're having on version 9.something of on S2's? (I basically have to be very careful, and always jump to the Tivo menu after starting a transfer from a subfolder, or my Tivo reboots)
     
  10. schwingle

    schwingle New Member

    17
    0
    Nov 7, 2007
    I know people have been chasing the folder bug and the workaround for the moment is to go into show details and then back out. I've found a thing or two with this:

    1) It works best for me when I go into a new folder and it is showing the wrong shows and I select a show, go into the details (using the move right navigation button) and then instead of backing out with the left navigation button, I arrow down and select "Do Nothing" with the right navigation button again.

    2) I've also found the good refresh works MOST consistently if I scroll down to the bottom of the list of erroneous shows in the folder and do the first step on the very last video in the list. If it is a folder with many shows it is worth the time to page down to get to the very last show.

    Hope this helps.
     
  11. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    I'm using an S2 and an S3 TivoHD and my experience has been that Tivo's version 9 software has been an improvement and brought more stability to Tivo HM. I haven't had to jump in and out of folders for the last two months. However, I should probably give Armooo most of the credit for that.
     
  12. freq

    freq New Member

    2
    0
    Nov 19, 2007
    I've followed the instructions and installed pyTivo, but I can't get my pc to show in the Now Playing list.
    My tivo ip is 192.168.15.100 and I've tried the following in pytivo.conf..

    beacon=255.255.255.255, beacon=192.168.15.255 and beacon=192.168.15.100

    with no success.
     
  13. dlfl

    dlfl Cranky old novice

    7,162
    74
    Jul 6, 2006
    Dayton OH
    255.255.255.255 works for me. Do you have port=9032 in pytivo.conf?

    If there is a router between pc and TiVo, you may need to open port 9032 on it. Also try it with Windows firewall disabled. If that makes it work then you need to configure the firewall to open 9032 (and possibly 9033 ??).

    If these things don't help, post a copy of your pyTivo.conf file.
     
  14. dlfl

    dlfl Cranky old novice

    7,162
    74
    Jul 6, 2006
    Dayton OH
    Parsing the file name for two or three items would not be difficult provided you are willing to separate them by a delimiter other than spaces, such as # $ % & or - (and not use the delimiter anywhere else in the file name).

    However, I suspect many users would not want this scheme and how would pyTivo know which way to go? I guess another config item could control it.

    Don't know how the series ID thing could be handled without a separate file.

    Anyone else care to comment?
     
  15. armooo

    armooo pyTivo Developer

    81
    0
    Feb 1, 2003
    I have a version with a new template sending the TvBus metadata, but I did not have time what fields do what. If you want to play with it you should be able to change the template while it is running to see the results.

    Nodes that start with a v need to have a list of <element> nodes.
    Names are Last|First.

    Useful values from TivoServer

    But I did not have any luck with grouping in to folder.

    If anyone has time to play around with it download
     
  16. GunnerMcGrath

    GunnerMcGrath New Member

    7
    0
    Nov 16, 2007
    Hi all, just getting into this TiVo server stuff and so far pyTivo works for me pretty well.. I see that many people have had problems with folders within the server, I was wondering if there's any kind of resolution to that yet? Just to recap, I have a number of folders with video files in them, but all of them say there are zero files inside. A fix for this would mean the difference between pyTivo being a mildly annoying but workable solution, and being perfectly elegant and doing exactly what I hoped to be able to do.

    Also, I wasn't able to get metadata working, but the random posts about it are vague at best. If this is a currently working feature, could someone post a more complete explanation of exactly how to get this working? I would much prefer my shows to show up as Seinfeld: The Slicer as opposed to Seinfeld 163 The Slicer (and of course it would be nice if there's a way to sort the shows in sequential order regardless of their titles).

    Thanks to anyone who can post some updates on these features!
     
  17. dlfl

    dlfl Cranky old novice

    7,162
    74
    Jul 6, 2006
    Dayton OH
    I don't think your problem is the file path because: ffmpeg has read info from the file. I'm wondering if it isn't some property of the video in the file. I notice it's 24 fps while you need 30 fps output.
     
  18. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    I haven't had a problem transcoding videos of different frame rates so far. Using pyTivo 201 I'm able to do it all the time (with the video from my example error in fact.) but your point about being able to read the input file's properties is a good one.

    Is it possible that the path is being recreated when the FFMPEG command is assembled? So the input is passed once when the parameters are read, then again when the command is assembled?

    I wonder because using the debug file I can grab the FFMPEG command and run it from a DOS prompt. Reusing what's in the debug file I get the exact same error as pyTivo does. However, if I correct the path the transcoding works beautifully. (I'm adding an output filename but not touching anything else.) This leads me to believe that it is a problem with the path.

    Thanks for your help.
     
  19. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    In fact, looking more closely at the debug file, I see that the path listed when the folder is scanned is correct, but the input path and FFMPEG command is incorrect:

    tivo_compatible: \\G-NT5\Videos\Boondocks\Boondocks - 02 - The Trial of R. Kelly.avi is not mpeg2video it is mpeg4
    video_info: \\G-NT5\Videos\Boondocks\Boondocks - 02 - The Trial of R. Kelly.avi cache hit!
    video_info: \\G-NT5\Videos\Boondocks\Boondocks - 02 - The Trial of R. Kelly.avi cache hit!
    video_info: ffmpeg output= FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.

    [configuration... etc...]
    built on Feb 21 2007 23:20:24, gcc: 4.3.0 20070126 (experimental)



    Seems stream 0 codec frame rate differs from container frame rate: 30000.00 (30000/1) -> 23.98 (24000/1001)

    Input #0, avi, from '\\G-NT5\Videos\Boondocks/Boondocks - 02 - The Trial of R. Kelly.avi':

    Duration: 00:21:51.1, start: 0.000000, bitrate: 1115 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 640x480, 23.98 fps(r)
    Stream #0.1: Audio: mp3, 48000 Hz, stereo, 128 kb/s
    Must supply at least one output file


    video_info: Codec= mpeg4 width= 640 height= 480 fps= 23.98 millisecs= 1311100
    tsn: 5400001D027E34D
    aspect169: False
    select_aspect: File= \\G-NT5\Videos\Boondocks/Boondocks - 02 - The Trial of R. Kelly.avi Type= mpeg4 width= 640 height= 480 fps= 23.98 millisecs= 1311100 ratio= 133 rheight= 3 rwidth= 4
    select_aspect: File is within 4:3 list.
    transcode: ffmpeg command is C:\Program Files\pyTivo-2007-11-18\plugins\video\ffmpeg_mp2.exe -i \\G-NT5\Videos\Boondocks/Boondocks - 02 - The Trial of R. Kelly.avi -threads 2 -i %(in_file)s -vcodec mpeg2video -r 29.97 -maxrate 5120k -bufsize 1024k -aspect 4:3 -b 2048k -s 704x480 -comment pyTivo.py -ac 2 -ab 96k -async 44100 -ar 44100 -f vob -


    I'm not sure why there would be a difference here though.
     
  20. grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    I missed it when I'd previously looked at the debug file but I was attempting to pass two input parameters. I still had the original parameter in my config file and it was being passed in the transcode.py file. Removing the parameter from the config file solved the problem.

    Thanks for humoring me! :)
     

Share This Page