 |
pyTivo Discussion Forum Answers and the development of pyTivo a TiVo transcoding server
|
|
| Author |
Message |
MuddBuddha

Joined: 01 Apr 2008 Posts: 7 Location: Indianapolis
|
Posted: Tue Apr 01, 2008 3:18 pm Post subject: windracer + ubuntu 7.10 |
|
|
windracer,
Once you downloaded pyTivo for Linux, what steps did you take to get it to operate under Ubuntu?> I've had it running under Windows for a while and wanted to change it to Linux, but have been having issues with it working.
Thanks,
MuddBuddha
|
|
| Back to top |
|
 |
windracer

Joined: 04 Jan 2008 Posts: 160 Location: St. Pete, FL
|
Posted: Tue Apr 01, 2008 6:14 pm Post subject: |
|
|
I don't think I did anything special. Basically:
- created /usr/local/tivo (I have other stuff in that folder)
- unzipped latest pyTiVo snapshot under /usr/local/tivo/pyTivo
- created pytivo init script under /etc/init.d (see attachment)
- ran 'sudo update-rc.d pytivo defaults' to add to startup runlevels
The harder part was building ffmpeg (with DivX/Xvid support):
- sudo apt-get install liblame-dev libxvidcore4-dev libx264-dev libfaac-dev libfaad2-dev
- sudo apt-get build-dep ffmpeg (which installed a TON of other packages including the gcc compiler and libraries)
- sudo apt-get source ffmpeg
- sudo ./configure --prefix=/usr --enable-gpl --enable-pp --enable-pthreads --enable-dc1394 --enable-libfaac --enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libogg --enable-libtheora --enable-libvorbis --enable-x264 --enable-xvid --enable-shared --disable-debug
- make, then make install
Finally, if you want to use the photo module you'll need:
- sudo apt-get install python-imaging
Hope that helps.
| Description: |
|
 Download |
| Filename: |
pytivo init script.txt |
| Filesize: |
818 Bytes |
| Downloaded: |
147 Time(s) |
_________________ pyTiVo on Ubuntu 8.10 |
|
| Back to top |
|
 |
wmcbrine

Joined: 04 Jan 2008 Posts: 514
|
Posted: Wed Apr 02, 2008 11:43 am Post subject: |
|
|
I also use pyTivo under Ubuntu... when I first got it working, all I did was:
1. Unzip (to my home directory)
2. Edit pyTivo.conf
3. ./pyTivo.py
I already had Python and ffmpeg installed, and I didn't set up pyTivo to run at startup.
So, what issues are you having?
_________________ My pyTivo fork |
|
| Back to top |
|
 |
MuddBuddha

Joined: 01 Apr 2008 Posts: 7 Location: Indianapolis
|
Posted: Sat Apr 05, 2008 12:52 pm Post subject: |
|
|
When I try to run pytivo.py I get PERMISSION DENIED. I tried sudo and got back, unknown command.
_________________ I spent 90% of my money on women and drink. The rest I wasted. |
|
| Back to top |
|
 |
windracer

Joined: 04 Jan 2008 Posts: 160 Location: St. Pete, FL
|
Posted: Sat Apr 05, 2008 12:57 pm Post subject: |
|
|
Make sure to set all the .py files as executable:
$ sudo chmod 755 *.py
_________________ pyTiVo on Ubuntu 8.10 |
|
| Back to top |
|
 |
MuddBuddha

