Streaming from a webcam to other pc

About encoding, codec settings, muxers and filter usage
marika82_A
Blank Cone
Blank Cone
Posts: 10
Joined: 06 Jun 2005 16:35

Streaming from a webcam to other pc

Postby marika82_A » 21 Sep 2005 12:37

Hello,
I'm trying to do streaming from a webcam to others pc (unicast stream or multicast stream);until now I don't succedeed to do this...can somebody tell me step by step how can I do it?
If I do stream locally in one pc I see stream from webcam but if I tryed to send this stream to an other pc the pc doesn't receive nothing.
Can somebody help me?
Thanks in advance

johnnylq
Blank Cone
Blank Cone
Posts: 40
Joined: 09 Sep 2005 01:36
Location: Peru

Postby johnnylq » 21 Sep 2005 17:13

Hi ...well in the VLC documentation there are a lot of information about your problem, but the following command maybe help you:

emisor:

vlc -vvv v4l:/dev/video:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0
--sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:rtp{dst=239.239.239.239,port=1234,sdp=http://ip_server:8080/test.sdp}'

receptor:

vlc http://ip_servidor:8080/test.sdp

good look

queparda@hotmail.com

Problems with streaming from a webcam

Postby queparda@hotmail.com » 22 Sep 2005 10:47

Hello I´m also trying to stream from a PC with a webcam connected, to others PC´s and to a PDA but I have some problems.

When I use the Direct show in the "server" PC I can see the display with the cam´s images without problem, but whe I try to send to others PC´s the server PC gets restarted.

When I try to send to the PDA I have the same problem (The server PC gets restarted too) and I also don´t know what codec I have to select in the Wizard´s options because my cam edits in MJPG and I want to receive in my PDA in MPEG.

I don´t undestand very well because I have tried with other videos and I could send and receive without problems.

Thanks a lot

queparda@hotmail.com

Problems with streaming from a webcam

Postby queparda@hotmail.com » 22 Sep 2005 10:48

Hello I´m also trying to stream from a PC with a webcam connected, to others PC´s and to a PDA but I have some problems.

When I use the Direct show in the "server" PC I can see the display with the cam´s images without problem, but whe I try to send to others PC´s the server PC gets restarted.

When I try to send to the PDA I have the same problem (The server PC gets restarted too) and I also don´t know what codec I have to select in the Wizard´s options because my cam edits in MJPG and I want to receive in my PDA in MPEG.

I don´t undestand very well because I have tried with other videos and I could send and receive without problems.

Thanks a lot

marika82_A
Blank Cone
Blank Cone
Posts: 10
Joined: 06 Jun 2005 16:35

Postby marika82_A » 22 Sep 2005 11:51

Hello,
I've just tried your suggestions but Vlc gives me in output many errors that I type below:

sender :


root@multi1:~# vlc -vvv v4l:/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:rtp{dst=239.239.239.239,port=1234,sdp=http://10.0.0.8:8080/test.sdp}' --ttl 4
VLC media player 0.8.1 Janus
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file /root/.vlc/cache/plugins-04041e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/local/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 171 modules
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000000] main root debug: VLC media player - version 0.8.1 Janus - (c) 1996-2004 VideoLAN
[00000000] main root debug: libvlc was configured with ./configure --enable-v4l
[00000001] main vlc debug: translation test: code is "C"
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: checking builtin modules
[00000001] main vlc debug: checking plugin modules
[00000001] main vlc debug: loading plugins cache file /root/.vlc/cache/plugins-04041e.dat
[00000001] main vlc debug: recursively browsing `modules'
[00000001] main vlc debug: recursively browsing `/usr/local/lib/vlc'
[00000001] main vlc debug: recursively browsing `plugins'
[00000001] main vlc debug: module bank initialized, found 171 modules
[00000001] main vlc debug: opening config file /root/.vlc/vlcrc
[00000001] main vlc warning: config file /root/.vlc/vlcrc does not exist yet
[00000001] main vlc debug: CPU has capabilities 486 586 MMX 3DNow! MMXEXT SSE FPU
[00000001] main vlc debug: looking for memcpy module
[00000001] main vlc debug: probing 4 candidates
[00000010] main module debug: using memcpy module "memcpymmxext"
[00000217] main playlist debug: creating group Normal with id 1 at position 0
[00000217] main playlist debug: waiting for thread completion
[00000217] main playlist debug: thread 16386 (playlist) created at priority 0 (src/playlist/playlist.c:107)
[00000218] main interface debug: looking for interface module
[00000218] main interface debug: probing 1 candidate
[00000057] main module debug: using interface module "hotkeys"
[00000218] main interface debug: interface initialized
[00000218] main interface debug: thread 32771 (interface) created at priority 0 (src/interface/interface.c:209)
[00000217] main playlist debug: adding playlist item `v4l:/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0' ( v4l:/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0 )
[00000220] main interface debug: looking for interface module
[00000220] main interface debug: probing 3 candidates
[00000021] main module debug: using interface module "wxwindows"
[00000220] main interface debug: interface initialized
[00000220] main interface debug: thread 49156 (manager) created at priority 0 (src/interface/interface.c:194)
[00000220] wxwindows interface debug: accelerator table loaded
[00000217] main playlist debug: creating new input thread
[00000223] main input debug: waiting for thread completion
[00000224] main stream output debug: stream=`transcode'
[00000225] main private debug: looking for sout stream module
[00000225] main private debug: probing 1 candidate
[00000224] main stream output debug: stream=`rtp'
[00000228] main private debug: looking for sout stream module
[00000228] main private debug: probing 1 candidate
[00000228] main private debug: set sout option: sout-rtp-dst to 239.239.239.239
[00000228] main private debug: set sout option: sout-rtp-port to 1234
[00000228] main private debug: set sout option: sout-rtp-sdp to http://10.0.0.8:8080/test.sdp
[00000228] main private: creating httpd
[00000231] main private debug: thread 81926 (httpd host thread) created at priority 0 (src/misc/httpd.c:1170)
[00000160] main module debug: using sout stream module "stream_out_rtp"
[00000225] main private debug: set sout option: sout-transcode-vcodec to mp4v
[00000225] main private debug: set sout option: sout-transcode-acodec to mpga
[00000225] main private debug: set sout option: sout-transcode-vb to 3000
[00000225] main private debug: set sout option: sout-transcode-ab to 256
[00000225] main private warning: option vt is unknown
[00000225] main private warning: option keyint is unknown
[00000225] main private debug: set sout option: sout-transcode-deinterlace to (null)
[00000225] stream_out_transcode private debug: codec audio=mpga 0Hz 0 channels 256Kb/s
[00000225] stream_out_transcode private debug: codec video=mp4v 0x0 scaling: 1.000000 3000kb/s
[00000165] main module debug: using sout stream module "stream_out_transcode"
[00000223] main input debug: `v4l:/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0' gives access `v4l' demux `' path `/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0'
[00000223] main input debug: demux2_New: access='v4l' demux='' path='/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0'
[00000232] main demuxer debug: looking for access_demux module
[00000232] main demuxer debug: probing 1 candidate
[00000232] v4l demuxer debug: WxH 320x240
[00000232] v4l demuxer debug: main device=`/dev/video0'
[00000223] main input debug: thread 65541 (input) created at priority 0 (src/input/input.c:228)
[00000232] v4l demuxer debug: V4L device Logitech QuickCam USB 1 channels 0 audios 32 < w < 360 32 < h < 296
[00000232] v4l demuxer debug: invalid audio, falling back with no audio
[00000232] v4l demuxer debug: setting channel Camera(0) 0 tuners flags=0x0 type=0x2 norm=0x807
[00000232] v4l demuxer debug: v4l device uses brightness: 32768
[00000232] v4l demuxer debug: v4l device uses colour: 32768
[00000232] v4l demuxer debug: v4l device uses hue: 32768
[00000232] v4l demuxer debug: v4l device uses contrast: 32768
[00000232] v4l demuxer debug: v4l device uses frame size: 153600
[00000232] v4l demuxer debug: v4l device uses chroma: I422
[00000232] v4l demuxer error: cannot open audio device (No such file or directory)
[00000232] v4l demuxer debug: v4l grabbing started
[00000232] v4l demuxer debug: added new video es I422 320x240
[00000223] main input debug: Selecting program id=0
[00000130] main module debug: using access_demux module "v4l"
[00000234] main packetizer debug: looking for packetizer module
[00000234] main packetizer debug: probing 14 candidates
[00000089] main module debug: using packetizer module "rawvideo"
[00000234] main packetizer debug: thread 98311 (decoder) created at priority 0 (src/input/decoder.c:157)
[00000223] main input debug: starting in synch mode
[00000223] main input debug: `v4l:/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0' sucessfully opened
[00000223] main input debug: control type=1
[00000224] main stream output debug: adding a new input
[00000225] stream_out_transcode private debug: creating video transcoding from fcc=`I422' to fcc=`mp4v'
[00000242] main decoder debug: looking for decoder module
[00000242] main decoder debug: probing 17 candidates
[00000088] main module debug: using decoder module "rawvideo"
[00000243] main encoder debug: looking for encoder module
[00000243] main encoder debug: probing 4 candidates
[00000243] ffmpeg encoder debug: libavcodec initialized (interface 4753 )
[mpeg4 @ 0x404e2168]only YUV420 is supported
[00000243] ffmpeg encoder error: cannot open encoder
[00000225] stream_out_transcode private error: cannot find encoder
[00000088] main module debug: unlocking module "rawvideo"
[00000225] stream_out_transcode private error: cannot create video chain
[00000234] main packetizer error: cannot create packetizer output
[00000231] main private debug: new connection (10.0.0.139)
peek=GET
received new request=GET /test.sdp HTTP/1.1
Host: 10.0.0.8:8080
User-Agent: VLC media player - version 0.8.1 Janus - (c) 1996-2004 VideoLAN
Range: bytes=0-
Connection: Close


