IPVideo Network Video Server

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

IPVideo Network Video Server

Postby merik » 17 Sep 2005 03:38

Hi

Trying to get vlc to read a http stream from a multiport IP video device. It basically turns 4 analog cameras into web cams. I have captured the stream with ethereal and found the folowing:

Code: Select all

GET /GetData.cgi?Status=1 HTTP/1.1 User-Agent: WebCamera Host: 192.168.0.223 Connection: Keep-Alive Cookie: Audio=1; AudioFormat=0; N=; U=http%253A//192.168.0.223; D=; P= HTTP/1.0 200 OK Date: Wed, 05 Feb 2003 14:59:13 GMT Server: WYM/1.0 Connection: close Content-Type: multipart/x-mixed-replace;boundary=WINBONDBOUDARY Last-Modified: Wed, 05 Feb 2003 14:59:13 GMT Pragma: no-cache Cache-Control: no-cache Expires: 01 Jan 1970 00:00:00 GMT --WINBONDBOUDARY Content-Type: image/jpeg ......>@.A.........C.............. .. ................. $
SNIP lots removed

Code: Select all

..nk#...3.........i..........&..G.%:g.....)?.(.?.'..@...OJ.>&.;4...4..M?.'..@.....%d..i..O.....=?.......I..>.........?..i. ..)?........L.W.$6...................Bk+.....I..|P|Ab..O...?.....M..f.o...zO....~.....|...4.}.8..G.?..M:...............zVq.........v~...|...x.I.j..........j.....|..........T..i.....i?.-=_.......Q........4.......|......I....k.....!.m}_..........O.C..k....Cq.[..".........--WINBONDBOUDARY Content-Type: text/plain 0100000000000001281286102393510000033042000000000000000001289999991280000000200001000100000000000000100000 --WINBONDBOUDARY Content-Type: image/jpeg ......>@.A.........C.............. .. ................. $.' ",#..(7),01444.'9=82<.342...C........ .2!.!22222222222222222222222222222222222222222222222222............................... .....................}........!1A..Qa."q.2....#B...R..$3br.. .....%&'()*456789:CDEF
It seems that the stream contaims text/plain status strings and jpeg stuff with this WINBONDBOUDARY breaking it up.

vlc dies when it encounters the WINBONDBOUDARY string after successfully identifiying the string as JPEG.

Any thoughts??

Thanks

MK

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 18 Sep 2005 01:46

Ehm, why not use the multicast address the device is broadcasting on?

(HTTP only works over unicast, so you are using it in unicast mode now)
Don't use PMs for support questions.

merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

Postby merik » 18 Sep 2005 04:02

Multicast ?? There is no multicast here.

Am I missing something?

MK

zcot
Big Cone-huna
Big Cone-huna
Posts: 606
Joined: 15 Jun 2005 10:58

Postby zcot » 18 Sep 2005 07:28

is this useful?

Settings - Preferences - Stream Ouput - Muxers - MPJPEG -> "multipart separator thing"

I guess that's the other direction though..

merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

Postby merik » 21 Sep 2005 08:38

Bump :-)

I think you are correct, this is outbound and not inbound.
Any thoughts on how I could read this stream?

MK

merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

Postby merik » 21 Sep 2005 08:39

I am guessing that this technique of encoding might be used by other web cams?

I am guessing that a standard winbond chipset implements this method.

MK

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 21 Sep 2005 17:47

Well vlc SHOULD autodetect the MIME seperator...
I'm interested in what VLC reports in it's debug log about this device.

You should try opening the stream as:
http/mjpeg://server/link.mjpeg
Don't use PMs for support questions.

merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

Postby merik » 27 Sep 2005 12:31

I think the "text/plain" stuff that returns status from the camera is stuffing things up.

Code: Select all

Content-Type: text/plain 0100000000000001281286102393510000033042000000000000000001289999991280000000200001000100000000000000100000 --WINBONDBOUDARY Content-Type: image/jpeg ......>@.A.........C.............. .. ................. $.' ",#..(7),01
Here is the debug:

Code: Select all