Joined: 01 Apr 2008 Posts: 7 Location: Indianapolis
|
Posted: Sun Apr 06, 2008 10:31 am Post subject: Almost there.... |
|
|
Okay. Got pyTivo up and going. Amazing what you forget when you stop using Linux for a few years. I've had pyTivo running in XP for some time and once I worked around the sub shares issues, it has been flawless and can stream to up to three Tivo's without interruption.
The movies show up in their respective shares, but everything sits still during transfer. No video, just, "Please wait while..."
I don't see ffmpeg running in the system monitor and receive this text in the console:
192.168.0.187 - - [06/Apr/2008 14:23:14] "GET /Action%20Movies/300.avi HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('192.168.0.187', 33186)
Traceback (most recent call last):
File "SocketServer.py", line 464, in process_request_thread
self.finish_request(request, client_address)
File "SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "SocketServer.py", line 522, in __init__
self.handle()
File "BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "BaseHTTPServer.py", line 310, in handle_one_request
method()
File "/home/thomas/pyTivo/httpserver.py", line 55, in do_GET
plugin.send_file(self, container, name)
File "/home/thomas/pyTivo/plugins/video/video.py", line 210, in send_file
handler.wfile, tsn)
File "/home/thomas/pyTivo/plugins/video/transcode.py", line 35, in output_video
transcode(inFile, outFile, tsn)
File "/home/thomas/pyTivo/plugins/video/transcode.py", line 53, in transcode
cmd_string = config.getFFmpegTemplate(tsn) % settings
KeyError: 'fmpeg_prams'
----------------------------------------
192.168.0.146 - - [06/Apr/2008 14:23:28] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
192.168.0.187 - - [06/Apr/2008 14:23:28] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
192.168.0.197 - - [06/Apr/2008 14:23:28] "GET /TiVoConnect?Command=QueryContainer&Container=%2F HTTP/1.0" 200 -
192.168.0.187 - - [06/Apr/2008 14:23:44] "GET /Action%20Movies/300.avi HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('192.168.0.187', 33188)
Traceback (most recent call last):
File "SocketServer.py", line 464, in process_request_thread
self.finish_request(request, client_address)
File "SocketServer.py", line 254, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "SocketServer.py", line 522, in __init__
self.handle()
File "BaseHTTPServer.py", line 316, in handle
self.handle_one_request()
File "BaseHTTPServer.py", line 310, in handle_one_request
method()
File "/home/thomas/pyTivo/httpserver.py", line 55, in do_GET
plugin.send_file(self, container, name)
File "/home/thomas/pyTivo/plugins/video/video.py", line 210, in send_file
handler.wfile, tsn)
File "/home/thomas/pyTivo/plugins/video/transcode.py", line 35, in output_video
transcode(inFile, outFile, tsn)
File "/home/thomas/pyTivo/plugins/video/transcode.py", line 53, in transcode
cmd_string = config.getFFmpegTemplate(tsn) % settings
KeyError: 'fmpeg_prams'
----------------------------------------
_________________ I spent 90% of my money on women and drink. The rest I wasted. |
|
| Back to top |
|
 |
windracer

Joined: 04 Jan 2008 Posts: 160 Location: St. Pete, FL
|
Posted: Sun Apr 06, 2008 10:48 am Post subject: |
|
|
You can turn on debugging in your pyTivo.conf, that might provide more detail. Looks like something with ffmpeg parameters?
_________________ pyTiVo on Ubuntu 8.10 |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Sun Apr 06, 2008 12:03 pm Post subject: |
|
|
Your ffmpeg_tmpl setting in your pyTivo.conf file has an error. fmpeg_prams is not a valid setting.
You should leave ffmpeg_tmpl blank unless you really need to tinker with it.
Kevin
|
|
| Back to top |
|
 |
MuddBuddha

Joined: 01 Apr 2008 Posts: 7 Location: Indianapolis
|
Posted: Sun Apr 06, 2008 2:23 pm Post subject: |
|
|
Checked it. It's blank.
I'll revert back to the WinXP side for the week and start again next weekend.
Thanks for the input, Kevin.
_________________ I spent 90% of my money on women and drink. The rest I wasted. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Sun Apr 06, 2008 7:40 pm Post subject: |
|
|
hmm, odd. Where did your linux version of pyTivo come from?
This line seems to suggest that the template setting is using a bad key:
| Code: | File "/home/thomas/pyTivo/plugins/video/transcode.py", line 53, in transcode
cmd_string = config.getFFmpegTemplate(tsn) % settings
KeyError: 'fmpeg_prams' |
|
|
| Back to top |
|
 |
