I get a weird thing happening:
I start twonkymedia on the command line and when I stop my shell it dies.
Anyone seen this?
Is a good alternative if you want to edit unix files under windows
I get a weird thing happening:
I start twonkymedia on the command line and when I stop my shell it dies.
Anyone seen this?
Hopefully this may be of some use to those of you who use Twonky and have had issues with getting it to autostart on system reboot.
Before this I couldn't get Twonky to autostart i always had to go in and start it.
The following information is based on the latest KC firmware ver 1.0.7.8.
Anyway enough of that on with the code.
I have found version 4.4 of twonky to be problematic, (ie) I couldn't view any divx files however I have found that version 4.2 and v.4.3 work with no issues
You need to create a couple of files.
I am assuming that you have twonkymedia files located in /opt/etc/twonky
adjust the file below as necessary
File 1. /opt/etc/init.d/S82twonky
place code below into this file.
Chmod 755 /opt/etc/init.d/S82twonky
#!/opt/bin/sh
PATH=/opt/bin:/opt/sbin:/usr/sbin:/usr/bin:/sbin:/bin
DAEMON=/opt/etc/twonky/twonkymedia
NAME=ushare
DESC="Twonky UPnP A/V Media Server Version 4.2"
PIDFILE=/var/run/twonky.pid
start() {
if [ -f $PIDFILE ]; then
echo "Warning : $PIDFILE still present. Unclean shutdown ?"
kill -s 9 `cat $PIDFILE` 2>/dev/null
rm -f $PIDFILE 2>/dev/null
fi
echo -n "Starting $DESC... "
$DAEMON
echo "done"
}
stop() {
echo -n "Stopping $DESC... "
if [ -f $PIDFILE ]; then
kill -9 `cat $PIDFILE` 2>/dev/null
killall -9 twonkymediaserver
rm -f $PIDFILE 2>/dev/null
fi
echo "done"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo "Usage: $0 (start|stop|restart)"
exit 1
;;
esac
next we create the file which crontab will run to check if twonky has been started. This will check if the pid has been put in the /var/run location.
if the file exists then it will simply exit.
File 2. /opt/etc/twonky-autostart.sh
again make sure you chmod 755 twonky-autostart.sh.#!/opt/bin/bash
# check for running pid and if not present
# start twonky.
# requires you to have S82twonky in init.d
# put in cron as a job and run every 5 minutes
PIDFILE=/var/run/twonky.pid
if [ -f $PIDFILE ]; then
exit 0;
else
/opt/etc/init.d/S82twonky start
fi
Finally
put a check in your crontab to run this every 5 minutes.
like so
*/5 * * * * /opt/etc/twonky-autostart.sh
Giz1007
Hi,
Impressive, but, I have only this in my rc.local:
and I shut down my Asus every day, and it starts up with Twonky (4.4), no problem.Code:#Start Twonkymedia, before changing library_path /opt/share/TwonkyMedia/twonkymedia &
Regarding divx, you probably should remove
Code:MT:avi,divx video/avi
in the clients.db (in directory resources)
Love,
Marc
ciao Mark,
does twonky media streams also video files? it is not clear to me!
thanx!
Michele, I was not aware of your question upon today.
Yes Twonky can stream video files, but I never tried that really. I have a Ziova Clearstream that is capable to show video's, and I have tried that only with an iso-file, which it reaches through shares, not via Twonky.
But I think you already know much more about Twonky's video capabilities than me.
Greets,
Marc
ciao Marc,
i followed your steps but what I get when I try to run ./twonkymedia is
/opt/lib/libpthread.so.0: no version information available (required by ./twonkymedia)
can you help me?
I never needed a manual for this. Just enter http://asus:9000/ where asus is the ip-address of your router, than hit the Twonky mediasettings tab.
There is also the website and a forum, so look around and find.
I ought not reply...
Marc
thanks anyway Marc!
Twonky seems to work fine with PS3 although somtetimes I have DLNA server errors.
Up to know I resolved simply rebooting PS3. It would be nice to understand weather the problem is releated to Asus, PS3 or Twonky!
Then it would be wise to look at the twonky forum.
http://www.twonkyforum.com/viewforum...f972096da8aa3b
Rgds
Marc
Last edited by mumsoft; 13-05-2008 at 20:56.
I found an interesting hint yesterday night: it seems Twonky can't work properly if the HD is in sleep mode.
What happen my PS3 can't recognize proper media format, thus "unsupported file format" is displayed.
Even if you try to force playback you still have an error.
To solve the problem simply reboot your asus. It is not an elegant solution but it's fast.
I have worked with Twonky for about a year on a HD that slept after a while, and never got such problems. If I started music or looked at pictures the HD just waked up and it only took some more time to get started.
But because some process in the Asus (the log?) wakes up the HD from time to time, I now have K.C. Furge's way of silencing it, which also means it never sleeps. This is more of an elegant solution, and much faster. Rebooting the Asus, urging Twonky to read all the media again, isn't fast at all.
Regards
Marc
ciao Marc,
I have KFurge FW, and in rc.local I have exactly the same parameters you have (or at least posted) in yours.
I was managing movies actually, i did not try with music or pics but that was the result.
Is it maybe something due with PS3 then: what are you using as client with twonky?