Page 1 of 1

XBMC Addon

Posted: Wed Nov 03, 2010 9:10 am
by markhoney
If there are any ZoneMinder users out there that also use XBMC, you should be able to download an XBMC addon I released recently which allows you to watch streams from your ZoneMinder cameras in XBMC.

You need to be using the (currently beta) XBMC Dharma or newer release to have access to addons. To get the addon, in XBMC just go to Settings, Add-ons, Get Add-ons, XBMC.org Add-ons, Video Add-ons, ZoneMinder. Click on the addon and then click Install.

Once installed, it'll show up under the Videos main menu in the Video Add-ons folder. You can configure the addon to connect to a ZoneMinder server, with configurable cgi and zm paths, and also select the authentication type (plain and hashed authentication are supported).

I'd be especially interested if anyone's able to give the authentication a good thrashing. Hashed authentication seems to work, but at one point adding the IP to the hash was causing problems for me and I never got to the bottom of it. If you have any feedback, please post to this thread.

Posted: Fri Nov 19, 2010 10:34 am
by DREMA
Hey man, your plugin is pretty awesome!! Works great on my htpc.
Here's an example to gain some attention.

Image

Cool isn't it?
Is there any way to have a full screen montage view?
Also if you don't mind, I'll add your plugin with some screenshots to the wiki.

Posted: Fri Nov 19, 2010 10:42 am
by markhoney
Glad you like it! You're more than welcome to put it in the Wiki.

Unfortunately, I wasn't able to work out how to create a montage. As I wanted a montage myself, I ended up figuring out how to use VLC to create Webcam streams and generate a montage from them, and wrote another XBMC plugin to make connecting to VLC streams easy. I haven't released the plugin yet, but may do at sometime in the future.

Posted: Fri Nov 19, 2010 11:47 am
by DREMA
So, you can watch several cams on one instanse of VLC?? HOW ???

Posted: Fri Nov 19, 2010 10:51 pm
by markhoney
You can do it by building a mosaic with VLM. Here's a Wiki page describing the process:

http://wiki.videolan.org/Mosaic

And here's how I create my montage:

Create the file /etc/vlc/vlm.conf, with contents:

Code: Select all

new channel0 broadcast enabled
setup channel0 input v4l2:///dev/video0
setup channel0 output #transcode{vcodec=mp2v,vb=5000,acodec=none}:duplicate{dst=mosaic-bridge{id=0,height=480,width=640},dst=std{access=http,mux=ts,dst=192.168.1.1:8081},dst=std{access=mmsh,mux=asfh,dst=192.168.1.1:8181},select=video}

new channel1 broadcast enabled
setup channel1 input v4l2:///dev/video1
setup channel1 output #transcode{vcodec=mp2v,vb=5000,acodec=none}:duplicate{dst=mosaic-bridge{id=1,height=480,width=640},dst=std{access=http,mux=ts,dst=192.168.1.1:8081},dst=std{access=mmsh,mux=asfh,dst=192.168.1.1:8181},select=video}

new channel2 broadcast enabled
setup channel2 input v4l2:///dev/video2
setup channel2 output #transcode{vcodec=mp2v,vb=5000,acodec=none}:duplicate{dst=mosaic-bridge{id=2,height=480,width=640},dst=std{access=http,mux=ts,dst=192.168.1.1:8082},dst=std{access=mmsh,mux=asfh,dst=192.168.1.1:8182},select=video}

new channel3 broadcast enabled
setup channel3 input v4l2:///dev/video3
setup channel3 output #transcode{vcodec=mp2v,vb=5000,acodec=none}:duplicate{dst=mosaic-bridge{id=3,height=480,width=640},dst=std{access=http,mux=ts,dst=192.168.1.1:8083},dst=std{access=mmsh,mux=asfh,dst=192.168.1.1:8183},select=video}