windracer

Joined: 04 Jan 2008 Posts: 160 Location: St. Pete, FL
|
Posted: Mon Apr 07, 2008 4:07 am Post subject: |
|
|
ffmpeg_prams shouldn't even be in your pyTivo.conf file unless you're using it, right?
If it's "blank" wouldn't that override the default? Try removing the line altogether.
_________________ pyTiVo on Ubuntu 8.10 |
|
| Back to top |
|
 |
MuddBuddha

Joined: 01 Apr 2008 Posts: 7 Location: Indianapolis
|
Posted: Mon Apr 07, 2008 12:36 pm Post subject: |
|
|
I'm using: pyTivo-2008-04-02-master-09404894dadcfbd297e3090f843766b2f305e6d4.zip
from ~armooo/pyTivo/downloads
Here's what's in my pyTivo.conf
[Admin]
video shares =
type = admin
[Server]
ffmpeg = /home/thomas/ffmpeg-0.cvs20070307/ffmpeg
video_br = 4096k
optres = true
max_video_br = 17408k
ffmpeg_tmpl = %(video_codec)s %(video_fps)s %(video_br)s %(max_video_br)s %(buff_size)s %(aspect_ratio)s -comment pyTivo.py %(audio_br)s %(audio_fr)s %(audio_ch)s %(audio_codec)s %(fmpeg_pram)s %(format)s
beacon = 255.255.255.255
max_audio_br = 448k
debug = false
audio_br = 384k
bufsize = 1024
port = 9032
[Romance Movies]
type = video
path = /media/MOVIES1/Romance_Movies
[Misc Shows]
type = video
path = /media/MOVIES1/Misc_Shows
[Horror Movies]
type = video
path = /media/MOVIES2/Horror_Movies
[Drama Movies]
type = video
path = /media/MOVIES1/Drama_Movies
I tried: pyTivo-2008-04-06-master-098d6b5be13dbaf0931f4989b9e2c05e01d8a9f7.zip
and got the same result.
_________________ I spent 90% of my money on women and drink. The rest I wasted. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Mon Apr 07, 2008 1:14 pm Post subject: |
|
|
I don't know what the "video shares" setting is under your [Admin]. Also in pyTivo.conf less is better. Don't just add settings that mimic the default settings, if you leave them blank you will get the default and will be less likely to have errors. I would clean up the [Server] section, you have a lot in there that doesn't need to be there. i.e. ffmpeg_tmpl, beacon, debug, bufsize and possibly more depending on if you have an S2 or S3.
As I said in my last post DELETE your ffmpeg_tmpl line.
This line is bad:
ffmpeg_tmpl = %(video_codec)s %(video_fps)s %(video_br)s %(max_video_br)s %(buff_size)s %(aspect_ratio)s -comment pyTivo.py %(audio_br)s %(audio_fr)s %(audio_ch)s %(audio_codec)s %(fmpeg_pram)s %(format)s
As the instructions say ffmpeg_tmpl is for very advanced users and most ppl should leave this blank.
|
|
| Back to top |
|
 |
MuddBuddha

Joined: 01 Apr 2008 Posts: 7 Location: Indianapolis
|
Posted: Mon Apr 07, 2008 1:41 pm Post subject: |
|
|
I have both S2 and S3 Tivo's.
Most of the server section I did not add, particularly the ffmpeg_tmpl section. That was auto generated post saving changes in the port 9032 configuration.
My original file had very little in it other than the shares and port number, etc.
I'll tidy this up and try again.
Thanks for the reply, Kevin. I'll let you know how it goes.
_________________ I spent 90% of my money on women and drink. The rest I wasted. |
|
| Back to top |
|
 |
krkeegan Site Admin

Joined: 04 Jan 2008 Posts: 412 Location: Los Angeles, CA
|
Posted: Mon Apr 07, 2008 1:44 pm Post subject: |
|
|
| MuddBuddha wrote: | That was auto generated post saving changes in the port 9032 configuration. | What auto generated it?
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|