Raw stream viewer

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
utasc
Posts: 3
Joined: Mon Sep 22, 2008 8:29 am

Post by utasc » Fri Jan 02, 2009 8:18 am

many thanks.
you can give other info, i'm newbie.

fabio

User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp » Mon Jan 05, 2009 5:32 pm

jameswilson wrote:not with shared mem viewer.
You may be able to use shared mem viewer on the headless box (would require x) and use x forwarding to another box
Surprisingly, that does work! I used ssh with an X tunnel to get into a head less box, and ran xlib_shm, and got a picture on my remote box! However, calling it slow is kinda like calling a nuclear blast loud... It just doesn't cover it. :)

foreverg
Posts: 25
Joined: Fri Jul 04, 2008 4:16 pm

Post by foreverg » Wed Jan 28, 2009 2:41 pm

Lee Sharp wrote:
jameswilson wrote:not with shared mem viewer.
You may be able to use shared mem viewer on the headless box (would require x) and use x forwarding to another box
Surprisingly, that does work! I used ssh with an X tunnel to get into a head less box, and ran xlib_shm, and got a picture on my remote box! However, calling it slow is kinda like calling a nuclear blast loud... It just doesn't cover it. :)
it sounds very interesting.. can you explaine how did you do this? ;)

User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp » Wed Jan 28, 2009 5:26 pm

"ssh -Xl username"

Then after loging in,
"xlib_shm m1 m2 m3 m4"

Now wait...

craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Post by craver84 » Thu Mar 12, 2009 3:24 pm

hi,
I'm tring to use it with zm 1.24 but I've got this error:

Code: Select all

sudo ./xlib_shm -m1 -k 0x7a6d0000
./xlib_shm: error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such file or directory
thanks

User avatar
Blazer
Posts: 234
Joined: Sun Jun 05, 2005 12:57 pm

Post by Blazer » Thu Mar 12, 2009 7:03 pm

Install the mysql-devel package

craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Post by craver84 » Sun Mar 15, 2009 3:07 pm

I searched for mysql-devel package but I didn't find it

so I donwload and install debs:

libmysqlclient12-dev_4.0.24-10ubuntu2_i386.deb
libmysqlclient12_4.0.24-10ubuntu2_i386.deb

Now, this is my error:

Code: Select all

garda@Byakugan:~/xlib_shm-0.6.3-gl$ sudo ./xlib_shm -m1 -k 0x7a6d0000 
xlib_shm viewer for zm 1.22.3 version 0.6.3-gl
Client does not support authentication protocol requested by server; consider upgrading MySQL client
[/code]

craver84
Posts: 96
Joined: Sun Aug 31, 2008 7:35 am

Post by craver84 » Sun Mar 15, 2009 4:22 pm

ok, Installed with xlib-shm-gl_0.6.3.venus-2_i386.deb on my Ubuntu Intrepid with zm 1.24.1

I tried

Code: Select all

garda@Byakugan:~$ sudo xlib_shm-gl -m3
xlib_shm viewer for zm 1.22.3 version 0.6.3-gl
imgx=0 imgy=0
delay=10000
shmkey=7a6d2000
monitors:3 
Segmentation fault

Code: Select all

garda@Byakugan:~$ sudo xlib_shm-gl -m3  0x7a6d0000 
xlib_shm viewer for zm 1.22.3 version 0.6.3-gl
imgx=0 imgy=0
delay=10000
shmkey=7a6d2000
monitors:3 
Segmentation fault

Code: Select all

garda@Byakugan:~$ sudo xlib_shm-gl -m3 -k 0x7a6d0001
xlib_shm viewer for zm 1.22.3 version 0.6.3-gl
imgx=0 imgy=0
delay=10000
shmkey=7a6d0001
monitors:3 
Segmentation fault
I don't know if it's useful

Code: Select all

   
but before I installed ZM:
nano -w /etc/sysctl.conf
      kernel.shmall = 1073741824
      kernel.shmmax = 1073741824

Code: Select all

