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
rtamura



Joined: 26 Mar 2013
Posts: 1

PostPosted: Tue Mar 26, 2013 4:01 am    Post subject: no files when running on start up Reply with quote

Ok I recently set up a 213, I have pytivo working when I start it through SSH as root... but when it runs from the script in rc.local, pytivo starts up, and I can see the shared folders through the Tivo menu, but there are no files in the folders. I assume it's some kind of permissions thing, what account do the scripts run under?

I'm a developer, but the last time I used unix was 20 years ago in college.

[Server]
port = 9032
ffmpeg = ffmpeg=/opt/bin/ffmpeg
tivo_username = XXXX
tivo_password = xXXXXXX
tivo_mak = XXXXXXXXX

[MyMovies]
type = video
path = /volume1/VIDEO

[_tivo_SD]

[_tivo_HD]
Back to top
View user's profile Send private message
omen124



Joined: 26 Nov 2012
Posts: 14

PostPosted: Tue Nov 26, 2013 11:56 am    Post subject: Reply with quote

I recently updated to DSM 4.3 and I have tried multiple locations (/root, /usr/syno/etc/rc.d/ and the other 2 recommended here) for .sh to auto run and none of them seem to work, to make sure I had installed pyTivo properly I ran:
$ sh /usr/local/etc/rc.d/pyTivo.sh start
and i got a response "done" and the pytivo software booted up and works, but I dont want to have to do this manually every time I reboot my NAS just to leave a text box open to keep it running on another computer. Any idea why these .sh aren't auto running?
Back to top
View user's profile Send private message
zymurgeek



Joined: 13 Apr 2014
Posts: 1

PostPosted: Sun Apr 13, 2014 1:31 pm    Post subject: Running pyTivo at NAS Start Reply with quote

omen124 wrote:
I recently updated to DSM 4.3 and I have tried multiple locations (/root, /usr/syno/etc/rc.d/ and the other 2 recommended here) for .sh to auto run and none of them seem to work, to make sure I had installed pyTivo properly I ran:
$ sh /usr/local/etc/rc.d/pyTivo.sh start
and i got a response "done" and the pytivo software booted up and works, but I dont want to have to do this manually every time I reboot my NAS just to leave a text box open to keep it running on another computer. Any idea why these .sh aren't auto running?


It looks like the old location of /usr/local/etc/rc.d doesn't get run at start-up anymore. /usr/syno/etc/rc.d does, but you need to name the script starting with S99 for it to get run. I put more details in a post on my blog here:
http://www.familytidings.com/blog/?p=1300
Back to top
View user's profile Send private message
runderwear



Joined: 12 Jun 2014
Posts: 5

PostPosted: Thu Jun 12, 2014 8:52 pm    Post subject: don't see all video files unless I run from command line Reply with quote

Just upgraded to DSM 5. Downloaded updated pyTivo. Scoured system clean of existing copies to the best of my abilities. Put on new pyTivo, properly edited files for locations.

When pyTivo - actually S99pyTivo.sh in /usr/syno/etc/rc.d - is launched on startup, I see only 6 of my movie files on the tivo or NAS:9032. But if I telnet into the NAS and stop pyTivo and launch it from the command line, tivo sees all 35 or so movies.

Suggestions anyone?

And of course a thank you very much to you William.

Thanks!

PyTivo.sh:

Code:
RETVAL=0

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

            /bin/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 `ps |grep pyTivo.py |grep python | awk -F" " '{print $1}'`
            RETVAL=$?
            echo
            [ $RETVAL -eq 0 ] && echo -n "done"
            echo
             return $RETVAL                                                       
    }                                                                           

    case $1 in                                                                   
    start)                                                                       
            start                                                             
            ;;                                                               
    stop)                                                                     
            stop                                                             
            ;;                                                               
    restart)                                                                 
            stop                                                             
            sleep 1                                                           
            start                                                             
            RETVAL=$?                                                         
            ;;                                                               
    *)                                                                       
    echo "Usage: $0 [start|stop|restart]"     
    exit 1                                     
    esac                                       
    exit $RETVAL


