PDA

View Full Version : pyTivo - Transcoding video server



Armooo
11-25-2006, 08:51 AM
pyTivo lets you stream most videos from your PC to your unhacked tivo. It uses the HMO server protocol (I think you need >= 7.2). It will guess if your video is 4:3 or 16:9 and pad your video if it thinks it is needed (looked good on my tests). It will not transcode an mpeg that is supported by your tivo.

Download

http://armooo.net/~armooo/pyTivo/downloads
Change Log (http://websvn.armooo.net/log.php?repname=svn&path=%2FpyTivo%2Ftrunk%2F&rev=0&sc=0&isdir=1)

Requirements
Python - http://www.python.org/download/
pywin32 (only to install as a service) - http://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063


Usage

Edit pyTivo.conf

[<name of share>]
type=x-container/tivo-videos
path=<path to videos>

run pyTivo.py

To install as a service

run pyTivoService.py --startup auto install

To remove service

run pyTivoService.py remove

Known Problems

GUID in beacons hardcoded. So only 1 server per network.

The max mpeg2 output size is 6000000000 bytes (hard coded in container.tmpl). It seems that unlike sending photos and music when sending video the tivo needs to know the size of video before hand. So we lie and tell the tivo that it is 6000000000 bytes. The tivo will stop downloading when it hits this size. If the download stops before it it reaches what it thinks is the end it will try resuming the download (HTTP Range header). I return a 404 when the tivo trys to resume and it will give up. You may see an error when you reach the end of the file.

aladdin4d
11-25-2006, 08:34 PM
Just a few things......

1. Will this also work for hacked Tivos? I seem to remember reading in the superpatch67 docs that hacked Tivos couldn't MRV with non-hacked units. I think it had something to do with scrambled vs. unscrambled content.

2. What Tivo OS version(s) should this work with? Any HMO/MRV capable version or does it need a TivoToGo capable version?

3. Does Tivo Desktop need to be installed?

4. Are there any enviroment variables that need to be set other than the PyTivo.conf file? I ask because I get the following error when I try to run pyTivo.py:

Traceback (most recent call last):
File "C:\python25\pytivo\pyTivo.py", line 7, in <module>
port = config.get('Server', 'Port')
File "C:\Python25\lib\ConfigParser.py", line 511, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'Server'

I didn't modify PyTivo.conf at all because strangely enough, I already had a folder 'D:\Video' that surprise, surprise, has videos in it!

5. The zip file I downloaded didn't have pyTivoService.pyc, just pyTivoService.py. Do I need to compile it myself to install it as a service or am I missing something?


Okay so maybe more than a few things but I think you're onto a great idea here and I'd love to be able to shamelessly use all of your hard work to make my life....well let's just say it'll make my g/f happy which will make my life easier.

Armooo
11-25-2006, 09:28 PM
1. Will this also work for hacked Tivos? I seem to remember reading in the superpatch67 docs that hacked Tivos couldn't MRV with non-hacked units. I think it had something to do with scrambled vs. unscrambled content.

2. What Tivo OS version(s) should this work with? Any HMO/MRV capable version or does it need a TivoToGo capable version?


If the tivo suports Galleon's GoBack this should work as well.



3. Does Tivo Desktop need to be installed?


Tivo Desktop is not needed.



4. Are there any enviroment variables that need to be set other than the PyTivo.conf file? I ask because I get the following error when I try to run pyTivo.py:

Traceback (most recent call last):
File "C:\python25\pytivo\pyTivo.py", line 7, in <module>
port = config.get('Server', 'Port')
File "C:\Python25\lib\ConfigParser.py", line 511, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'Server'

I didn't modify PyTivo.conf at all because strangely enough, I already had a folder 'D:\Video' that surprise, surprise, has videos in it!


There was a small bug and a new version is uploaded.



5. The zip file I downloaded didn't have pyTivoService.pyc, just pyTivoService.py. Do I need to compile it myself to install it as a service or am I missing something?


This was a copy and paste error pyTivoService.py is the file you need.

Armooo
11-26-2006, 06:54 PM
I tooks some (bad) screen shots of different aspect ratio videos being played back to give an example of how 4:3, 16:9, and odd sizes are auto detected.

http://armooo.net/~armooo/pyTivo/#screenshots

TerminalE
12-20-2006, 07:11 PM
Can I use a non-subbed tivo to play shows from my pc? I.E. no media access key.

krkeegan
01-07-2007, 10:13 PM
Just a quick thanks. I was able to mod this to run on Linux(Debian/Sarge) and it works great.

Thanks again.

Kevin

useid200
01-15-2007, 11:04 AM
I can't seem to get this working on my hacked DTivo (6.2). I can use tivoserver just fine, but no luck with pyTivo. Any suggestions?

SiREoNe
01-18-2007, 08:41 AM
Can I use multiple video folders in pyTivo.conf? If so what is the format?

cheer
01-26-2007, 05:44 PM
I can't seem to get this working on my hacked DTivo (6.2). I can use tivoserver just fine, but no luck with pyTivo. Any suggestions?
It won't work with DirecTivos because it requires TivoToGo/TivoToGoBack. None of the DirecTivos have the right code.

Soapm
12-04-2007, 03:29 AM
I get the following error while transferring files to my S2 649DT (OS 9.1) Tivo using pyTivo. This just started after the 9.1 upgrade. Can someone make suggestions on how I can limit my video bitrate? I am hoping this will take some of the load off.

kernel: Contents of mempool myworld dumped to /tmp/OutOfMemory.dump
kernel: assert: Tmk Assertion Failure:
kernel: assert: OutOfMemoryCrash, line 147 ()
kernel: Tmk Fatal Error: Thread TvMediaNetworkTransfer <402> strayed!
kernel: Paste the following into a shell to get a backtrace...

pyTivo.conf

[Grace]
type = video
path = G:\pyTivo

[Server]
ffmpeg = C:\pyTivo\plugins\video\ffmpeg_mp2.exe
beacon = 192.168.254.255
audio_br = 192K
port = 9032

krkeegan
04-03-2008, 04:25 PM
I was just wandering around and saw this topic. FYI there is a pyTivo Discussion Forum (http://pytivo.krkeegan.com) setup now for support help and discussion of future development.

Kevin