Skip to content

Commit

Permalink
the vlcWrapper.bash and vlcPaWrapper.bash support adding custom options
Browse files Browse the repository at this point in the history
now
  • Loading branch information
Tom-Hirschberger committed May 23, 2023
1 parent a0962d3 commit 0356f09
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
12 changes: 11 additions & 1 deletion scripts/vlcPaWrapper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,23 @@ trap exit_script exit

NEW_VOLUME=$1
STREAM=$2

ADD_ARG_CNT=$(($#-2))
if [ ${ADD_ARG_CNT} -gt 0 ]
then
ADD_OPTS=${@:3:$ADD_ARG_CNT}
else
ADD_OPTS=""
fi


IDENTIFIER="video"
#FILE_PATH=`readlink -f $0`
#CUR_DIR=`dirname $FILE_PATH`
PA_VOLUME="/usr/local/sbin/pa_volume"

"$PA_VOLUME" "$IDENTIFIER" "$NEW_VOLUME"
/usr/bin/vlc -vvv -I dummy "$STREAM" vlc://quit 2>&1 &
/usr/bin/vlc -vvv ${ADD_OPTS} -I dummy "$STREAM" vlc://quit 2>&1 &
sleep 1
VLC_PID=$!
echo "PID is $VLC_PID"
Expand Down
9 changes: 8 additions & 1 deletion scripts/vlcWrapper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,15 @@ exit_script() {
trap exit_script exit

STREAM=$1
ADD_ARG_CNT=$(($#-1))
if [ ${ADD_ARG_CNT} -gt 0 ]
then
ADD_OPTS=${@:2:$ADD_ARG_CNT}
else
ADD_OPTS=""
fi

/usr/bin/vlc -vvv -I dummy "$STREAM" vlc://quit 2>&1 &
/usr/bin/vlc -vvv ${ADD_OPTS} -I dummy "$STREAM" vlc://quit 2>&1 &
sleep 1
VLC_PID=$!
echo "PID is $VLC_PID"
Expand Down

0 comments on commit 0356f09

Please sign in to comment.