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. Oct 25, 2007 #781 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    Same thing here. Anything above ~5Mi gets odd macroblock errors. Changing to long-GOP eliminates the errors, but replaces them with inconsistent playback rates (parts of the video go fast-forward). I tried forcing PTS (-genpts 1), to no avail. For now, I'll stick with 5Mi. I'd LOVE to find a solution though!
     
  2. Oct 25, 2007 #782 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    I'm using NetBSD/amd64 -current with ffmpeg (10/25/07 snapshot and Python 2.5.1) built from source. I have liba52, libmp3lame, libx264, libfaac, and libxvid enabled, and so far haven't had anything it can't transcode.

    If you're not comfortable building and installing things manually, I encourage you to use packages. pkgsrc.se has a nice web interface, and lots of work-in-progress packages.
     
  3. Oct 25, 2007 #783 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    On my E6600 (Intel Core2Duo @ 2.4GHz), I get much greater than realtime (about 1.5-2x realtime) transcoding from DiVX and h264 sources. In fact, it transcodes (using '-threads 2' in ffmpeg) at a few hundred FPS, but when streaming to Tivo I get 45-60fps. I expect this is due to the way Tivo is fetching the data, but not sure. Certainly Python is consuming a lot more time than it really should. :)
     
  4. Oct 25, 2007 #784 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    With a small modification to the transcode.py file, pyTivo can transcode to AC3 5.1 just fine. With stereo sources and with 5.1 sources, it does the right thing on my S3. I haven't tried with any other 'odd' input types.
     
  5. Oct 25, 2007 #785 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    You mean source format is x264 in Matroska, right? Or did you make that the output format (rather than mpeg2video inside an MPEG2PS)?
     
  6. Oct 25, 2007 #786 of 5683
    neutral

    neutral New Member

    17
    0
    Jul 21, 2005
    The only options I'm seeing as configurable are,

    Or did you configure with the above options another way?
     
  7. Oct 25, 2007 #787 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    I built ffmpeg (and its dependencies) manually. My configure line was:

    --prefix=/software/ffmpeg-2007-10-25 --enable-libmp3lame --enable-gpl --enable-shared --enable-pthreads --enable-pp --enable-libx264 --enable-libfaac --enable-liba52 --extra-cflags=-O3 -march=nocona -I/usr/local/include --extra-ldflags=-R/usr/local/lib -L/usr/local/lib --disable-ipv6 --disable-ffserver --disable-ffplay --cpu=core2 --enable-libxvid --disable-shared --enable-swscaler --make=gmake --disable-debug --disable-vhook --enable-memalign-hack

    (my libraries and includes are installed into /usr/local/)
     
  8. Oct 25, 2007 #788 of 5683
    neutral

    neutral New Member

    17
    0
    Jul 21, 2005

    thanks for your help, unfortunately i'm recieving another error


    faad.c: At top level:
    faad.c:130: warning: `faac_init_aac' defined but not used
    gmake[1]: *** [faad.o] Error 1
    gmake[1]: Leaving directory `/usr/pkgsrc/multimedia/ffmpeg/work/ffmpeg-0.4.9-pre1/libavcodec'




    i'll try updating pkgsrc via cvs, maybe my snapshot is bad?
     
  9. Oct 26, 2007 #789 of 5683
    mr2828

    mr2828 New Member

    43
    0
    Jun 18, 2007
    Yes, the source.
     
  10. Oct 26, 2007 #790 of 5683
    mr2828

    mr2828 New Member

    43
    0
    Jun 18, 2007
    So I tried running two pyTivos on two different ports with different configs to see if that would work, but it doesn't seem to. My S3 will only show either one or the other of them at any time, but not both.
     
  11. Oct 26, 2007 #791 of 5683
    mr2828

    mr2828 New Member

    43
    0
    Jun 18, 2007
    Could it be possible that pyTivo is feeding ffmpeg some strange command line settings that would cause this? I assume that pyTivo simply calls ffmpeg by command line internally whenever its time to stream video. Perhaps it is using some fixed options that are designed to work with SD video, but don't work well with HD?

    For example I noticed it is setting up the output stream at 29.97 fps even though my input is around 24 fps. And it is forcing my output to 1440x720 res even though I specified 1280x720 in the config file.
     
  12. Oct 26, 2007 #792 of 5683
    mr2828

    mr2828 New Member

    43
    0
    Jun 18, 2007
    The more I think of this the more it doesn't make sense. I mean, we KNOW the S3 can playback mpeg-2 video at rates up to 19.2mb/s or whatever the top rate of 1080i HD video is, right? My S3 records and plays this back all day long when received OTA. So why can't it play back something at half that rate, and at a lower res?
     
  13. Oct 26, 2007 #793 of 5683
    buffalova

    buffalova New Member

    30
    0
    Jul 7, 2006
    Some files I transfer the audio seems very muted. I have to adjust the audio on the tv all the way up and still can barely hear it.

    Is this a probably of the original source file or is there something I could tweak in pytivo to help with this?
     
  14. Oct 26, 2007 #794 of 5683
    Chew

    Chew New Member

    284
    0
    Jan 22, 2003
    And what "small modification" would that be (for those of us less computer savvy)?
     
  15. Oct 26, 2007 #795 of 5683
    windracer

    windracer joined the 10k club

    11,580
    3
    Jan 3, 2003
    St. Pete, FL
    Hmmm ... I seem to recall that each TiVo server program has a unique server ID. TiVo.Net lets you change the ID but I wonder if pyTiVo has it hardcoded in.
     
  16. Oct 26, 2007 #796 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    Yes, the plugins/video/transcode.py file calls ffmpeg with output to stdio (which pyTivo then sends to Tivo via HTTP).

    I honestly haven't looked at the ffmpeg output directly to see if it's corrupted or not. That's an excellent idea (duh! I should have thought of that!), and I'll take a look this evening.

    It's also possible that since only SD is supported for TTCB, that there's some kind of bitrate limit for non-native streams (say, a bug in 9.2j somewhere).
     
  17. Oct 26, 2007 #797 of 5683
    ScottE

    ScottE New Member

    22
    0
    Oct 15, 2001
    San Diego,...
    Edit plugins/video/transcode.py and change the 'cmd = [FFMPEG, '... line in transcode().

    Specifically you want to change "-ac 2 -ab AUDIO_BR -ar 44100" to something like "-acodec ac3 -ab AUDIO_BR -ar 48000".

    I recommend also upping the audio_pr in pyTivo.conf, since 192k is pretty slim for AC3 5.1. I'm using 448k and it seems to work fine.

    For what it's worth, here's what I'm currently using as the commandline (not perfect, but gives greater than realtime on my system, and almost acceptable results for 4Mbps):

    cmd = [FFMPEG, '-threads', '2', '-i', inFile, '-vcodec', 'mpeg2video', '-r',
    '29.97', '-b', VIDEO_BR] + select_aspect(inFile, tsn) + ['-comment', 'pyTivo.p
    y', '-acodec', 'ac3', '-ab', AUDIO_BR,'-ar', '48000', '-f', 'vob', '-b_strategy'
    , '1', '-bf', '2', '-coder', 'vlc', '-mbd', 'rd', '-qmin', '1', '-' ]

    (Good grief that's hideous! There's got to be a better way!)
     
  18. Oct 26, 2007 #798 of 5683
    mr2828

    mr2828 New Member

    43
    0
    Jun 18, 2007
    In this other thread someone else seems to have 16 mb/s 720p mpeg working now. So it really seems to me that ffmpeg isn't encoding correctly. I may have to switch to use something else to encode and then manually transfer over the files. Here is the post:

    http://www.tivocommunity.com/tivo-vb/showthread.php?p=5635812#post5635812
     
  19. Oct 26, 2007 #799 of 5683
    mitch2k2

    mitch2k2 New Member

    110
    0
    Aug 2, 2006
    Hey all, I've just installed pyTivo and I can see the pc from the NPL, and within the main folder I have several secondary folders (this is how it was set up for TiVo.Net, which could handle folders one deep - with necessary workaround to get folders to repopulate after going into and coming out of one, yada yada yada).

    Each of these secondary folders is shown as having (0) contents and, sure enough, when I go into the folder, the TiVo shows it as empty. But of course it's not.

    Is it just that pyTivo, thanks to the 8.3 update, just can't do subfolders anymore? or am I doing something wrong??

    I'm running the 9.1 Tivo OS, connected to a wireless network.
     
  20. Oct 26, 2007 #800 of 5683
    TreborPugly

    TreborPugly Unreal!

    4,542
    0
    May 2, 2002
    Eastern TN
    I too have started having zero content in my sub folders on my TiVo. Once, this was fixed by restarting my pyTivo, but that solution isn't working any more.
     

Share This Page