Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Recording video stream using VLC player
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
mihaimcraciun
n00b
n00b


Joined: 29 May 2013
Posts: 3

PostPosted: Wed May 29, 2013 1:34 pm    Post subject: Recording video stream using VLC player Reply with quote

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
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4895

PostPosted: Wed May 29, 2013 2:12 pm    Post subject: Re: Recording video stream using VLC player Reply with quote

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
ProjectFootball
Back to top
View user's profile Send private message
mihaimcraciun
n00b
n00b


Joined: 29 May 2013
Posts: 3

PostPosted: Wed May 29, 2013 2:31 pm    Post subject: Re: Recording video stream using VLC player Reply with quote

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
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4895

PostPosted: Wed May 29, 2013 2:37 pm    Post subject: Re: Recording video stream using VLC player Reply with quote

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
ProjectFootball
Back to top
View user's profile Send private message
mihaimcraciun
n00b
n00b


Joined: 29 May 2013
Posts: 3

PostPosted: Wed May 29, 2013 2:49 pm    Post subject: Re: Recording video stream using VLC player Reply with quote

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
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4895

PostPosted: Wed May 29, 2013 4:33 pm    Post subject: Reply with quote

check this link: http://hartvig.de/2008/howto-record-a-web-stream-of-tv-with-vlc/
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum