tarabyte
tarabyte

Reputation: 19202

How to run rest of script after launching VLC?

After I launch VLC, the terminal seems locked up. I can't even echo anything. I've tried forking the launching of VLC but that seems to just crash the whole script as well. Are there any other options? I'm using cvlc by the way because I don't care about the user interface. My other attempts are commented out with the hashtag:

echo "launching VLC player..."
# cvlc v412://dev/video1:standard=NTSC:width=640:height=480 &
# cvlc v412://dev/video1:standard=NTSC:width=640:height=480&
# cvlc & v412://dev/video1:standard=NTSC:width=640:height=480
cvlc v412://dev/video1:standard=NTSC:width=640:height=480

echo "can i see this in terminal?"

Thanks

Upvotes: 1

Views: 1805

Answers (2)

Bill Westrup
Bill Westrup

Reputation: 11

I found this one: Append vlc://quit to the end of the command. Not sure why it works, but it does. For example:

cvlc rtsp://$IP/$CAM_STRING --sout file/avi:$(date +%Y%m%d%H%M).avi --run-time=$RUN_TIME --stop-time=$RUN_TIME vlc://quit

Upvotes: 1

Ansgar Wiechers
Ansgar Wiechers

Reputation: 200453

Sending cvlc to the background with & works for me.

echo "launching VLC player..."
cvlc v412://dev/video1:standard=NTSC:width=640:height=480 &
echo "can i see this in terminal?"

Upvotes: 2

Related Questions