VLC media player for Linux and friends Troubleshooting • Loud click on startup



I am on Linux Mint 21.2 Victoria. I have a small script that I use for Korean vocab practice, which uses cvlc, but there is always a loud click when I start the script and it plays the first file, which is a real pain if I have headphones on. After that, other files played by the script continue without the click. Is there any way of suppressing the click on startup? VLC sits on the taskbar after first run even tho’ cvlc closes, but the click still happens at next start of script. It is playing m4a type files (one Korean word per file), and I have also noticed that on very short files cvlc sometimes (not often) cuts off the end of the file.

Here is my script:

#!/bin/bash
if [ “$1” == “” ]
then
echo Please enter page number.
else
PAGE=$(expr $(expr $1 / 2) \* 2)
DIRECTORY=”./Korean/VisualDictionary/DK_VisualDictionary/P$(expr 1000 + $PAGE | cut -b 2,3,4)”

clear; echo Playing: Pages $PAGE and $(expr $PAGE + 1): Directory $DIRECTORY; #Debug line

#Loop forever (break with control-c)
while true
do
#We want to play files in different random order each time
for FILE in $(find $DIRECTORY -type f | sort -R)
do
#echo $FILE; #Debug Line
cvlc –no-loop –play-and-exit $FILE >/dev/null 2>&1

if [ “$2” == “” ]; then PAUSE=”2″; else PAUSE=”$2″; fi
sleep $PAUSE
done
done
fi

Statistics: Posted by digdogsdad — 11 Apr 2024 13:11