xine or VLC Playing video files after being triggered by a CLI RS-232 input
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
Last edited by PaulGraham; 06-21-2009 at 01:09 PM.
Reason: Added script
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.