received new request
- proto=HTTP
- version=1
- msg=3
- url=/test.sdp
- option name='Host' value='10.0.0.8:8080'
- option name='User-Agent' value='VLC media player - version 0.8.1 Janus - (c) 1996-2004 VideoLAN'
- option name='Range' value='bytes=0-'
- option name='Connection' value='Close'
sending answer
HTTP/1.1 200 OK
Content-type: application/sdp
Cache-Control: no-cache
Connection: Close
Content-Length: 0

[00000231] main private debug: connection closed(10.0.0.139)
[00000231] main private debug: new connection (10.0.0.139)
peek=GET
received new request=GET /test.sdp HTTP/1.1
Host: 10.0.0.8:8080
User-Agent: VLC media player - version 0.8.1 Janus - (c) 1996-2004 VideoLAN
Range: bytes=0-
Connection: Close


received new request
- proto=HTTP
- version=1
- msg=3
- url=/test.sdp
- option name='Host' value='10.0.0.8:8080'
- option name='User-Agent' value='VLC media player - version 0.8.1 Janus - (c) 1996-2004 VideoLAN'
- option name='Range' value='bytes=0-'
- option name='Connection' value='Close'
sending answer
HTTP/1.1 200 OK
Content-type: application/sdp
Cache-Control: no-cache
Connection: Close
Content-Length: 0

[00000231] main private debug: connection closed(10.0.0.139)

receiver:


root@multi1:~# vlc http://10.0.0.8:8080/test.sdp
VLC media player 0.8.1 Janus
[00000228] main private error: cannot pre fill buffer


In the commands that you have suggested me I believe that ip_server must be replace with the real source address(server) while the ip_servidor with the real source address (server).
But I'm not sure of this.What is the meaning of servidor and sdp?I don't understand well how to use this command in my case. For example in my simulation server address is 10.0.0.8 while client address is 192.168.18.139. Please can you write again the commands with this features?
Thanks a lot

johnnylq
Blank Cone
Blank Cone
Posts: 40
Joined: 09 Sep 2005 01:36
Location: Peru

Postby johnnylq » 22 Sep 2005 16:28

Hi...
The following command in your server:

root@multi1:~# vlc -vvv v4l:/dev/video0:norm=ntsc:frequency=543250:size=320x240:channel=0:adev=/dev/dsp:audio=0 --sout '#transcode{vcodec=mp4v,acodec=mpga,vb=3000,ab=256,vt=800000,keyint=80,deinterlace}:rtp{dst=239.239.239.239,port=1234,sdp=http://10.0.0.8:8080/test.sdp}' --ttl 4

The following commadn in your client:

vlc http://10.0.0.8:8080/test.sdp


Well I'm not sure why don't work, ni my case it work's very well, maybe your video input (/dev/video0) and audio (dev/dsp:audio=0) are differents between your pc and mine....You have to sure that this options are right...........good look

johnnylq
Blank Cone
Blank Cone
Posts: 40
Joined: 09 Sep 2005 01:36
Location: Peru

Postby johnnylq » 22 Sep 2005 16:31

Hi ..again...well another problem could be that both pc's there are in tha same LAN, this because you are sending package or streaming to IP address multicast...you have to check your LAN configuration...good look

marika82_A
Blank Cone
Blank Cone
Posts: 10
Joined: 06 Jun 2005 16:35

Postby marika82_A » 22 Sep 2005 17:18

Thanks for your answer so don't you help me?
I again tryed the commands but Vlc gives me the same error.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 19 guests