new background broadcast enabled
setup background input fake://
setup background output #transcode{sfilter=mosaic,vcodec=mp2v,vb=5000,scale=1,acodec=none}:bridge-in{delay=400,id-offset=100}:standard{access=http,mux=ts,dst=192.168.1.1:8085}

control background play
control channel0 play
control channel1 play
control channel2 play
control channel3 play
In my example, I've also setup a background at /etc/vlc/background.png so that if any cameras are turned off there's something interesting to see (I used an aerial picture of my house from google Earth).

Now we need to run VLC and tell it to a) use the config file we created and b) create our mosaic. We do this with:

Code: Select all

cvlc -d -I http --http-host 192.168.1.1:8080 --vlm-conf /etc/vlc/vlm.conf --fake-file /etc/vlc/background.png --fake-aspect-ratio "4:3" --mosaic-width 1280 --mosaic-height 960 --mosaic-keep-picture --mosaic-rows 2 --mosaic-cols 2 --mosaic-position 1 --mosaic-order 0,1,2,3
Now we should have a montage, or mosaic, available over HTTP on port 8080, and our separate cameras available on HTTP from port 8081 onwards. We also have our cameras available on MMS, from port 8181. Of course, remember to change 192.168.1.1 to the IP of the machine you're running VLC on.

If you're interested in doing this, and in having an XBMC plugin to easily connect to your streams, just let me know and I'll look into submitting the plugin to the official XBMC repo.

Posted: Thu Nov 25, 2010 9:14 am
by DREMA
I'm trying this with no succes.

What is this address for? "172.22.2.11"

Also tried with the mosaic wizard and I can't get it working.

Posted: Thu Nov 25, 2010 9:19 am
by markhoney
Oops, sorry, those were meant to be "192.168.1.1", I just missed them when changing the IPs from my script. Try replacing them and see if it works for you.

Posted: Thu Nov 25, 2010 9:37 am
by DREMA
Yeah I deduced that and another few typos you have in there, but I can't get it working.

Also, do I have to transcode everything? How is the load on your machine with 4 cameras? I will need a mosaic of 23, hehe. Is it posible to have the mosaic and clic any feed to get full screen and then go back to mosaic?

Thanks for your help

Posted: Thu Nov 25, 2010 9:42 am
by markhoney
Can you point out the other typos? I'll fix them in the original post.

Also, you're right that everything's transcoded. With 4 feeds and a mosaic on a Celeron 3GHz, it eats up 80% of CPU. I don't know if shrinking the individual feed dimensions will lessen this, it might be worth trying.

Re: XBMC Addon

Posted: Mon Mar 28, 2011 2:16 am
by alecano23
Hi everybody !!

I have A machine with debian, no X11, and vlc-nox (vlc with no X11 version) installed and working . The idea is to build in this machine a viewer to read the jpeg stream from monitor 1 from the zm server.

I tested it in vlc for windows and can successfully play the monitor with this source:

http://zmbox_ip/cgi-bin/nph-zms?mode=jpeg&monitor=4&scale=100&user=admin&pass=password

but when I try to open it in vlc-nox, it says it cant find the jpeg stream.

I suspect I have to add some options in linux....

thanks for the help

Re: XBMC Addon

Posted: Tue Mar 29, 2011 3:19 am
by alecano23
I finally got it working by using mplayer on the debian lenny viewer low resources compaq deskpro 2000 machine (Pentium 233Mhz MMX, 128MB RAM, 800MB Hard Disk)

Here are the mplayer options

mplayer -ni -nobps -slave -nocache "http://10.10.10.202/cgi-bin/nph-zms?mod ... format=asf"

My viewer now is showing the mpeg stream at 7fps 640x480 x RGB24 fullscreen at only 35% and 80MB RAM , so I suppoused a P1 100Mhz could be used as a viewer too.

Now my goal is to reduce the CPU, memory and hard disk usage, to get a fully functional viewer with older pcs so we can recicle them !!!!!.