main debug: CPU has capabilities 486 586 MMX MMXEXT FPU main debug: looking for memcpy module: 3 candidates main debug: using memcpy module "memcpymmxext" main debug: waiting for thread completion main debug: thread 3428 (playlist) created at priority 0 (src/playlist/playlist.c:183) main debug: waiting for thread completion main debug: thread 3444 (preparser) created at priority 0 (src/playlist/playlist.c:205) main debug: looking for interface module: 1 candidate main debug: using interface module "hotkeys" main debug: interface initialized main debug: thread 3468 (interface) created at priority 0 (src/interface/interface.c:211) main debug: adding playlist item `http/mjpeg://192.168.0.13/GetData.cgi?Status=1' ( http/mjpeg://192.168.0.13/GetData.cgi?Status=1 ) main debug: looking for interface module: 3 candidates main debug: using interface module "wxwidgets" main debug: interface initialized main debug: thread 3492 (manager) created at priority 0 (src/interface/interface.c:196) wxwidgets debug: Using last windows config '(-1,0,0,1024,768)(0,44,58,336,105)(2,499,33,418,587)' wxwidgets debug: id=0 p=(44,58) s=(336,105) wxwidgets debug: id=2 p=(499,33) s=(418,587) main debug: nothing requested, starting main debug: creating new input thread main debug: waiting for thread completion main debug: thread 3780 (input) created at priority 1 (src/input/input.c:230) main debug: `http/mjpeg://192.168.0.13/GetData.cgi?Status=1' gives access `http' demux `mjpeg' path `192.168.0.13/GetData.cgi?Status=1' main debug: creating access 'http' path='192.168.0.13/GetData.cgi?Status=1' main debug: looking for access2 module: 7 candidates access_http debug: http: server='192.168.0.13' port=80 file='/GetData.cgi?Status=1 main debug: net: connecting to 192.168.0.13 port 80 main debug: connection in progress access_http debug: protocol 'HTTP' answer code 200 access_http debug: Server: WYM/1.0 access_http debug: Content-Type: multipart/x-mixed-replace;boundary=WINBONDBOUDARY access_http debug: Pragma: no-cache main debug: using access2 module "access_http" main debug: pre buffering main debug: received first data for our buffer main debug: prebuffering done 32826 bytes in 0s - 256 kbytes/s main debug: creating demux: access='http' demux='mjpeg' path='192.168.0.13/GetData.cgi?Status=1' main debug: looking for demux2 module: 1 candidate mjpeg debug: Multipart MIME detected, using separator: WINBONDBOUDARY main debug: selecting program id=0 main debug: using demux2 module "mjpeg" main debug: looking for decoder module: 26 candidates ffmpeg debug: libavcodec initialized (interface 3276800 ) ffmpeg debug: postprocessing disabled ffmpeg debug: ffmpeg codec (Motion JPEG Video) started main debug: using decoder module "ffmpeg" main debug: thread 3872 (decoder) created at priority 0 (src/input/decoder.c:159) access_http debug: GET META (null) (null) (null) main debug: `http/mjpeg://192.168.0.13/GetData.cgi?Status=1' successfully opened mjpeg debug: MIME boundary not found in 15360 bytes of data mjpeg debug: MIME boundary not found in 20480 bytes of data mjpeg warning: Content-Type: text/plain, image/jpeg is expected mjpeg error: Discard non-JPEG part main debug: EOF reached main debug: waiting decoder fifos to empty main debug: no usable vout present, spawning one main debug: looking for video output module: 5 candidates vout_directx debug: creating DirectXEventThread main debug: waiting for thread completion vout_directx debug: DirectXCreateWindow vout_directx debug: Created video sub-window main debug: thread 3932 (DirectX Events Thread) created at priority 0 (directx.c:261) vout_directx debug: DirectXEventThread running vout_directx debug: DirectXInitDDraw vout_directx debug: directx-device: vout_directx debug: DirectXEnumCallback: Primary Display Driver, display vout_directx debug: screen dimensions (0x0,1024x768) vout_directx debug: DirectDraw Capabilities: overlay=1 yuvoverlay=1 can_deinterlace_overlay=1 colorkey=1 stretch=1 bltfourcc=1 vout_directx debug: align_boundary_src=0,0 align_boundary_dest=1,1 align_size_src=0,0 align_size_dest=0,0 vout_directx debug: End DirectXInitDDraw vout_directx debug: DirectXCreateDisplay vout_directx debug: DirectXCreateClipper main debug: using video output module "vout_directx" main debug: waiting for thread completion vout_directx debug: NewPictureVec overlay:yes chroma:YV12 main debug: Registering subpicture channel, ID: 2 main debug: Registering subpicture channel, ID: 3 main debug: Registering subpicture channel, ID: 4 main debug: Registering subpicture channel, ID: 5 vout_directx debug: YUV overlay created successfully vout_directx debug: End NewPictureVec (succeeded) main debug: got 1 direct buffer(s) main debug: picture in 704x576 (0,0,704x576), chroma I420, ar 11:9, sar 1:1 main debug: picture user 704x576 (0,0,704x576), chroma I420, ar 11:9, sar 1:1 main debug: picture out 704x576, chroma I420, ar 11:9, sar 1:1 main debug: direct render, mapping render pictures 0-6 to system pictures 1-7 main debug: thread 3956 (video output) created at priority 1 (src/video_output/video_output.c:480) main debug: closing input main debug: unlocking module "mjpeg" main debug: unlocking module "access_http" ffmpeg debug: ffmpeg codec (Motion JPEG Video) stopped main debug: unlocking module "ffmpeg" main debug: thread times: real 0m0.203125s, kernel 0m0.046875s, user 0m0.000000s main debug: thread 3872 joined (src/input/decoder.c:191) main debug: killing decoder fourcc `mjpg', 0 PES in FIFO main debug: thread times: real 0m0.484375s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 3780 joined (src/input/input.c:386) main: nothing to play main debug: garbage collector destroying 1 vout vout_directx debug: DirectXCloseSurface vout_directx debug: DirectXCloseDisplay vout_directx debug: DirectXCloseDisplay clipper vout_directx debug: DirectXCloseDisplay display vout_directx debug: DirectXCloseDDraw vout_directx debug: CloseVideo vout_directx debug: DirectXEventThread terminating vout_directx debug: DirectXCloseWindow vout_directx debug: WinProc WM_DESTROY main debug: thread times: real 0m0.328125s, kernel 0m0.000000s, user 0m0.000000s main debug: thread 3932 joined (directx.c:460) main debug: unlocking module "vout_directx" main debug: thread times: real 0m0.296875s, kernel 0m0.031250s, user 0m0.000000s main debug: thread 3956 joined (src/video_output/video_output.c:520)

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 27 Sep 2005 15:12

