VLC Media Player and Remote Cam

Support and queries relating to all previous versions of ZoneMinder
Locked
themutt
Posts: 20
Joined: Sat Jan 08, 2005 9:09 pm

VLC Media Player and Remote Cam

Post by themutt »

VLC Media Player will stream using the mjpg codec, various encapsulations including mpeg, asf, raw and can use protocols such as http from a given URL:port etc. Is there a way to make ZM 1.20.1 catch a remote stream from VLC? Or is setting up ZM to stream from the remote site the only approach. Am using Mandrake 10.1, KDE 3.4, 2.6.11 kernel and YC72 webcam using the konicawc kernel module. The webcam works fine locally with ZM and also when streaming remotely using VLC as the viewer (as well as the stream generator). Have tried a number of codecs. encapsulation methods and protocols with VLC but have not been able to catch the stream with ZM using "Remote Host Name" 192.168.XXX.XXX and "Remote Host Port" say 3000, but no entry for "Remote Host Path". VLC can stream on any port, firewall isn't an issue since the setup works with VLC as the viewer. Any help appreciated.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Do you have any links to the documentation anywhere? Otherwise you may just have to 'wget' the various media types and see if any come down as mpjpeg or jpeg format.

Phil
themutt
Posts: 20
Joined: Sat Jan 08, 2005 9:09 pm

Post by themutt »

Looking at VLC streaming features indicates the svn version of VLC can stream mpmjpeg, believe this is mpjpeg, via http.
http://www.videolan.org/streaming/features.html

Additional docs and streaming howto.
http://www.videolan.org/doc/
http://www.videolan.org/doc/streaming-h ... owto-en.ht

I was able to compile the svn version and using the following command string ./vlc -vvv v4l:/dev/video0 --sout '#transcode{vcodec=mjpg,vb=1024,width=320,height=240}:standard{access=http,mux=mpjpeg,url=myserverip:myport}'
was able to stream to zoneminder using knetload to monitor the stream but zoneminder was unable to display video. The VLC server side showed zoneminder was connecting repeatedly. Knetload showed what appeared to be a video stream to the ZM client but no picture. I was able to capture the stream with VLC as a client so possibly the format is slightly different or ZM didn't capture the stream correctly. Have run out of ideas if you want to give it a try.
lgmoltrasio
Posts: 4
Joined: Fri Jun 10, 2005 9:14 pm

Capturing streaming from VLC

Post by lgmoltrasio »

Do you get the answer? I need somethig like this...

Thanks
DarkBear
Posts: 1
Joined: Tue Jun 13, 2006 7:42 am
Location: Russia
Contact:

Re: Capturing streaming from VLC

Post by DarkBear »

lgmoltrasio wrote:Do you get the answer? I need somethig like this...

Thanks
Here is my patch for VLC plugin (libmux_mpjpeg_plugin.dll) to work correctly with ZM.
diff -urN ./original/mpjpeg.c ./patched/mpjpeg.c
--- ./original/mpjpeg.c 2006-06-08 02:00:50.000000000 +0400
+++ ./patched/mpjpeg.c 2006-06-13 08:39:46.000000000 +0400
@@ -191,9 +191,9 @@
char *psz_separator = var_CreateGetString( p_mux,
SOUT_CFG_PREFIX "separator" );
char *psz_separator_block = (char *)malloc( strlen( psz_separator ) +
- 2 + strlen( CONTENT_TYPE ) );
+ 2 + strlen( CONTENT_TYPE ) + 2 + 2);