garda@Byakugan:~$ cat /proc/sysvipc/shm
       key      shmid perms       size  cpid  lpid nattch   uid   gid  cuid  cgid      atime      dtime      ctime
         0          0  1600     393216  6073  5551      2  1000  1000  1000  1000 1237118879          0 1237118879
         0      32769  1600     393216  6101 24007      2  1000  1000  1000  1000 1237130559 1237130559 1237118882
         0      65538  1600     393216  6185  5551      2  1000  1000  1000  1000 1237118884          0 1237118884
         0      98307  1600     393216  6221 31876      2  1000  1000  1000  1000 1237133655 1237133655 1237118891
         0     131076  1600     393216  6221 31876      2  1000  1000  1000  1000 1237133655 1237133655 1237118891
         0     163845  1600     393216  6268 32167      2  1000  1000  1000  1000 1237133910 1237133910 1237118891
         0     196614  1600     393216  6317  5551      2  1000  1000  1000  1000 1237118892          0 1237118892
         0     229383  1600     393216  6268 32167      2  1000  1000  1000  1000 1237133910 1237133910 1237118893
         0     262152  1600     393216  6325  5551      2  1000  1000  1000  1000 1237118893          0 1237118893
         0    1277961  1600     393216  6347  5551      2  1000  1000  1000  1000 1237127800          0 1237127800
         0     327690  1600     393216  6360  5551      2  1000  1000  1000  1000 1237118903          0 1237118903
         0     360459  1600     393216  6347  6567      2  1000  1000  1000  1000 1237118983 1237118983 1237118903
2053963778    3473420   700   36865192 29200 28276      2    33    33    33    33 1237134061 1237134061 1237131604
2053963779    3407885   700   36865192 28865 28276      1    33    33    33    33 1237134061 1237134061 1237131506
         0     589838  1600     393216  6343 30590      2  1000  1000  1000  1000 1237132511 1237132511 1237118973
2053963780    3342351   700    3073192 28264 28276      0    33    33    33    33 1237131710 1237131710 1237131137
         0    1310736  1600     393216 19098 22069      2  1000  1000  1000  1000 1237129157 1237129157 1237127812
2053963782    3506193   700   36865192 29768 28276      1    33    33    33    33 1237134061 1237134061 1237131987
         0    4259858  1600     393216 31876 31879      2  1000  1000  1000  1000 1237133655 1237133655 1237133655
2053963781    3375123   700    9217192 28267 28276      1    33    33    33    33 1237134061 1237134061 1237131138
         0    4292628  1600     393216 31876  5551      2  1000  1000  1000  1000 1237133662          0 1237133662
         0    3211285  1600     393216  6185  5551      2  1000  1000  1000  1000 1237130801          0 1237130801
         0    2031638  1600     393216 19098 22069      2  1000  1000  1000  1000 1237129157 1237129157 1237129071
         0    3244055  1600     393216  6360  5551      2  1000  1000  1000  1000 1237130801          0 1237130801
         0    4325400  1600     393216 32167  5551      2  1000  1000  1000  1000 1237133911          0 1237133911
         0    4358169  1600     393216 32167  5551      2  1000  1000  1000  1000 1237133912          0 1237133911
garda@Byakugan:~$ 

maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc » Tue Mar 24, 2009 3:53 pm

craver84 wrote:ok, Installed with xlib-shm-gl_0.6.3.venus-2_i386.deb on my Ubuntu Intrepid with zm 1.24.1
[/code]
I've just put new version 0.6.4 fixed for 1.24.1
Download here http://dig.hopto.org/xlib_shm/

Thinh
Posts: 3
Joined: Fri Mar 27, 2009 2:48 am

Post by Thinh » Fri Mar 27, 2009 2:56 am

xlib_shm viewer for zm 1.22.3 version 0.6.3-gl
imgx=0 imgy=0
delay=10000
shmkey=7a6d0000
monitors:11 6 5 3 4 14
ERROR: Unable to open display

I have a shortcut on the gnome desktop that starts xlib_shm-gl viewer. It works as it should. When i switch mode i kill the xlib_shm-gl and i get above message when i try to start xlib_shm-gl in command line.

here is command i use in shortcut and when i try to restart the viewer:
sudo xlib_shm-gl -m11 -m6 -m5 -m3 -m4 -m14 -c3 -k 0x7a6d0000

anything helps at the moment lol

maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc » Fri Mar 27, 2009 7:43 am

Thinh wrote:xlib_shm viewer for zm 1.22.3 version 0.6.3-gl
imgx=0 imgy=0
delay=10000
shmkey=7a6d0000
monitors:11 6 5 3 4 14
ERROR: Unable to open display

I have a shortcut on the gnome desktop that starts xlib_shm-gl viewer. It works as it should. When i switch mode i kill the xlib_shm-gl and i get above message when i try to start xlib_shm-gl in command line.

here is command i use in shortcut and when i try to restart the viewer:
sudo xlib_shm-gl -m11 -m6 -m5 -m3 -m4 -m14 -c3 -k 0x7a6d0000

anything helps at the moment lol
It is a problem with opening connection to xserver. That can be related to permissions.
What do you mean by "switch mode"?
What distro do you have?

Thinh
Posts: 3
Joined: Fri Mar 27, 2009 2:48 am

gutsy and switching between DAY and NIGHT

Post by Thinh » Fri Mar 27, 2009 12:11 pm

i have two state , DAY = record and Night = Modect
i have created a script that runs in crontab
Here is the script



Day.sh
#!/bin/sh
#
#
#
if zmpkg.pl DAY $1
then
echo "$(date) PHASE 1 SWITCHING ZONEMINDER TO DAY MODE: SUCCESFULL" >> /var/log/mysqlcheck.log
status=1
else
echo "$(date) PHASE 1 SWITCHING ZONEMINDER TO DAY MODE: FAIL" >> /var/log/mysqlcheck.log
fi

if [ $status -eq 1 ] && xlib_shm-gl -m11 -m6 -m5 -m3 -m4 -m14 -c3 -k 0x7a6d0000 $1
then
echo "$(date) PHASE 2 STARTING XLIB_SHM-GL: SUCCESFULL" >> /var/log/mysqlcheck.log
else
echo "$(date) PHASE 2 STARTING XLIB_SHM-GL: FAIL" >> /var/log/mysqlcheck.log
fi

Thinh
Posts: 3
Joined: Fri Mar 27, 2009 2:48 am

Post by Thinh » Fri Mar 27, 2009 1:28 pm

I tried it over ssh so the error message makes sense, but it should have work fine when the crontab runs because it runs local and the xserver is running on the machine.

Maybe something wrong with my script because my log shows switching to Day mode was success but starting xlib_shm-gl fail.

my distro is gutsy

maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc » Fri Mar 27, 2009 6:36 pm

Thinh wrote:I tried it over ssh so the error message makes sense, but it should have work fine when the crontab runs because it runs local and the xserver is running on the machine.

Maybe something wrong with my script because my log shows switching to Day mode was success but starting xlib_shm-gl fail.

my distro is gutsy
crontab doesn't run in x environment so it cannot access xserver.
You can try to run

Code: Select all

xhost +localhost
in X. Maybe it will help but I'm not sure about security...

Have you tried attached start_monitor script?

Voltage54
Posts: 23
Joined: Sat Feb 21, 2009 1:35 am

Post by Voltage54 » Thu Oct 22, 2009 10:25 am

Hi Folks,

I've just re-installed my system and I can't get xlib_shm working :(

I'm getting the dreaded:

ERROR: Failed to shmget
ENOENT - segment doesn't exist
xlib_shm viewer for zm 1.24.1 version 0.6.4-gl
imgx=0 imgy=0
delay=10000
shmkey=7a6d0000
monitors:1 2 3 4
shared_data_size=9217524

I have no idea how to fix this, I have read through this forum post and people have solved it by changing their shmkey, but when I run

cat /proc/sysvipc/shm

I get:

key shmid perms size cpid lpid nattch uid gid cuid cgid atime dtime ctime
0 229376 777 135168 4654 4721 1 0 0 0 0 1256206880 1256206881 1256206878
0 262145 1600 393216 4722 4654 2 106 111 106 111 1256206881 0 1256206881

What am I doing wrong? What -k arguement should I be using? Zoneminder is presently working great and I can see all the cameras (4, running at 640x480). I followed this guide to install the latest zoneminder with mmap:

http://www.thinkdebian.org/archives/50

I'd appreciate any help!

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests