*New 12.1 series Release:
2019-11-08: XigmaNAS 12.1.0.4.7091 - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[HOWTO] pyTivo on FreeNAS to act as a server for TiVo

XigmaNAS Packages
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
raulfg3
Site Admin
Site Admin
Posts: 4941
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

[HOWTO] pyTivo on FreeNAS to act as a server for TiVo

#1

Post by raulfg3 » 30 Jun 2012 09:19

Original Post by jivey123 » Wed Jul 01, 2009 3:16 am on old FreeNAS Forum

How to install Pytivo on a full version of Freenas for Windows people.

Install Putty and telnet to your freenas. Using putty.exe login into Freenas.
At the bash type "

Code: Select all

pkg_add -r python23.tbz
"
This installs Python.
At the bash type "

Code: Select all

pkg_add -r ffmpeg.tbz
"
This installs ffmpeg
(I installed my pytivo at /root/PyTivo)
Install PyTivo on you windows box.
Copy your pytivo on your windows box copy it to /root/PyTivo
Modify your pyTivo.conf to match your directories that are on your freenas.
Here is mine

Code: Select all

#############################################################
# This is an example config file, showing all the options. You probably
# won't need most of them. Your working config file will be named
# "pyTivo.conf". '#' starts a comment. It is recommended that
# that you use the Web Administration tool to modify pyTivo.conf after
# you get pyTivo up and running. You can access the tool by pointing your
# browser to http://localhost:9032/

# Web administration. enable this section to use the web configuration feature.
[Admin]
type=admin

[Server]
port=9032

# Full path to ffmpeg including filename
# For windows: ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
# For linux: ffmpeg=/usr/bin/ffmpeg
#ffmpeg=c:\Program Files\pyTivo\plugins\video\ffmpeg_mp2.exe
ffmpeg=/usr/local/bin/ffmpeg

# This will make a large debug.txt file in your base directory. It only
# debugs transcode.py right now.
#debug=false

# Max video bitrate, default 30000k
# sets ffmpeg -maxrate setting to minimize bitrate peak playback issues.
# mpegs with video bitrate above this setting will also be transcoded.
#MAX_VIDEO_BR=17408k

# Audio bit-rate, defaults to 192K for S2, 384K for S3/HD
#audio_br=320K

# Video bit-rate, defaults to 4096K for S2, 8192K for S3/HD
#video_br=12Mi

# Beacon broadcast address(es)
# The default is 255.255.255.255, but on some multihomed machines you
# may need to specify the subnet broadcast address(es) of your Tivo
# boxes. You can also specify "listen" to listen for direct connection
# attempts on port 2190, for use with the "Manually add a server..."
# function. (And if you set beacon to listen _only_, it turns off
# broadcasts.)
#beacon=192.168.1.255 listen
beacon=192.168.1.255

# Output Pixel Width:
# Width, defaults to 544 for S2, 1280 for S3/HD
# Height, defaults to 480 for S2, 720 for S3/HD
# Valid widths: [S3/HD = 1920, 1440, 1280], [S2/S3/HD = 720, 704, 544, 480, 352]
# Valid heights: [S3/HD = 1080, 720], [S2/S3/HD = 480]
#width=1280
#height=720
#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 %(ffmpeg_prams)s %(format)s

# Per tivo options
# section named _tivo_TSN with the tsn in all caps
#[_tivo_00000DEADBEEF]

# If you want to use 16:9 or 4:3 on this tivo
#aspect169=true

#width=1440
#height=720
#audio_br=320K
#video_br=12Mi
#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 %(ffmpeg_prams)s %(format)s

[MyMovies]
# Type can be 'video', 'music', or 'photo'
type=video

# Path is the full path to your files (No trailing slash needed)
# For windows: path=c:\videos
# For linux: path=/media
path=/mnt/RootShare/downloads/complete

# You can have more than one share
#[MyTelevision]
#type=video
#path=/mnt/


[_tivo_HD]
# section for default video options applicable to all HD TiVos
# see pyTivo Web Configuration for all available settings

[_tivo_SD]
# section for default video options applicable to all SD TiVos
# see pyTivo Web Configuration for all available settings
#########################################################



Create pytivo.sh in directory /root/PyTivo/ and enter this

Code: Select all

##########################################################
# chkconfig: 2345 99 05
# description: pyTivo server

### INIT INFO
# Provides: pytivo
# Required-Start: $network
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-description: pyTivo server
# Description: Start and stop the pyTivo server.
# Startup Script for use on Linkstation based NAS products
# By Jon Ogden, NA9D
# Based on the script posted by armoo at http://pytivo.armooo.net/wiki/initd
# Requires enhanced PS command for the Linkstation. See instructions at:
# http://buffalo.nas-central.org/index.ph ... sion_of_ps
### END INIT INFO

RETVAL=0

start() {
echo -n "Starting pyTivo: "
ps ax | grep pyTivo.py | grep -v grep
RETVAL=$?
[ $RETVAL -eq 0 ] && echo "pyTivo already running: Exiting" && exit 1

# this call actually starts pyTivo. - Edit it according to your exact path.
python /root/PyTivo/pyTivo.py > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}

stop() {
echo -n "Stopping pyTivo: "
kill `ps ax | grep pyTivo.py | grep -v grep | awk '{print $1}'`
echo
[ $RETVAL -eq 0 ] && echo -n "done"
echo
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
sleep 1
start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit $RETVAL
##################################################################
On your Freenas website go to System -> Advance -> Command Scripts and enter this
"/root/PyTivo/pytivo.sh start"
This will start PyTivo everytime you start you Freenas box.

These instruction might need a little tweaking, but it should get you close.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

ogreinside
NewUser
NewUser
Posts: 1
Joined: 28 Dec 2014 01:17
Status: Offline

Re: [HOWTO] pyTivo on FreeNAS to act as a server for TiVo

#2

Post by ogreinside » 30 Dec 2014 07:51

I wanted to run pyTivo in a FreeBAD jail, not on Windows. Also, I found I needed tivodecode to allow transferring of all my file. I posted instructions here on a FreeNAS 9.3 jail if anyone finds this useful: https://forums.freenas.org/index.php?th ... ail.26190/

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4941
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] pyTivo on FreeNAS to act as a server for TiVo

#3

Post by raulfg3 » 31 Dec 2014 18:40

thanks a lot. this is a bit old post, and your work will revive it a bit.
12.0.0.4 (revision 6766)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes

bgold
Starter
Starter
Posts: 59
Joined: 23 May 2015 08:42
Status: Offline

Re: [HOWTO] pyTivo on FreeNAS to act as a server for TiVo

#4

Post by bgold » 22 May 2016 00:11

Anybody else having issues with pytivo playing back videos choppy since a recent update? Not sure if it is nas4free 10.2 or 10.3 or updating pytivo to the latest version. Most of my older movies that were converted to mkv are playing back choppy.

I will try converting on again and see if that resolves the issue, I kind of hope not since I will be converting hundreds of mkv files.

Thanks
XigmaNAS 12.0.0.4.6625
HP ML150 Gen9, Dual 2.4ghz, 256gb, 25TB Storage, 3-ZFS pools w/SSD cache&logs, SSD boot/data, SFP+

Post Reply

Return to “Packages”