LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   xine or VLC Playing video files after being triggered by a CLI RS-232 input (http://www.linuxquestions.org/questions/linux-software-2/xine-or-vlc-playing-video-files-after-being-triggered-by-a-cli-rs-232-input-734276/)

PaulGraham 06-19-2009 06:37 PM

xine or VLC Playing video files after being triggered by a CLI RS-232 input
 
Hi - (Long time reader, first time asker...)

Here is my issue. I am working with a Community access TV Station. (Read "Free TV" or "Wayne's World" for the Non US readers.) and we are trying to broadcast from a computer. I, of course, chose linux for the box in question, mostly because it needs to run 99.9999 of the time, and I needed the scriptability.

So, We have a CentOS 5.3 box running on a home built quad core w/ 8GB ram and a GeForce FX 5200 for a vid card. It has s-vidio and DVI-I ports. It is now connected to a standard VGA monitor (via a DVI to VGA adapter) and a TV studio monitor (via an s-video to RCA adapter that will go straight to an s-video switcher in production.) Currently, I am running this crappy little script listening to /dev/ttyS0;

#!/bin/bash
while [ -e "/service/play_vid/run" ]
echo $$ > /usr/bin/play_vid.pid

do
read FILE < /dev/ttyS0
playing $FILE
killall xine
xine -pfhq --no-splash --no-logo $FILE&
done
rm -f /usr/bin/play_vid.pid

It works, but has many shortcomings. (once started it can't be stopped, panics on certain sized files, can't start midway through, can't be started via init'd or djb's daemon tools, etc.) What I would /like/ to so is replace xine with vlc. That would give many of the items I want right from it's command line, the only problem I am running into is that I can't make it run inside a script, only directly from a command line. (Where it works just fine.) The real thing I need, more than anything, is for this thing to start unattended on boot.

WTF am I doing wrong, or, is there a better solution?

(I am also having dual-head issues, and am, honestly wondering if that is somehow related.)

FYI, This is the command used to trigger the playback from another machine.
echo /mnt/video_bins/pub/p-earth_talk-Matthew_Preston-123-20090418-300.mkv > /dev/ttyS1
(/dev/ttyS1 is the port on the machine connected to the video play machine via a null-modem cable. this is simulating a piece of TV broadcast hardware that also sends a small string via an RS-232 port.)

Thanks for any insight you might have...

Paul

David the H. 06-21-2009 04:28 AM

Your link doesn't lead to the script. It just shows an "unkown or expired post" page.

If it's not too long, try posting it here directly.

PaulGraham 06-21-2009 01:10 PM

Quote:

Originally Posted by David the H. (Post 3581144)
Your link doesn't lead to the script. It just shows an "unkown or expired post" page.

If it's not too long, try posting it here directly.

Hmmm, I don't know why, but there it is. (I hope this is a "Good Question")


All times are GMT -5. The time now is 10:50 AM.