View previous topic :: View next topic |
Author |
Message |
mihaimcraciun n00b
Joined: 29 May 2013 Posts: 3
|
Posted: Wed May 29, 2013 1:34 pm Post subject: Recording video stream using VLC player |
|
|
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! |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Wed May 29, 2013 2:12 pm Post subject: Re: Recording video stream using VLC player |
|
|
mihaimcraciun wrote: | 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! |
is there any specific reason why you require sudo to run that script? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
mihaimcraciun n00b
Joined: 29 May 2013 Posts: 3
|
Posted: Wed May 29, 2013 2:31 pm Post subject: Re: Recording video stream using VLC player |
|
|
DaggyStyle wrote: | mihaimcraciun wrote: | 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! |
is there any specific reason why you require sudo to run that script? |
No, I've put it that way because I want to bypass the .config/vlc/vlcrc problem. |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
Posted: Wed May 29, 2013 2:37 pm Post subject: Re: Recording video stream using VLC player |
|
|
mihaimcraciun wrote: | DaggyStyle wrote: | mihaimcraciun wrote: | 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! |
is there any specific reason why you require sudo to run that script? |
No, I've put it that way because I want to bypass the .config/vlc/vlcrc problem. |
why on earth would you like to run vlc as root? _________________ Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein |
|
Back to top |
|
|
mihaimcraciun n00b
Joined: 29 May 2013 Posts: 3
|
Posted: Wed May 29, 2013 2:49 pm Post subject: Re: Recording video stream using VLC player |
|
|
DaggyStyle wrote: | mihaimcraciun wrote: | DaggyStyle wrote: | mihaimcraciun wrote: | 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! |
is there any specific reason why you require sudo to run that script? |
No, I've put it that way because I want to bypass the .config/vlc/vlcrc problem. |
why on earth would you like to run vlc as root? |
Right, vlc should't be run as root, but even if when I run it as non-root user, I receive the following error:
*** Recording ***
VLC media player 2.0.5 Twoflower (revision 2.0.5-0-g1661b7d)
vlc: unknown option or missing mandatory argument `-u'
Try `vlc --help' for more information.
I'm here because I have no idea why is not working. Maybe it would be nice to give me some constructive advices with this.
Thanks! |
|
Back to top |
|
|
DaggyStyle Watchman
Joined: 22 Mar 2006 Posts: 5909
|
|
Back to top |
|
|
|