- sprintf( psz_separator_block, "%s\r\n%s\r\n", psz_separator,
+ sprintf( psz_separator_block, "%s\r\n%s\r\n\r\n", psz_separator,
CONTENT_TYPE );

p_header = block_New( p_mux, strlen( psz_separator_block ) );
Sample command string for Logitech USB QuickCam on Win2000.
./vlc.exe -I rc dshow:// --dshow-vdev="Logitech QuickCam Messenger" --dshow-adev="none" --dshow-size="640x480" --dshow-fps="5.000" --sout-http-mime="multipart/x-mixed-replace;boundary=ZoneMinderFrame" --sout-mpjpeg-separator="--ZoneMinderFrame" --no-sout-audio --sout=#transcode{vcodec=MJPG,vb=1024,scale=1}:duplicate{dst=std{access=http,mux=mpjpeg,dst=:8050/thestream}}

I test vlc-0.8.5 & vlc-0.8.6 with ZM v1.22.2.
Options - ZM_NETCAM_REGEXPS checked, ZM_HTTP_VERSION 1.0

It Work! :D
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Very useful I'm sure. Thanks for posting this.
Phil
bonesbr
Posts: 4
Joined: Fri Jul 18, 2008 12:50 am
Location: Brasil

ZoneMinder + VideoLan as a IP CAM

Post by bonesbr »

Hi, i'ved installed a Slackware 12.1 kernel 2.6.24 with zoneminder 1.23.3 runing four cams localy using bt878 chipset , and works great.
On another computer , i'ved installed s Slackware 12.1 kernel 2.6.24 with VideoLan Client vlc-0.8.5-i686.tgz acting as mpjeg streaming server on IP 192.168.0.253:8080/GetData.cgi. With vlc client i can get the streaming runing , in color and a hight fps. But when i configure a new IP CAM on ZoneMinder , with this same data , Zone Minder show to me a black screen in place of image .
I think was my problem is the same of this post, but i do not understood how i can patch my system in way to put things to work.

-- i'ved tried set this:
Options - ZM_NETCAM_REGEXPS checked, ZM_HTTP_VERSION 1.0 , and still nothing .

Can anyone help me ?
Last edited by bonesbr on Fri Jul 18, 2008 3:01 pm, edited 3 times in total.
Vital Labs .NET
bonesbr
Posts: 4
Joined: Fri Jul 18, 2008 12:50 am
Location: Brasil

More info

Post by bonesbr »

Hi ,

I'ved just make another test : I downloaded the Motion JPEG Player from http://gmax.gpnet.at/mjpg.html , and when i try http://192.168.0.253:8080/GetData.cgi , works really great(1023.24kbps/30fps/on collor). Only on ZoneMinder i get no frames (0 fps) , and still a black screen on camera place. Zoneminder can detect the stream , because the IP on Console goes green , but no images.
Maybe is a bug from ZoneMinder ? If i can contribute , please tell me how. ZoneMinder is a really good program , and i really want to implement my factory CFTV system with this.
Thanks.
Vital Labs .NET
bonesbr
Posts: 4
Joined: Fri Jul 18, 2008 12:50 am
Location: Brasil

more deep

Post by bonesbr »

well, the problem is , the vlc encoder has a problem, and, firefox don't show up the images and sometimes crashes.
So, if anyone can patch this , please tell me how.

tks
Vital Labs .NET
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

check you logs, also this is old thread for an old version.
You might be getting shmget errors
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

If vlc is having a problem, you would need to take it to vlc's developers to fix.
Are you sure you are building vlc up with the right codecs correctly and you have correctly patched vlc before the build?
bonesbr
Posts: 4
Joined: Fri Jul 18, 2008 12:50 am
Location: Brasil

Post by bonesbr »

Hi, thanks for your attention.
Yes , i got contact with the vlc developers by mirc , and they are working to fix this .
But i has solved this problem using another zoneminder instaled acting as streaming server , and works really good.
Thanks to the developers of zoneminder , this software is really best!
if anyone wants to do the same , here is the topic that i was followed : http://www.zoneminder.com/forums/viewtopic.php?t=5549

---

regards from Brasil.[/quote]
Vital Labs .NET
rbliss
Posts: 2
Joined: Thu Jun 10, 2010 2:51 pm

Follow Up:

Post by rbliss »

Wanted to say that streaming vlc as mpjpeg didnt work for me specifying the content/type;boundary...

so i finally changed the command:

vlc.exe dshow:// --dshow-vdev="Logitech QuickCam Pro 4000" --dshow-adev="none" --dshow-size="640x480" --dshow-fps="5.000" --sout-mpjpeg-separator="--ZoneMinderFrame" --no-sout-audio --sout=#transcode{vcodec=MJPG,vb=1024,scale=1}:duplicate{dst=std{access=http,mux=mpjpeg,dst=:8080/test.mpjpeg}}

and that worked for me.

vlc 1.0.5 winx86
zm: 1.24.2
neji
Posts: 1
Joined: Tue Jun 22, 2010 11:51 am

Post by neji »

Meet the world on time,visit trustdownloads get wat you want from - VLC Media Player
KajolThappar1
Posts: 2
Joined: Sat Oct 23, 2010 7:10 pm

Post by KajolThappar1 »

I think was my problem is the same of this post, but i do not understood how i can patch my system in way to put things to work.Is there any one from Crezh bought from Chinabuye?
Locked