pyTivo Discussion Forum Forum Index pyTivo Discussion Forum
Answers and the development of pyTivo a TiVo transcoding server
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pytivo on Synology Diskstation
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Support
 View previous topic :: View next topic  
Author Message
Iluvatar



Joined: 29 Feb 2008
Posts: 337

PostPosted: Fri Sep 16, 2011 1:34 pm    Post subject: Reply with quote

Did you bootstrap your Synology? If so are you using the correct repository for your device?

I don't have experience with GIT but you could always do it the old fashioned way and copy a pytivo folder into the synology manually.

_________________
My pyTivo fork - Read link for changes
FFmpeg for OS X
Back to top
View user's profile Send private message
txporter



Joined: 11 Dec 2008
Posts: 265
Location: Austin, TX

PostPosted: Fri Sep 16, 2011 2:32 pm    Post subject: Reply with quote

Iluvatar wrote:
Did you bootstrap your Synology? If so are you using the correct repository for your device?

I don't have experience with GIT but you could always do it the old fashioned way and copy a pytivo folder into the synology manually.


Yes, did bootstrap (can't actually use ipkg without that). I am not sure on the repository. Do you know how to check it? I think it was automagically configured when I bootstrapped but dunno.

Yeah, I can do it with wget/mv/etc, but the git pull is very elegant when it works.

BTW, I have successfully gotten pytivo, webshell, and hmeforpython to launch at startup. The only thing I am still having trouble with now is the git pulls.

Init.d files (located in /usr/local/etc/rc.d). 3 different versions, all based on pytivo.sh script (just replace with necessary path/executable file):
Code:
RETVAL=0

start() {
echo -n ""Starting pyTivo: ""
pgrep -f pyTivo.py
RETVAL=$?
[ $RETVAL -eq 0 ] && echo ""pyTivo already running: Exiting"" && exit 1

sh /usr/local/pyTivo/start.sh > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL -eq 0 ] && echo -n ""done""
echo
return $RETVAL
}

stop() {
echo -n ""Stopping pyTivo: ""
kill -9 `pgrep -f pyTivo.py`
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && echo -n ""done""
echo
return $RETVAL
}

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


start.sh file (for program launch, called within init.d scripts):
Code:
sleep 10
/opt/bin/python /usr/local/pyTivo/pyTivo.py > /dev/null 2>&1 &


rc.local file (in /etc, which actually forces the synology to launch the programs in /usr/local/etc/rc.d)
Code:
#!/bin/sh

# Optware setup
[ -x /etc/rc.optware ] && /etc/rc.optware start
sh /usr/local/etc/rc.d/pytivo.sh start > /dev/null 2>&1 &
sleep 15
sh /usr/local/etc/rc.d/webshell.sh start &
sleep 15
sh /usr/local/etc/rc.d/hme.sh start > /dev/null 2>&1 &

exit 0


Adjust sleep time based on how much sleep is used in the start.sh scripts.
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 337

PostPosted: Fri Sep 16, 2011 3:12 pm    Post subject: Reply with quote

Thanks for the script update.

Thinking about it after the fact you should already be running the correct repository assuming you chose the bootstrap package that was appropriate for the CPU in your Synology.

As to the GIT issue, I googled it and the first thing it came up with in relation to Synology was a user tip to make sure textutils was installed and then start a new pull. Not sure if it will do anything but worth the shot.

Code:

ipkg install textutils


Source
Back to top
View user's profile Send private message
txporter



Joined: 11 Dec 2008
Posts: 265
Location: Austin, TX

PostPosted: Fri Sep 16, 2011 6:08 pm    Post subject: Reply with quote

Excellent! I should have just googled that myself. Works great now.

Here is my script for updating pytivo:
Code:
cd /usr/local/pyTivo
kill -9 `pgrep -f pyTivo.py`
git pull
screen python /usr/local/pyTivo/pyTivo.py > /dev/null 2>&1


I was never able to get nohup to work, but screen will leave a process running after I kill the ssh session. I cannot background the screen process though because it immediately ends the screen session, so I just need to launch pytivo with screen and then kill the session.
Back to top
View user's profile Send private message
nvt



Joined: 28 Jan 2012
Posts: 2

PostPosted: Fri Aug 24, 2012 9:28 pm    Post subject: Reply with quote

[quote="jcthorne"]I finally got both pytivo and HME for python running on the Synology and starting from boot. As suggested, I'l move the start scripts from /usr/syno to usr/local to preserve them through a firmware update.

Since you managed to work through this is there any chance you can share the steps for everyone's benefit
I am on the same journey with very limited linux experience so some of the things listed appear foreign and getting to the directories a challenge. It was also not clear what you needed to download and install on the synology box for all this to work

Thanks,
Back to top
View user's profile Send private message
HeyTom



Joined: 08 Sep 2012
Posts: 1

PostPosted: Sat Sep 08, 2012 6:14 pm    Post subject: Thread won't start Reply with quote

I'm trying to get pyTivo to run on a Synology 207+ but I can't get the admin page (http://NAS:9032) to show up.

I have the latest wmcbrine code. Here's my conf (the file paths do exist)

[Server]
port=9032
ffmpeg=/usr/syno/bin/ffmpeg
debug=True
[MyMovies]
type=video
path=/volume1/tivo

The output when I run pyTivo.py goes as follows:

INFO:pyTivo:Python: 2.5.6
INFO:pyTivo:System: Linux-2.6.15-armv5tejl-with-glibc2.0
INFO:pyTivo.beacon:Announcing shares...

Then it just stops and i have to kill the process.

I've been able to do a little further debugging.
In beacon.py the line
self.rz = Zeroconf.Zeroconf()
doesn't come back because in Zeroconf.py the line
self.engine = Engine(self)
doesn't come back because in the method
def __init__(self, zc):
the line
self.start()
doesn't come back.

So I'm guessing that it can't start a thread, but why? It's running as root.

Any help is appreciated, and this is my first experience with Python and pyTivo.


Update:
I got it to work by puting the line
rz = Zeroconf.Zeroconf()
before calling the main loop. I don't know why this works. I did it on a whim to check into the failure further.

Either way, since I've discovered xbmc, I doubt I'll be working with this anymore.
Back to top
View user's profile Send private message
johnh123



Joined: 09 Apr 2012
Posts: 1

PostPosted: Sat Jan 05, 2013 4:02 am    Post subject: Reply with quote

Anyone have any luck yet getting tivodecode working on the synology?
Back to top
View user's profile Send private message
nsayer



Joined: 07 Mar 2013
Posts: 4

PostPosted: Thu Mar 07, 2013 3:08 am    Post subject: partial success Reply with quote

I've got pyTivo running on my DS412+ (using the just release DSM 4.2).

Most of my videos are rips from DVDs that have been made with Handbrake's iPhone 4 setting. It appears that it's functional... sort of.

It's wanting to use ffmpeg to... I assume transcode the video. It's doing something and reporting getting about 21 fps, so just less real time, it would seem.

The other issue is that the menus are showing an @eaDir directory. I'm guessing this is an artifact of using AFP to move the movies in and stuff?

Is there something to do to get pyTivo to ignore files/dirs that start with @?
Back to top
View user's profile Send private message
Iluvatar



Joined: 29 Feb 2008
Posts: 337

PostPosted: Thu Mar 07, 2013 3:26 am    Post subject: Reply with quote

It's something I've fixed in my fork. Its an easy change.

Take a look at the code: http://repo.or.cz/w/pyTivo/wmcbrine/taylor.git/blobdiff/295db0121c69df2e2bfcaf56a2303fd282f19523..dd244e42c6b46de0e3160caa576610d352dd1660:/plugin.py

_________________
My pyTivo fork - Read link for changes
FFmpeg for OS X
Back to top
View user's profile Send private message
nsayer



Joined: 07 Mar 2013
Posts: 4

PostPosted: Thu Mar 07, 2013 3:40 am    Post subject: Reply with quote

Thanks, that looks like the right thing to do to me.

Any thoughts on the 21 fps ffmpeg processing?
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2621
Location: Maryland

PostPosted: Thu Mar 07, 2013 4:30 am    Post subject: Reply with quote

nsayer wrote:
Any thoughts on the 21 fps ffmpeg processing?

I assume these are MP4 files? If so, you can try to avoid transcoding them, either by using the "Push" function (where you initiate the transfer from pyTivo's web interface, rather than the TiVo's menus), or else by adding "ts = on" to the Server section of your pyTivo.conf, which will remux them to transport streams when you pull them from the TiVo's menus (still invoking FFmpeg, but you should get much better than 21 fps).

_________________
My pyTivo fork . My page
Back to top
View user's profile Send private message Visit poster's website
nsayer



Joined: 07 Mar 2013
Posts: 4

PostPosted: Thu Mar 07, 2013 4:57 am    Post subject: Reply with quote

Looks like that didn't work.

INFO:pyTivo.video.video:[06/Mar/2013 20:54:39] Start sending "/volume1/Movies/M/MXC/MXC_S5_Disc_1_4.m4v" to Living Room
ffmpeg version UNKNOWN, Copyright (c) 2000-2011 the FFmpeg developers
built on Feb 4 2013 12:23:57 with gcc 4.2.1
configuration: --arch=i686 --target-os=linux --cross-prefix=/usr/local/i686-linux-gnu/bin/i686-linux-gnu- --enable-cross-compile --enable-optimizations --disable-yasm --disable-altivec --enable-pic --enable-shared --disable-static --disable-swscale-alpha --disable-ffserver --disable-ffplay --enable-libmp3lame --enable-libfaac --enable-nonfree --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --disable-decoder=amrnb --cc=/usr/local/i686-linux-gnu/bin/i686-linux-gnu-ccache-gcc
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.120. 0 / 52.120. 0
libavformat 52.108. 0 / 52.108. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 77. 0 / 1. 77. 0
libswscale 0. 14. 0 / 0. 14. 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x80716c0] max_analyze_duration reached

and then a little further down

Unrecognized option 'bsf'
INFO:pyTivo.video.video:[06/Mar/2013 20:54:39] Done sending "/volume1/Movies/M/MXC/MXC_S5_Disc_1_4.m4v" to Living Room, 0 bytes, 0.00 Mb/s
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2621
Location: Maryland

PostPosted: Thu Mar 07, 2013 5:12 am    Post subject: Reply with quote

You need a more recent FFmpeg.
_________________
My pyTivo fork . My page
Back to top
View user's profile Send private message Visit poster's website
nsayer



Joined: 07 Mar 2013
Posts: 4

PostPosted: Thu Mar 07, 2013 5:19 am    Post subject: Reply with quote

wmcbrine wrote:
You need a more recent FFmpeg.


Oh, that's the one bundled with the NAS. I'll just put up with the transcoding for now. When/if I feel ambitious I'll build a new one.
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2621
Location: Maryland

PostPosted: Thu Mar 07, 2013 5:51 am    Post subject: Reply with quote

Try pushing...
_________________
My pyTivo fork . My page
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    pyTivo Discussion Forum Forum Index -> Support All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 
Jump to:  
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
Site is in NO WAY affiliated with TiVo Inc

Powered by phpBB © 2001, 2005 phpBB Group
phpBB SEO

Get pytivo at SourceForge.net. Fast, secure and Free Open Source software downloads
[ Time: 0.1041s ][ Queries: 12 (0.0080s) ][ GZIP on - Debug on ]