start.sh

Code:
sleep 30
/usr/bin/python /usr/local/pyTivo/pyTivo.py > /dev/null 2>&1 &


pyTivo.conf

Code:
[MyMovies]
path = /volume1/movies
force_alpha = on
type = video

[_tivo_SD]

[_tivo_HD]
audio_ch = 2

[Server]
tivo_password = xxxxxxxxxx
tivo_username = xxxxxxxxx
ffmpeg = /usr/syno/bin/ffmpeg
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2621
Location: Maryland

PostPosted: Thu Jun 12, 2014 11:09 pm    Post subject: Re: don't see all video files unless I run from command line Reply with quote

runderwear wrote:
When pyTivo - actually S99pyTivo.sh in /usr/syno/etc/rc.d - is launched on startup, I see only 6 of my movie files on the tivo or NAS:9032. But if I telnet into the NAS and stop pyTivo and launch it from the command line, tivo sees all 35 or so movies.

My first guess would be a permissions issue. What does ls -l /volume1/movies say?

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



Joined: 12 Jun 2014
Posts: 5

PostPosted: Thu Jun 12, 2014 11:35 pm    Post subject: Re: don't see all video files unless I run from command line Reply with quote

wmcbrine wrote:
runderwear wrote:
When pyTivo - actually S99pyTivo.sh in /usr/syno/etc/rc.d - is launched on startup, I see only 6 of my movie files on the tivo or NAS:9032. But if I telnet into the NAS and stop pyTivo and launch it from the command line, tivo sees all 35 or so movies.

My first guess would be a permissions issue. What does ls -l /volume1/movies say?


Some of the filenames, which I removed to hide my porn, have some foreign characters in them. However, why would that make some files - most of which don't have odd characters in them - not show on startup, vs show when executed by command line?

Anyway here's the lowdown. Thanks for your ideas.

drwxr-xr-x 2 root users 4096 Jun 11 10:10 @eaDir
drwxr-xr-x 2 admin users 4096 Nov 19 2013 A Prophet [2009]


SLICE.

Ok I stopped being lazy and took out the tilde and accent over the i, from that one movie file, and all the other ones now show. I can't comprehend why this would make a difference when the script starts from the command line vs startup. Thanks for everything though!
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2621
Location: Maryland

PostPosted: Fri Jun 13, 2014 4:03 am    Post subject: Reply with quote

Perhaps the locale is changing between the startup and login environments?
_________________
My pyTivo fork . My page
Back to top
View user's profile Send private message Visit poster's website
runderwear



Joined: 12 Jun 2014
Posts: 5

PostPosted: Fri Jun 13, 2014 10:52 am    Post subject: Reply with quote

wmcbrine wrote:
Perhaps the locale is changing between the startup and login environments?


Thanks. How do I check this? Apologies, my linux skills are lacking.
Back to top
View user's profile Send private message
wmcbrine



Joined: 04 Jan 2008
Posts: 2621
Location: Maryland

PostPosted: Fri Jun 13, 2014 3:41 pm    Post subject: Reply with quote

Type "locale" at the command line. I'd expect to see a lot of "en_US.UTF-8", but it depends on your distro. Then, call locale durint the startup sequence, and redirect its output. I'm guessing you may see "POSIX".
_________________
My pyTivo fork . My page
Back to top
View user's profile Send private message Visit poster's website
runderwear



Joined: 12 Jun 2014
Posts: 5

PostPosted: Fri Jun 13, 2014 4:58 pm    Post subject: Reply with quote

wmcbrine wrote:
Type "locale" at the command line. I'd expect to see a lot of "en_US.UTF-8", but it depends on your distro. Then, call locale durint the startup sequence, and redirect its output. I'm guessing you may see "POSIX".


Thank. OK:

When run from command line, locale gives this:

Code:
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=en_US.utf8


When run from the script on boot, locale gives this:

Code:
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=


<del>But I don't know what it means. Do I want them to be the same and if so, how do I go about doing that?</del, dammit>

Ok now I know what it means, AND I know how to globally set them in my shell. However, we can see that these profile are already set to utf 8 in the shell. It's the init scripts that don't use utf 8. So can I set these inside the pyTivo.sh file?

Thanks again.
Back to top
View user's profile Send private message
runderwear



Joined: 12 Jun 2014
Posts: 5

PostPosted: Sat Jun 14, 2014 6:30 pm    Post subject: Reply with quote

wmcbrine wrote:
Type "locale" at the command line. I'd expect to see a lot of "en_US.UTF-8", but it depends on your distro. Then, call locale durint the startup sequence, and redirect its output. I'm guessing you may see "POSIX".


So I finally solved this by not being lazy. I didn't know if inserting an LC_ALL line into the pyTivo.sh script would cause a problem or not, so I didn't do it.

Later I decided to add these lines to the file, at the top:

Code:
RETVAL=0
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
export LANG LC_ALL


And that solved the problem! I have no idea if this is an inelegant solution or not.
Back to top
View user's profile Send private message
mw



Joined: 30 Jun 2014
Posts: 3

PostPosted: Thu Jul 10, 2014 5:54 pm    Post subject: Transcoding on NAS? Reply with quote

I've read some older posts about very slow transcoding speeds on NAS, and recommendations to transcode first, then store on NAS for pytivo to access.

I wonder, as NAS processor performance increases, if that is still the case. There are several Synology NAS boxes with dual core Intel Atom (2.13 GHz) and 1GB of DDR3 (DS713+, DS412+).

Does anyone know if transcoding performance on them is tolerable, such that I don't have to transcode before putting video files on the NAS? This is how I use my PC today - I don't worry much about video formats, let pytivo take care of it for me, and pull the files from my Tivo Roamio.

Thanks!
Back to top
View user's profile Send private message
philhu



Joined: 04 Jan 2008
Posts: 815
Location: Boston, MA

PostPosted: Fri Jul 11, 2014 4:55 pm    Post subject: Reply with quote

I have a synology 1513+ with dual core intel. An HD 720p file in mkv format using pyTivo took 22 HOURS to transcode on the NAS at about 2.3 FPS and all the time starving the real use of the nas, transferring files, to less than half speed, about 30-45 mB/s

Experiment done. I bought a rack unit, put it in my basement, and run vmware on it and a centos6 linux vm to do pytivo and transcoding now, etc.
The pizza box (a dell 1950, with 2 disks in it), costs about $16/month to run and I find it well worth it.
Back to top
View user's profile Send private message
mw



Joined: 30 Jun 2014
Posts: 3

PostPosted: Fri Jul 11, 2014 6:31 pm    Post subject: Reply with quote

Thanks for the info! I guess I'll continue to rely on a computer for transcoding. Perhaps I'll move the files that have already been transcoded to a NAS, and can serve the others from a pytivo share on a PC.
Back to top
View user's profile Send private message
daneyuleb



Joined: 19 Feb 2015
Posts: 1
Location: United States

PostPosted: Thu Feb 19, 2015 1:10 pm    Post subject: Reply with quote

I'm getting a Synology-DiskStation NAS as well. I'm a little lost as to what the outcome of this thread ended up being.

In terms of PyTivo, is there a drawback to simply mapping the drive and pointing PyTivo at it, so it will transcode from the mapped NAS and send to the tivo? (Other than the obvious drawback of the computer being on). Treating the NAS basically just as I do now with my local disk, assuming network speeds are adequate?
Back to top
View user's profile Send private message AIM Address
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 6 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.1486s ][ Queries: 13 (0.0093s) ][ GZIP on - Debug on ]