Hi guys,
I have one script for recording video streaming on server, but it's only working with mplayer, and I want this to work with VLC player too.
Here is the script:
HOST=localhost
if [ ! $1 ]
then
echo "Usage: record.sh <filename> <optional-host>"
exit 0
fi
if [ $2 ]
then
HOST=$2
fi
if [ ! -d /tmp/records ]
then
mkdir -p /tmp/records
fi
echo "*** Recording ***"
mplayer ffmpeg://rtsp://$HOST:554 -dumpvideo -dumpfile /tmp/records/$1
I've try to change 'mplayer' with 'vlc' / 'vlc-wrapper' / ' sudo -u myuser' but I'm facing this errors:
1. When changing 'mplayer' with 'vlc' :
** Recording ***
VLC is not supposed to be run as root. Sorry.
If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root and
cannot be run by non-trusted users first).
2. When changing 'mplayer' with 'sudo -u myuser vlc':
*** Recording ***
VLC media player 2.0.5 Twoflower (revision 2.0.5-0-g1661b7d)
[0xf98138] main libvlc error: cannot open config file (/root/.config/vlc/vlcrc): Permission denied
vlc: unknown option or missing mandatory argument `-u'
Try `vlc --help' for more information.
Any suggestions are more than welcome.
Thanks!

