LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 06-19-2009, 06:37 PM   #1
PaulGraham
LQ Newbie
 
Registered: Oct 2008
Location: Oxford, Mich, USA
Distribution: CentOS/Fedora
Posts: 4

Rep: Reputation: 0
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
 
Old 06-21-2009, 04:28 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
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.
 
Old 06-21-2009, 01:10 PM   #3
PaulGraham
LQ Newbie
 
Registered: Oct 2008
Location: Oxford, Mich, USA
Distribution: CentOS/Fedora
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by David the H. View Post
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")
 
  


Reply

Tags
command, line, vlc, xine


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Install VLC on Fedora 7, but not playing any video ufmale Linux - Software 4 11-22-2008 02:19 AM
Trouble playing (only) There will be Blood DVD on xine and VLC redjokerx Linux - General 5 04-16-2008 12:08 PM
oh, you know. video topic: gstreamer, vlc, xine, mplayer netlogic Linux - Software 2 09-02-2007 04:20 PM
Mplayer and Xine create only green outputs on playing video files sn_piranha Linux - Software 5 10-10-2004 08:36 PM
No video window in VLC, mplayer and Xine always quit ? bagy Linux - Software 3 10-19-2003 12:08 PM


All times are GMT -5. The time now is 02:46 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration