writing vlc streaming scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For those that use command line linux I'll share a script I have working 
rather well first so you'll have the script to test, and second to point 
out a couple tips.
cut here.
#!/usr/bin/env bash
# file: treasuretrove.sh - play treasure-trove stream with vlc script
vlc -I rc --quiet http://lin2.ash.fast-serv.com:9022

cut here.
If you read the above script, a couple tips to point out here are in 
order.
1) the first line does not read #!/bin/bash for good reason, that slows 
script execution down noticeably a better form is as shown if the env 
command lives in /usr/bin on your systems.  An alternate first line might 
be `which env` bash and that may cover situations in which the location of 
env is unknown.  I write might since for whatever reason if env is not 
found which will exit with an errorlevel of 1 and then we have that case 
to handle.  This particular tip helps scripts execute faster generally.
2) vlc for command line users when run by itself with an url tends to cry 
lots about no $DISPLAY being set and dbus initialization failing at least 
on this talkingarch system over here.  Since that situation for vlc will 
not change, I first set the interface to rc that stands for remote control 
with -I rc and then I put the --quiet command line option on the vlc line.  
That -I rc turns on the command line interface what we want, and that 
--quiet option turns off all of vlc's complaining.
I did try -I ncurses interface, and did not find it any better than -I rc 
and -I rc if anything appeared to be more stable in operation for me.  
This is not the only script I have of this type, but the scripts with the 
other streaming urls I have very likely won't interest others all that 
much.  I may be able to use select in a script and consolidate all of 
these scripts into a single script in time.

 jude <jdashiel@xxxxxxxxxxxxxx>

_______________________________________________
Blinux-list mailing list
Blinux-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/blinux-list




[Index of Archives]     [Linux Speakup]     [Fedora]     [Linux Kernel]     [Yosemite News]     [Big List of Linux Books]