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

    philhu User Since Day ONE!

    Apr 11, 2001
    ok, i downloaded it and the photo module

    They go in tonight.

    Anyone know why the folders under the main pc server share on the tivo show 0 items inside each folder? But if you go into the folder, the correct items show and are counted?
  2. dwgsp

    dwgsp New Member

    Aug 27, 2005
    You're right, I was thinking of something else when I typed the version info. I installed the 12/9/07 version of pyTivo.

    I just looked at ticket 56, and it describes the change by referencing a line number in the file. I am running this on Windows, and I don't have a text editor that supports line numbers (I don't really want to install a new editor on my system just so that I can run pyTivo). Is there someplace that I can download a version of pyTivo that already has these fixes applied? Or should I try an earlier version?

  3. dlfl

    dlfl Cranky old novice

    Jul 6, 2006
    Can't recommend an earlier version -- too hard to remember what versions have which problems and what fixes are needed.

    However here is a work-around for the line number problem:

    Load the file into wordpad.
    Save it (Ctrl-S) -- do not save to a different name, just overwrite the original file.
    Now load the file into notepad.
    Turn Word Wrap OFF
    Hit Ctrl-G and enter the line number you want

    The purpose of loading and saving from WordPad is to change the line endings from Unix style to Windows style, so Notepad will display it correctly.

    Indentation is all important in Python code so be careful about it. Do not use the tab key, just space over to line up as required.

    When you get tired of the workaround I recommend MetaPad a free program that is notepad with many improvements. Just Google for it.
  4. dwgsp

    dwgsp New Member

    Aug 27, 2005
    Thanks for the workaround. I applied the tickets that you previously mentioned, but the problem still occurred. Then I decided to simplify things, so I created a new directory in the root of my system (C:\Video) and copied a file and a directory into it. Then I restarted pyTivo and everything worked.

    Thinking that I had solved the problem, I copied a bunch more files and directories into C:\Video. Now I have a new problem. When I select the share from my Tivo, I can only display two screens worth of entries. In other words, I can display the first screen, then I press the CH- key and I can see the next (second) screen. But if I press CH- again, I see the first screen again instead of the next (third screen). Is there a known fix for this?

    Edit: It looks like my problem may be similar to the one described in Ticket 53, except that I can display two screens while the ticket describes a problem where only one screen can be displayed.

  5. philhu

    philhu User Since Day ONE!

    Apr 11, 2001
    I installed your new overwriting photo and music modules....

    Ok, photo module works like a champ.

    Music, on the other hand works better, but doesnt work for me

    I can browse folders in my collection levels down, but if I browse into a folder actually containing mp3 files, I get an error 3-0-65535

    If I stay one level up and try to PLAY a folder containing oh a small number of songs, like 10, 13, etc, or any amount, the Tivo just says 'Please wait' forever.

    So it never plays music. Tivo Desktop works on music like a champ using this same file structure.

    Any ideas? I am using Master 12/09 pytivo
  6. wmcbrine

    wmcbrine Ziphead

    Aug 2, 2003
    Are you using the latest version (0.8)?

    Any error messages in the pyTivo window?
  7. philhu

    philhu User Since Day ONE!

    Apr 11, 2001
    Ok, I installed 0.8 of your music module.

    I ran pyTivo as a cmd line program. It still dies on playing a music folder with error: 1-0-65535 or
    if I try to go into the folder, an error 3-0-65535

    It was about 3 folders down, and was a directory with 3 or 4 mp3 files.

    Here is the cmd window errors:
    C:\Program Files\TiVo\PyTivo-master>pyTivo.py
    C:\Program Files\TiVo\PyTivo-master\Cheetah\Compiler.py:1508: UserWarning:
    You don't have the C version of NameMapper installed! I'm disabling Cheetah's us
    eStackFrames option as it is painfully slow with the Python version of NameMappe
    r. You should get a copy of Cheetah with the compiled C version of NameMapper.
    "\nYou don't have the C version of NameMapper installed! " - - [28/Dec/2007 20:46:00] "GET /TiVoConnect?Command=QueryContaine
    r&Container=%2F HTTP/1.0" 200 - - - [28/Dec/2007 20:46:15] "GET /TiVoConnect?Command=QueryContaine
    iner%2Ftivo-videos,x-tivo-container%2Ffolder,video%2Fx-tivo-mpeg,video%2F* HTTP/
    1.1" 200 - - - [28/Dec/2007 20:46:19] "GET /TiVoConnect?Command=QueryContaine
    r&Container=%2F HTTP/1.0" 200 - - - [28/Dec/2007 20:46:29] "GET /TiVoConnect?Command=QueryContaine
    r&Container=%2F HTTP/1.0" 200 - - - [28/Dec/2007 20:46:41] "GET /TiVoConnect?Command=QueryContaine
    HTTP/1.0" 200 - - - [28/Dec/2007 20:46:42] "GET /TiVoConnect?Command=QueryContaine
    HTTP/1.0" 200 - - - [28/Dec/2007 20:46:44] "GET /TiVoConnect?Command=QueryContaine
    ext%2Fxml HTTP/1.0" 200 - - - [28/Dec/2007 20:46:44] "GET /TiVoConnect?Command=QueryContaine
    ext%2Fxml HTTP/1.0" 200 - - - [28/Dec/2007 20:46:47] "GET /TiVoConnect?Command=QueryContaine
    s=Basic&Format=text%2Fxml HTTP/1.0" 200 - - - [28/Dec/2007 20:46:47] "GET /TiVoConnect?Command=QueryContaine
    s=Basic&Format=text%2Fxml HTTP/1.0" 200 - - - [28/Dec/2007 20:46:56] "GET /TiVoConnect?Command=QueryContaine
    io%2F*&SortOrder=Type,Title&ItemCount=1&Details=Optimal&Format=text%2Fxml HTTP/1
    .0" 200 -
  8. wmcbrine

    wmcbrine Ziphead

    Aug 2, 2003
    That's the normal output -- no error messages there. Sorry, I have no clue. Does this happen for you on any directory with an MP3 in it, or just that one?

    I'll put some more debugging statements in the next version and see if that gets us anywhere.
  9. rgr

    rgr Member

    Feb 21, 2003
    Running pyTiVo-2007-12-09-master-d4219 on xp running python 2.51
    TiVo Series3

    I've noticed that the video transferred has a small but noticeable trimming around all the edges, as if allow for some overscanning of the video. The picture is just a bit bigger than is displayed, comparing the tv image with the original avi file. Is there anyway to turn that off, or to adjust for it in the conf file? I've tried changing the aspect ratio, height, width, pre-transcoding, rolling back to the PyTiVo on 11-25 - all to no effect. Any ideas?

    my PyTiVo.conf:
    type = video
    #path = Z:\Video
    path = C:\Documents and Settings\Ron\My Documents\Video

    beacon =
    ffmpeg_prams = -vcodec mpeg2video -r 29.97 -b %(video_br)s -maxrate %(max_video_br)s -bufsize %(buff_size)s %(aspect_ratio)s -comment pyTivo.py -ac 2 -ab %(audio_br)s -ar 44100 -f vob -
    port = 9032
    ffmpeg = C:\Documents and Settings\Ron\Desktop\pyTivoMaster\plugins\video\ffmpeg_mp2.exe
  10. MasterCephus

    MasterCephus New Member

    Jan 2, 2005
    I have completed a new update to the MetaGenerator program.

    You can download the new version here

    It could be a little buggy as I haven't had much time to test it. If you find any bugs, let me know and I'll try to fix it really fast.

    Here are some changes:

    -fixed problem when application can't connect to sites to get data
    -fixed the output of series id to seriesID instead of seriesid

    New features:
    -added settings feature
    -can choose your default video directory
    -can add the IMDB rating (X out of 10) to the end of the descriptions of movies
    -can choose between a small seriesID DB and a large DB. Most common series are in the smaller db, however, if you can't find the series, try the bigger DB

    I think that's it. Let me know what you guys think.

    Seriously, if something is wrong with it, let me know and I will try to get out an update as fast as I can...
  11. wmcbrine

    wmcbrine Ziphead

    Aug 2, 2003
    I suggest changing it to match Tivo's star system... This is set by the "starRating" tag in the extended info. Examples:

    <starRating value="3">TWO</starRating>
    <starRating value="4">TWO_POINT_FIVE</starRating>
    <starRating value="5">THREE</starRating>

    Also, earlier in the thread, people were talking about only TV ratings (TV-14, TV-MA, etc.) being available. For movie-style ratings, you need to use the "mpaaRating" tag. Examples:

    <mpaaRating value="3">PG_13</mpaaRating>
    <mpaaRating value="4">R</mpaaRating>

    There are also still tvRating fields present in the extended XML for the movies I've looked at ("_14" in both cases above), but these aren't displayed on the Tivo.
  12. MasterCephus

    MasterCephus New Member

    Jan 2, 2005

    Are those valid metadata entries for pyTivo to serve to the Tivo?

    I am being a little dense, but I don't understand how those figures equal each other... a value of 3 is actually 2, and 4 is really a 2.5?

    So can I assume that PG has a value of 2 and G has a value of 1?

    Again, I can only output items that Armoo is allowing me too...does he have in pyTivo the ability to do the above items? Would it be something like: starRating : 3
    mpaaRating : 3

  13. dlfl

    dlfl Cranky old novice

    Jul 6, 2006
    Maybe this was just a typo but the correct label is "seriesId" -- see Armooo's post #1044 in this thread.
  14. wmcbrine

    wmcbrine Ziphead

    Aug 2, 2003
    Yes, in the extended data.

    Since the Tivo can display half a star, each half-star apparently increments the value.

    1 = ONE
    7 = FOUR

    I haven't seen those values yet, but I'm extrapolating.

    So I would assume.

    Not as yet...
  15. MasterCephus

    MasterCephus New Member

    Jan 2, 2005
    Yeah it was a typo...it now prints out as "seriesId"...

    sorry for the confusion :)
  16. dlfl

    dlfl Cranky old novice

    Jul 6, 2006
    I don't completely understand your problem description except it is either too much or too little overscan. In either case I believe you are SOL unless you are willing to dig into the code and do some custom mods.

    The ffmpeg items to control this are the padding and cropping options
    (padtop, padbottom,padleft,padright, croptop,cropbottom,cropleft and cropright). These items are all set in the function

    def select_aspect(inFile, tsn = ''):

    in code module transcode.py. Unfortunately the logic in this function is too complex to just give a simple recipe for how to vary these items to achieve a specific purpose. Also if your file has been declared to be a tivo-compatible mpeg2 then it never gets processed through this function anyway and is sent as-is to the TiVo box. I believe the latest code considers ALL mpeg2's as tivo-compatible for the HD and S3 tivos (based on the TSN it reads from the TiVo). Thus for these files you are at the mercy of the TiVo for how it chooses to clip/crop/overscan these files.

    lf you do want to mod the code, here are the rules:

    (x + paddings - crops) must equal desired-final-width/height, usually known as TIVO_WIDTH/TIVO_HEIGHT

    x stands for w or h given in the -s wxh option. The equation is two equations, one for width, one for height, and the padding and crop sums are the ones applicable to the direction in question. The equations tell you how to adjust w or h depending on the other choices.

    I've usually seen excess overscan on my 4:3 aspect CRT TV for transcoded files and have customized my pyTivo with top, bottom and left padding to make it better.
  17. Sicklybutsexy

    Sicklybutsexy New Member

    May 5, 2007

    MasterCephus, Love the new program. So far no bugs. I especially like the addition of having a default video foler to go to. Saves a lot of clicking. Thanks and keep on keeping on...
  18. philhu

    philhu User Since Day ONE!

    Apr 11, 2001
    It happens on any filder that contains music files.

    Tivo Desktop 2.5.1 seems to work fine with it, fyi.

    I'll wait for your new version, see if the debug helps

  19. philhu

    philhu User Since Day ONE!

    Apr 11, 2001
    Here they are.....If anyone wants the entire program I had written to do tivo slices to look at how i processed the XML, I'll be glad to send it.

    'color values
    Global Const COLOR_BW = 1
    Global Const COLOR_COLOR = 4
    Global Const COLOR_COLORBW = 2
    Global Const COLOR_COLORIZED = 3

    'bits field definitions
    Global Const BITS_CC = 1 'closed caption
    Global Const BITS_Stereo = 2 'Stereo
    Global Const BITS_Subtitle = 4 'Subtitle
    Global Const BITS_JoinedInProgress = 8 'Joined In Progress
    Global Const BITS_CableInClassroom = 16 '
    Global Const BITS_SAP = 32 'Second Audio Program
    Global Const BITS_Blackout = 64 '
    Global Const BITS_Intercast = 128 '
    Global Const BITS_ThreeD = 256 '
    Global Const BITS_Repeat = 512 'Repeat
    Global Const BITS_Letterbox = 1024 'Letterbox
    'Global Const BITS_SexRating = 2048 'Rating Advisories S
    'Global Const BITS_ViolenceRating = 4096 'AV
    'Global Const BITS_LanguageRating = 8192 'AL
    'Global Const BITS_DialogRating = 16334 'AD
    'Global Const BITS_FvRating = 32768 'AF
    Global Const BITS_SexRating = 65536 'Rating Advisories S
    Global Const BITS_ViolenceRating = 131072 'AV
    Global Const BITS_LanguageRating = 262144 'AL
    Global Const BITS_DialogRating = 524288 'AD
    Global Const BITS_FvRating = 1048576 'AF

    'advisories in the advisory field in the program record
    Global Const ADV_Language = 1
    Global Const ADV_GraphicLanguage = 2
    Global Const ADV_Nudity = 3
    Global Const ADV_BriefNudity = 4
    Global Const ADV_GraphicViolence = 5
    Global Const ADV_Violence = 6
    Global Const ADV_MildViolence = 7
    Global Const ADV_StrongSexualContent = 8
    Global Const ADV_Rape = 9
    Global Const ADV_AdultSituations = 10
  20. MasterCephus

    MasterCephus New Member

    Jan 2, 2005
    I think the best thing to do right now is make a list of the items that Tivo offers vs. the items that pyTivo can use.

    I think one important thing that would be nice is ratings (TV such as TV-MA and Movie such as PG-13).

Share This Page