Correct that is the problem...
It considers this a terminal error.
So what kind of cam is this?
Don't use PMs for support questions.

merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

Postby merik » 28 Sep 2005 04:16

This is a generic IP camera. It is extactly the same issue as I have with a 4 port video server. It is based on the winbond chipset and here is a URL reference http://www.drgw.net/~maverick/electronics/wbipcams/ to aditional info on the system and other specific cameras that use this chipset.

Thanks

MK

merik
Blank Cone
Blank Cone
Posts: 28
Joined: 04 Sep 2005 07:36
Location: Canberra, Australia

Postby merik » 28 Sep 2005 04:22

Perhaps vlc should read the jpeg stream and whenever it gets a Content-Type that it does not deal with, strip it from the stream up till the next Multipart tag??

Code: Select all

Content-Type: text/plain 0100000000000001281286102393510000033042000000000000000001289999991280000000200001000100000000000000100000 --WINBONDBOUDARY Content-Type: image/jpeg

The DJ
Cone Master
Cone Master
Posts: 5987
Joined: 22 Nov 2003 21:52
VLC version: git
Operating System: Mac OS X
Location: Enschede, Holland
Contact:

Postby The DJ » 28 Sep 2005 15:11

Yes it should do that. However currently it doesn't.

The problem is in modules/demux/mjpeg.c
CheckMimeHeader() only returns TRUE if a MIME header is found AND the content type equals jpeg. This confuses the Open() and MimeDemux() methods in that file.

This should probably be changed, but since I have no test material, I won't do this atm. Should be simple enough to do yourself though.
We welcome any patch to support this chipset.
Don't use PMs for support questions.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 15 guests