vfl2, mjpg_streamer, shared memory probs

Forum for questions and support relating to the 1.24.x releases only.
Locked
guisacouto
Posts: 5
Joined: Tue Mar 09, 2010 12:43 am

vfl2, mjpg_streamer, shared memory probs

Post by guisacouto »

I know there are loads of threads like this, but thing is, I think I read them all and it didnt help.

I'm usig ArchLinux, and my zoneminder version is 1.24.2(i guess its the last one).

I have a Microsoft Lifecam vx-1000 and I cant get it to work(it has been something like 7 hours trying and reading all over the web).

I tryed using videoforlinux v2 and v1 and loads of combinations and it didnt worked.. but with cheese it does!
So I read about mjpg_streamer, and I gave it a try. in the http://localhost:8080/?action=stream it works great, but when I configure it in zoneminder it doesnt:S

Source: remote
Function: Monitor
enabled: checked
protocol: http
method: simple
hostname: localhost
remove host port: 8080
remote host path: /?action=stream
image colours: 24bits colour
capture width 320
height: 240
orintation:normal


mjpg_streamer:
MJPG Streamer Version.: 2.0
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 5
i: Format............: MJPEG
o: www-folder-path...: disabled
o: HTTP TCP port.....: 8080
o: username:password.: disabled
o: commands..........: enabled


other problem that I'm facing is that I get shared memory errors (at first I didnt but now I do). and I tryed everything and it didnt solved the problem.
I changed /etc/sysctl.conf by setting kernel.shmall and shmmax to 1024000 (since I have 4GB) and it didnt worked (I rebooted yes). I also tryed bigger numbers and it didnt work too..

Code: Select all

....

03/09/2010 00:52:50.860418 zmwatch[10665].ERR [Can't get shared memory id '7a6d0002', 2: No such file or directory]
03/09/2010 00:53:00.860943 zmwatch[10665].ERR [Can't get shared memory id '7a6d0004', 4: No such file or directory]
can anybody give me some help? if there is any info missing just tell me
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Post by bb99 »

Bring up the stream in your browser or in VLC, right click and select properties, this will give the stream resolution and other details. I'm going to guess from your settings that it's going to be 640X480 and your monitor settings in ZM are for a 320X240. If this is the case, lower the resolution output for the streamer to match ZM, this may also clear up your memory issues.
coke
Posts: 518
Joined: Wed Jan 30, 2008 5:53 pm
Location: St. Louis, MO, USA

Post by coke »

I'd agree with bb99, it looks like one's set for 640x480 and the other set for 320x240, that's going to cause a problem. I believe the shared memory issues, unless they're "can't shmget" mean it's not getting the stream with current settings, not that your shmax is too low.

However, if you discover your shmax is too low, stop zoneminder, up the shmax, and do a "sysctl -p", then start zoneminder again. Faster than rebooting.
pki
Posts: 29
Joined: Sat Mar 06, 2010 8:59 am

Post by pki »

Try restarting zoneminder after configuring the stream. 1.24.2 should use /dev/shm/ for shared memory.
SQ2LYH :-)
guisacouto
Posts: 5
Joined: Tue Mar 09, 2010 12:43 am

Post by guisacouto »

woow! thanks for so many replies. however I think I've done all that.. I have both zm and mjpg_streamer using 320*240 and it still doesnt work:\ so the shared memory might not be caused by this.. what can I do more? in firefox it works pretty great:\

best regards

----

edit: by the way, in the options/images menu, should I choose mpeg ou jpeg? ("Which method should be used to send video streams to your browser")
guisacouto
Posts: 5
Joined: Tue Mar 09, 2010 12:43 am

Post by guisacouto »

my option/path is setted like this:

Image

is anything wrong with it?
there is only one option using /dev/shm/, should there be more?


regards!

-----

edit:

for now I think I managed to get a good shared memory value and it is not 'red' in zoneminder anymore, neither I see errors in the zmwatch.log, however I still have no image :S!

I have it setted to 320x240 in zoneminder and mjpg_streamer and nothing:\

regards!
guisacouto
Posts: 5
Joined: Tue Mar 09, 2010 12:43 am

Post by guisacouto »

ok so I've made some biggg improvements I guess!

I can now acess my webcam throw this:

http://localhost/cgi-zm/nph-zms?mode=jp ... ass=MYPASS


what should I put in the "Remote Host Path" ??
I've tryed "/cgi-zm/nph-zms?mode=jpeg&monitor=2&user=MYUSER&pass=MYPASS" but in the momment I do that I get shared memory errors and the link I gave before gets all black..

pleasseee! help! I think I'm very near!

best regards!
guisacouto
Posts: 5
Joined: Tue Mar 09, 2010 12:43 am

Post by guisacouto »

ok so if I click on the link that I get from the source code of the webcam page (zoneminder):
http://localhost/cgi-zm/zms?mode=jpeg&m ... 1268263447

I get a server error:
Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: zms

If you think this is a server error, please contact the webmaster.
Error 500
localhost
Wed Mar 10 23:24:45 2010
Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8m DAV/2 PHP/5.3.2 with Suhosin-Patch
does this helps? is there anything missing?
please help:\
Locked