rc interface spikes CPU?
Posted: 07 Jan 2006 00:54
by dbrossard
I have coded a nice little PHP server to launch VOD and such. I was hoping to use the rc interface to allow people to send text messages via the marquee to the playing video. The problem is, if I stream with rc as the interface it sends the load on my linux server up to over 1.8. If I use the http interface it is much nicer and hovers around .7.
Why is the telnet interface so much more of a hog than the http interface? Is there any way to update the marquee text via the http interface, or any other interface other than the telnet remote control?
PHP server and VOD
Posted: 11 Jan 2006 22:45
by tramfam
Could you share your approach (and maybe code) with us on how you've set it up?
Thanks
Sure
Posted: 12 Jan 2006 18:22
by dbrossard
I wrote a PHP script that reads a directory listing and creates a High bandwidth and Low bandwidth link. Clicking on High executes the shell code: vlc --logfile="/var/www/vlc-log.html" --logmode=html -I http --http-host :8081 "$1" vlc:quit --sout='#transcode{vcodec=mp4v,vb=512,scale=1}:duplicate{dst=std{access=http,mux=asf,url=:8080}}' &
Clicking on the Low Bandwidth executes:
vlc -vvv --logfile="/var/www/vlc-log.html" --logmode=html -I http --http-host :8081 "$1" vlc:quit --sout='#transcode{vcodec=mp4v,vb=384,scale=1,acodec=mpga,ab=64,channels=2}:duplicate{dst=std{access=http,mux=asf,url=:8080}}' &
Then I wrote a web page that also sends http requests for pausing, rewinding or fastforwarding 1 minute or 5 minutes.
I also wanted to be able to send messages via the marquee but you can only update that via the rc interface as far as I can tell. I don't understand why the rc interface takes so much more CPU power than the http interface. In face it takes more than my CPU can handle and its a 2.4ghz celeron.
Is there ANY other way to update the marquee other than the RC interface? Is there any way to update it via http or code it into the http interface?
If anyone is interested in my PHP code let me know. I can probably send a zip file with my scripts.