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 5, 2007 #901 of 5684
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    Yes, what I was describing was not the release that just came out a couple days ago. I'll have to double check the version when I get home. I'll also try the new version and see if I get the same problems. It was a transcoded avi that I had the problems with too. Not sure offhand what the audio and video codec was for the avi though. I believe it was an xvid.
     
  2. Nov 5, 2007 #902 of 5684
    Chew

    Chew New Member

    284
    0
    Jan 22, 2003
    I haven't updated to 205 just yet. The only change I've made to the settings is the previously posted "no video" on 16x9 workaround.

    I'm having the same FF/REW issue: I try to FF through podcast credits, press play, and end up 3 minutes ahead!

    This has only been happening for the last week or two though.
     
  3. Nov 6, 2007 #903 of 5684
    grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Did anyone else have any trouble getting 205 to work? I replaced the pyTivo folder with the contents of the 205 zip from Armoo's site and the service is running perfectly when I browse from my TivoHD, but when I try to transfer a video I get the following error:

    File "C:\Program Files\pyTivo\plugins\video\transcode.py", line 91, in select_aspect
    multiplier16by9 = (16.0 * TIVO_HEIGHT) / (9.0 * TIVO_WIDTH)
    TypeError: can't multiply sequence by non-int of type 'float'

    I was able to hack transcode.py and convert each instance of TIVO_HEIGHT and TIVO_WIDTH to variables of type 'float', but then it seemed that each of the videos I transferred were cut off prematurely.

    Any advice?
     
  4. Nov 6, 2007 #904 of 5684
    TheAmigo

    TheAmigo New Member

    13
    0
    Dec 28, 2001
    Glendale...
    It's a bug in 205 related to support for per-tivo options. Try commenting out the width in your config file.

    It also seems odd that the ChangeLog for 205 calls height "height_br".

    I'm having a hard time searching this thread.... the wiki entry on subfolders talks about it like its a solved problem, but as of 205, I'm still have the problem.

    If someone knows how to make subfolders work, can you please update the wiki?
     
  5. Nov 6, 2007 #905 of 5684
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    This is likely the source of the problem. Looks to be a cut-n-paste problem.

    Try changing "height_br" to "height" in Config.py line 66 and try again.

    By scanning the change logs, it looks like someone got it working with the 8.3 branch. However, that person referred to the "fix" as a hack, so it probably wasn't a very clean change. The logs then indicate that armoo backed out the change later on. Unsure of why.
     
  6. Nov 6, 2007 #906 of 5684
    wiedmann

    wiedmann New Member

    22
    0
    Oct 3, 2007
    San Mateo, CA
    In case you're not monitoring the ffmpeg svn repository, it appears a change was checked in a couple of weeks ago to output pixel and display aspect ratios (if available). I haven't tried building it to see whether it works well, but it might be helpful to improve the aspect ratio heuristics.
     
  7. Nov 6, 2007 #907 of 5684
    grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Thanks! There is a pretty obvious typo in config.py but I don't believe that's related to the problem I'm having. I assume by correcting the variable name from height_br to height you've solved a problem I hadn't run in to _yet_.

    However, I was able to get past my problem with the TypeError by changing the select_aspect function where it defines the TIVO_HEIGHT and TIVO_WIDTH variables. By defining the variables as type, float, I'm able to get FFMPEG to begin transcoding.

    Before:
    TIVO_WIDTH = Config.getTivoWidth(tsn)
    TIVO_HEIGHT = Config.getTivoHeight(tsn)

    After:
    TIVO_WIDTH = Config.getTivoWidth(tsn)
    TIVO_HEIGHT = Config.getTivoHeight(tsn)

    TIVO_WIDTH = float(TIVO_WIDTH)
    TIVO_HEIGHT = float(TIVO_HEIGHT)


    I still don't have 205 working fully though. I'm not seeing any errors in the log or debug files, but if I run pyTivo from the command line (Windows) I am seeing the error "Must supply at least one output file". I'm baffled as to how I broke that but it will have to wait until tonight to be investigated.
     
  8. Nov 6, 2007 #908 of 5684
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH

    Hmmm... Which version of ffmpeg are you using ? The one included with pyTivo, or something else ?

    Also, are you using the per-tivo settings, the global settings, or the defaults for these values in your pytivo.conf file ?

    Overall, the diffs between 201 and 205 are not significant. I can't see why you'd be having so many troubles getting 205 up and running. Perhaps the per-tivo logic has a hole in it. I'll take another look at the code...


    [edit]

    After taking a look at the code again, I see a difference which may or may not be anything at all. As I've said, python is not my strong suit (although I'm learning quickly as a result of this thread). The difference that I can see is how the TSN is being passed into the getTivoWidth and getTivoHeight functions in the Config.py module. The tsn value isn't being defaulted to "None" as it is in the getAudioBR and getVideoBR functdions. Since these functions all seem to follow the same basic template, I'd expect them to follow the same coding conventions, which they currently don't.

    line 63 :
    def getTivoHeight(tsn = None):

    line 76 :
    def getTivoWidth(tsn = None):


    I'll have some time tonight to fool around with 205 myself.
     
  9. Nov 6, 2007 #909 of 5684
    Airey001

    Airey001 New Member

    31
    0
    Oct 20, 2005
    I would recommend staying with what ever version you are running now unless you like to play around with new code :) Like me.

    Reasons I say this, is that I believe there will be a few more updates with more per tivo options added to support HD Tivos.

    Plus the fact that the Tivo Sub Folder issue caused by OS 8.3 was not fixed in 9.1 and currently there is no truck of the newer version for the issue.

    But if you are like me of course you will play around with it.

    I am in the middle of testing some of the changes now, and also updating the transcode.py file to get 16:9 video hack added in for OS 9.1.

    Right now all seems to be working well. Fingers are crossed.


    UPDATE 09:54PM - Looks like I might be right Changeset 206 is now out. It seems to be adding a config for the ffmpeg command.

    Changes are:
    Added support for ffmpeg command templates
    Moved dist config
     
  10. Nov 6, 2007 #910 of 5684
    fxer

    fxer New Member

    13
    0
    Aug 14, 2005
    So where does it stand getting 16x9 video to transfer to a 16x9 tv with the latest tivo software? Do you still have to change transcode.py, or can you use the ffmpeg_prams function in pytivo 2.06? How are you guys getting video in this case?
     
  11. Nov 7, 2007 #911 of 5684
    grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Paul,

    I am using the FFMpeg exe that comes with pyTivo. Here's what I'm seeing in the debug file. I get the same result whether I'm using the per-Tivo settings to specify height, width, audio_br or video_br or if I rely on the defaults:


    video_info: ffmpeg output= FFmpeg version SVN-r8047, Copyright (c) 2000-2007 Fabrice Bellard, et al.

    configuration: --enable-gpl --enable-pp --enable-swscaler --enable-pthreads --enable-liba52 --enable-avisynth --enable-libdts --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libnut --enable-libogg --enable-libtheora --enable-libvorbis --enable-x264 --enable-xvid --enable-amr_nb --enable-amr_wb --cpu=i686 --enable-memalign-hack --extra-ldflags=-static

    libavutil version: 49.3.0

    libavcodec version: 51.34.0

    libavformat version: 51.10.0

    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: 23.98 (65535/2733) -> 23.98 (2997/125)
    Input #0, avi, from 'D:\shares\Videos\extended pilot.avi':

    Duration: 00:41:34.4, start: 0.000000, bitrate: 1177 kb/s

    Stream #0.0: Video: mpeg4, yuv420p, 624x352, 23.98 fps(r)

    Stream #0.1: Audio: mp3, 48000 Hz, stereo, 96 kb/s

    Must supply at least one output file

    video_info: Codec= mpeg4 width= 624 height= 352 fps= 23.98 millisecs= 2494400
    tivo_compatible: D:\shares\Videos/extended pilot.avi is not mpeg2video it is mpeg4
    output_video: D:\shares\Videos/extended pilot.avi is not tivo compatible
    video_info: D:\shares\Videos/extended pilot.avi cache hit!
    tsn: 65200018037EAEF
    aspect169: True
    select_aspect: File= D:\shares\Videos/extended pilot.avi Type= mpeg4 width= 624 height= 352 fps= 23.98 millisecs= 2494400 ratio= 177 rheight= 22 rwidth= 39
    select_aspect: 16:9 aspect allowed, file is narrower than 16:9 padding left and right
    -aspect 16:9 -s 1440.0x720.0
    transcode: ffmpeg command is c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe -threads 2 -i D:\shares\Videos/extended pilot.avi -vcodec mpeg2video -r 29.97 -b 4Mi -maxrate 17M -bufsize 1024k -aspect 16:9 -s 1440.0x720.0 -comment pyTivo.py -ac 2 -ab 160K -ar 44100 -f vob -
     
  12. Nov 7, 2007 #912 of 5684
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    206 is indeed out. It includes a per-tsn setting to allow the user to define the actual parameter list to ffmpeg (seems like overkill to me), as well as fixing a per-tsn height definition bug (curiously still called "height_br" for per-tsn, and called "height" for a global setting).

    I tried fooling around with 205 last night, but ran out of time before I could fire up any definitive tests. Perhaps I'll get more time tonight to further investigate.
     
  13. Nov 7, 2007 #913 of 5684
    Airey001

    Airey001 New Member

    31
    0
    Oct 20, 2005
    For those of us out there with the lovely 16:9 Black Video Bug from Tivo OS 9.1.

    Here is the latest transcode.py (from Changeset 206)Hacked to force an aspect of 4:3 instead of 16:9.


    And no this can't be changed with the new option in the config. The Transcode.py file looks at the video and goes though some logic to decided if it is 4:3, 16:9 or if its neither and needs padded to become one.


    I have 2 versions of the transcode.py in this zip.

    First one (transcode.py) is for older version of ffmpeg. Use this one first unless you are certain you have a newer version of ffmpeg installed.

    Second one (transcode.py-ForNewer-Versions-of-ffmpeg) is for newer version of ffmpeg since they reformatted their output. You just need to rename to transcode.py and place it in your plugins/video folder.
     

    Attached Files:

  14. Nov 8, 2007 #914 of 5684
    PaulS

    PaulS Member

    674
    1
    Sep 16, 2002
    Southern NH
    Well, after fooling around with 205 and 206, I'm back to 201. Not exactly sure why 205 and 206 are giving me such a hard time, but they are. The shares appear in my NowPlaying list, but transfers never commence.

    I'm sure I could mess around with it for a while and get it to work, but I'm quickly running out of time and patience. I just want this to work, and 201 gets me there the quickest.
     
  15. Nov 8, 2007 #915 of 5684
    grahamkent

    grahamkent New Member

    16
    0
    Feb 15, 2003
    Seattle, WA
    Ditto. I've spent hours working on 205 and 206 and can't seem to get the transcoding to work. They both appear to come with the same version of ffmpeg as 201 did, but even with the same command being sent from pyTivo I'm getting errors in 205 and 206.

    With a little bit of tweaking 201 is just about as functional anyhow. *shrug*
     
  16. Nov 8, 2007 #916 of 5684
    digititus

    digititus New Member

    5
    0
    Aug 10, 2007
    hello all,

    please forgive me, I tried to search the thread and couldn't find an answer. Here is my issue. I have been running Pytivo since July with no problems. About a week or so ago whenever I try to transfer from pytivo to my tivo box my tivo will crash and reboot. This happens every time I try to transfer something via pytivo. It'll start the transfer but it seems to reboot when the Tivo tries to go back to the previous screen (which would be the pytivo directory). I am using a tivo 2.5 (and I'd assume the latest update). I'm not sure what version of pytivo that I'm running but I am running python 2.5.1. Another thing that I've noticed is that when I browse my pytivo folder from my tivo the folders have (0) next to them even though there are files under them. Any ideas as to what is going on? I suspect that Tivo did an update that doesn't jive well with my version of pytivo.

    Thanks for all the great work you guys do.
     
  17. Nov 9, 2007 #917 of 5684
    mulscully

    mulscully Member

    321
    0
    May 31, 2003
    Malvern, Pa
    ok, I looked through this thread but I didn't find the answer, doesn't mean it's not there, just didn't find it..

    I am currently using Tivo Desktop to send my files to the tivo, but I really want folders, and I see that pyTivo can/will do it.. My questions is, all my files are tivo compatable mpeg2 files (not .tivo) files, will pyTivo send my files (HD ones to) without trying to transcode them? and if not can I turn off transcoding...
     
  18. Nov 9, 2007 #918 of 5684
    s2kdave

    s2kdave New Member

    515
    0
    Jan 27, 2005
    It won't transcode them if they are using the proper video/audio codec and aspect on your mpegs. But you can't do folders on mpegs. At least no one has figured out how yet. It doesn't use the meta data in the TTCB interface to make folders(groups). It might be the information in the .tivo wrappers and maybe even other meta data in it's internal database.
     
  19. Nov 9, 2007 #919 of 5684
    mulscully

    mulscully Member

    321
    0
    May 31, 2003
    Malvern, Pa
    I thought pyTivo did folders if you have the mpegs in subfolders? I get that impression from the website...

    I am using a TivoHD and am not sure all the mpeg heights and widths are consistant, but they dl fine using tivo desktop. I would just like pyTivo to pass the raw mpeg without any transcoding.. Is this possible?
     
  20. Nov 9, 2007 #920 of 5684
    wmcbrine

    wmcbrine Ziphead

    10,367
    22
    Aug 2, 2003
    It checks for certain allowed sizes, and if the MPEG isn't one of those sizes, it reencodes it. I had to add some additional sizes to avoid reencodes (e.g., width 528 -- many of my Fios channels are this width).
     

Share This Page