1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

pyTivoX

Discussion in 'TiVo Home Media Features & TiVoToGo' started by Yoav, Dec 10, 2008.

  1. Dec 10, 2008 #21 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    The blowing away of the config file on restart is normal (restart kills the python process, writes the new configuration settings based on what you have in the gui, and starts the python process again).

    The attempt to extract a string from a number is not normal.. And I think I see what happened. (the choice of video/music/photo is being marked as 0,1,2 instead of the string.. fixing).
     
  2. Dec 10, 2008 #22 of 1437
    raianoat

    raianoat TiVoBlog.com

    229
    0
    Jan 27, 2004
    Thanks....
    Somehow I got around that problem. Now I'm having an issue where it's not transferring the video to my TiVo. I tried to transfer a number of different videos however, each of them are "black" when I go to play them. Let me know if you need me to send you a log file.
     
  3. Dec 10, 2008 #23 of 1437
    fatespawn

    fatespawn New Member

    139
    0
    Oct 14, 2007
    Chicagoish, IL
    OK,

    This is what I get when I cut and paste into Terminal

    11451 0.0 0.0 18052 240 p1 R+ 7:55PM 0:00.00 grep Python

    So, looks like the server is working.... right?

    I understand what you are describing. I loaded pytivox onto my wife's computer (Intel/10.5.x) with complete success. However, my 10.4 G5 still doesn't work.
     
  4. Dec 10, 2008 #24 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    0.4 should have it fixed..: 'check for updates...'
     
  5. Dec 10, 2008 #25 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Hmm.. I just realized.. I think 10.4 ships with an older version of python for which pyTivo doesn't work 'out of the box'...

    run

    python -V

    and tell me what number it spits out. Since I don't plan on including a full python distribution in the bundle, if the default python on Tiger is too old, it looks like I'm gonna have to make this a 10.5-only project :(
     
  6. Dec 10, 2008 #26 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    A log file would help, as would a sample of one of your sources (or at least a description of what kind of file it is). I'm guessing ffmpeg is not converting the file correctly to an mpeg-2 for you, but that's a total guess..

    Are you using 0.4?
     
  7. Dec 10, 2008 #27 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Oh.. also, no it doesn't look like the server is working.. that's the 'grep' process.. not the python process.. If you found a python process it would look something like
    Code:
    yoav     14331   0.0  0.4    99808  18356   ??  Ss    6:28PM   0:01.22 /System/Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python /Applications/pyTivoX.app/Contents/Resources/pyTivo-wgw/pyTivo.py
    
     
  8. Dec 10, 2008 #28 of 1437
    fatespawn

    fatespawn New Member

    139
    0
    Oct 14, 2007
    Chicagoish, IL
    Python 2.3.5
     
  9. Dec 10, 2008 #29 of 1437
    raianoat

    raianoat TiVoBlog.com

    229
    0
    Jan 27, 2004
    No, I'll try out .4 and let you know what I see.
     
  10. Dec 10, 2008 #30 of 1437
    westside_guy

    westside_guy Annoyingly ephemeral

    462
    1
    Mar 13, 2005
    The soggy...
    0.4 fixed the m4v problem I reported earlier - thanks!

    I did find another issue though. In cases where a Mac has VMware or Parallels installed, pyTivo in general doesn't correctly guess the right network interface to use much of the time. Other pyTivo implementations work around this by allowing the user to manually identify the correct subnet to use via a "beacon" directive in pyTivo.conf - but pyTivoX does not currently incorporate this feature. So to get pyTivo to use the correct subnet on my computer, I had to manually shut down VMware Fusion's background processes like this:

    Code:
    sudo /Library/Application\ Support/VMware\ Fusion/boot.sh --stop
    
    Otherwise, my Tivo HD would not see the pyTivoX shares.

    This does work, but it's not an optimal solution.
     
  11. Dec 10, 2008 #31 of 1437
    Rdian06

    Rdian06 New Member

    463
    0
    Apr 12, 2008
    Interesting. I'd read about some patches to allow ffmpeg to compile as a Universal Binary, but hadn't attempted it myself. Mainly because I was trying to build a statically linked ffmpeg. I'm more of a old school Linux type so I haven't quite wrapped my head around the Mac framework stuff yet.

    Do you have a pointer to the instructions you used to build the Universal Binary?
     
  12. Dec 11, 2008 #32 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    patches? It didn't take any patches.. the code compiled fine as is. Was just a big pain in the ass to build everything for both processors..
     
  13. Dec 11, 2008 #33 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Damn :(
    Ok so the question is: Is it possible to put 'something' in the UI that isn't incredibly scary for the average user, but that allows a workaround for the parallels/vmware scenario? (Oddly I use parallels and didn't hit this problem.. although it may not have been running at the time).
     
  14. Dec 11, 2008 #34 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Ok, just uploaded 0.5
    Main changes:
    Code now runs as a 'daemon' (user launched agent).
    Can be configured to run at startup.
    Now has a menulet for controlling it.

    --> it is 10.5 *ONLY*.
    (python on 10.4 is too old, and also pytivoX now relies on some 10.5 api calls).

    Update and test away... Thanks!!
     
  15. Dec 11, 2008 #35 of 1437
    pkscout

    pkscout Active Member

    3,928
    0
    Jan 10, 2003
    Honolulu, HI
    There's something odd going on with the beacon I think. I seem to have to click the restart button three or four times on pyTiVoX before my Series 3 will see the shares the first time I start it up. After that it's fine.
     
  16. Dec 11, 2008 #36 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Hmm.. see anything interesting in the system logs? (I'm going to add a new window to see the output of pytivo directly, but in the meanwhile its output is just being sent to the console log).

    (I know nothing of pytivo.. I just run it blindly). Could it be that you just need to wait a while on the first invocation of pytivo for it to run through your movies before it appears on a tivo?
     
  17. Dec 11, 2008 #37 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    This is the icky shell script I use to build my mencode and my ffmpeg.. pull out whatever you need to build your ffmpeg universal:

    Code:
    SRCDIR=/Users/yoav/src
    LAME=lame-398-2
    HANDBRAKE=HandBrake-0.9.3
    
      cd $SRCDIR
      mkdir binaries
    
      export CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc7400"
      export CPPFLAGS=""
      export LDFLAGS="-arch i386 -arch ppc7400 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
      cd $SRCDIR/tivodecode-0.2pre4
      make distclean
      ./configure --disable-dependency-tracking
      make
      cp tivodecode ../binaries/tivodecode
    
      cd $SRCDIR/etv-comskip/src/comskip
      make clean; rm -f ../../comskip
      make ../../comskip CFLAGS="$CFLAGS -O2 -fasm-blocks -Wno-unused  -DHAVE_CONFIG_H -force_cpusubtype_ALL -I. -Ilibmpeg2 -IAC3Dec -Iargtable2-7/src" LFLAGS="$LDFLAGS -headerpad_max_install_names -prebind -force_cpusubtype_ALL"
      cp ../../comskip ../../../binaries/comskip
    
       export CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386'
       export CPPFLAGS='-arch i386'
       export LDFLAGS='-arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'
      cd $SRCDIR/x264
      ./configure
      make clean
      make
    
      cd $SRCDIR/faac
      ./configure --without-mp4v2 --enable-shared=no --enable-static=yes
      make clean
      make
    
      cd $SRCDIR/faad2
      ./configure --enable-shared=no --enable-static=yes
      make clean
      make
    
      cd $SRCDIR/$LAME
      ./configure  --disable-shared --disable-frontend
      make clean
      make
    
       export CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -O2 -fomit-frame-pointer'
       export CPPFLAGS='-arch i386'
       export LDFLAGS='-arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'
      cd $SRCDIR/mplayer
      make distclean
      rm ./uname
      ./configure --disable-png --enable-mp3lame --enable-x264 --disable-mplayer --enable-faac --enable-faad-internal --disable-freetype --with-extraincdir=$SRCDIR/faac/include/:$SRCDIR/x264:$SRCDIR/$LAME/include --with-extralibdir=$SRCDIR/faac/libfaac/.libs/:$SRCDIR/x264:$SRCDIR/$LAME/libmp3lame/.libs --extra-libs-mencoder="-lx264 $SRCDIR/faac/libfaac/.libs/libfaac.a"
      make
      cp ./mencoder ../binaries/mencoder-i386
    
       export CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386'
       export CPPFLAGS='-arch i386'
       export LDFLAGS='-arch i386 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'
       cd $SRCDIR/ffmpeg
      make distclean
      ./configure --arch=i386 --disable-vhook --disable-shared --enable-static --enable-pthreads --disable-mmx --enable-gpl --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-swscale --extra-cflags="-I$SRCDIR/$LAME/include -I$SRCDIR/faad2/include -I$SRCDIR/faac/include -I$SRCDIR/x264" --extra-ldflags="-L$SRCDIR/$LAME/libmp3lame/.libs -L$SRCDIR/faad2/libfaad/.libs -L$SRCDIR/faac/libfaac/.libs -L$SRCDIR/x264/"
      make
      cp ./ffmpeg ../binaries/ffmpeg-i386
    
       export CFLAGS='-arch ppc7400 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
       export CPPFLAGS='-arch ppc7400 -isysroot /Developer/SDKs/MacOSX10.4u.sdk'
       export LDFLAGS='-arch ppc7400 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk'
     
       cd $SRCDIR/x264
       make distclean
       ./configure --host=ppc-apple-darwin
       make
    
      cd $SRCDIR/faac
      make distclean
       ./configure --host=ppc-apple-darwin --without-mp4v2 --enable-shared=no --enable-static=yes
      make
    
      cd $SRCDIR/faad2
      ./configure --host=ppc-apple-darwin --enable-shared=no --enable-static=yes
      make clean
      make
    
      cd $SRCDIR/$LAME
      make distclean
      ./configure --host=ppc-apple-darwin --disable-shared --disable-frontend
      make
    
      cd $SRCDIR/mplayer
      make distclean
      export OPATH=$PATH
      export PATH=.:$PATH
      echo '#!/bin/sh
    echo powerpc
    ' > uname
      chmod a+rx uname
      ./configure --disable-png --enable-mp3lame --enable-x264 --disable-mplayer --enable-faac --enable-faad-internal --disable-freetype --with-extraincdir=$SRCDIR/faac/include/:$SRCDIR/x264:$SRCDIR/$LAME/include --with-extralibdir=$SRCDIR/faac/libfaac/.libs/:$SRCDIR/x264:$SRCDIR/$LAME/libmp3lame/.libs --extra-libs-mencoder="-lx264 $SRCDIR/faac/libfaac/.libs/libfaac.a"
      export PATH=$OPATH
      rm uname
      make
      cp ./mencoder ../binaries/mencoder-ppc
    
      cd $SRCDIR/ffmpeg
      make distclean
      ./configure --arch=ppc64 --cpu=G5 --disable-vhook --disable-shared --enable-static --enable-pthreads --disable-mmx --enable-gpl --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-swscale --extra-cflags="-DHAVE_LLRINT -I$SRCDIR/$LAME/include -I$SRCDIR/faad2/include -I$SRCDIR/faac/include -I$SRCDIR/x264" --extra-ldflags="-L$SRCDIR/$LAME/libmp3lame/.libs -L$SRCDIR/faad2/libfaad/.libs -L$SRCDIR/faac/libfaac/.libs -L$SRCDIR/x264/"
      make
      cp ./ffmpeg ../binaries/ffmpeg-ppc
    
      cd $SRCDIR/binaries
      lipo -create mencoder-i386 mencoder-ppc -output mencoder
      rm -f mencoder-*
      lipo -create ffmpeg-i386 ffmpeg-ppc -output ffmpeg
      rm -f ffmpeg-*
      strip *
      cp comskip mencoder tivodecode "../itivo/External Software/"
      cp ffmpeg "../pytivox/External Software/"
    
     
  18. Dec 11, 2008 #38 of 1437
    westside_guy

    westside_guy Annoyingly ephemeral

    462
    1
    Mar 13, 2005
    The soggy...
    I believe he's seeing the same thing I'm seeing - waiting does not "fix" it. pyTivo appears to just look for all available network interfaces that have IP addresses (this includes, as I mentioned, VMware virtual network interfaces), and assumes the first IP returned is on the subnet pyTivo should be on. Sometimes that works, and sometimes not - basically it's a crapshoot, which is why some implementations have that "beacon" function to allow us to manually specify the subnet to be used.

    As far as (per a question from one of your earlier posts) making these sorts of options available yet not scary - would it be possible to have a "advanced preferences" window that maybe has the proviso "avoid changing these values unless you know what you're doing"? That could incorporate the beacon, and perhaps other pyTivo options like aspect ratio etc.
     
  19. Dec 11, 2008 #39 of 1437
    Yoav

    Yoav New Member

    1,048
    0
    Jan 12, 2007
    Sure :) I'll get to doing that..
    Is it just a different broadcast address that needs to be used?
     
  20. Dec 11, 2008 #40 of 1437
    darksurtur

    darksurtur New Member

    156
    0
    Jan 2, 2008
    So there's no chance of a version of this that would work on 10.4 if we updated python on our own? That is still a simple task compared to the headache of compiling, setting up the config file, etc. and something I can send to a couple of friends interested in the program still using 10.4. If not, no big deal; I appreciate the effort and time you've put into this.
     

Share This Page