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.
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

krattai wrote:I'm trying to get a copy of this to try, but looks like you've run into a problem on your server, maciekc.

Any idea when it'll be available
again?
Cheers...
Probably in 2-3 days it will be available. I just bought used hp netserver lh3, and I'm installing system on it.
krattai
Posts: 3
Joined: Thu Apr 13, 2006 3:28 pm

Post by krattai »

cool...

I will try to be patient... :-)
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

krattai wrote:cool...

I will try to be patient... :-)
The server is back again. You can now download without problems.
And I upgraded my internet bandwidth to 1Mbit/512kbps - was 1Mbps/256kbps.

The HP LH3 PII 400 with raid array is much more faster than PII 350 with normal ide ata 100 disk with cm649 controller.

I'm thinking of using some HP or Compaq servers for zoneminder - it should 2*PIII 1GHz should be even faster than PIV and these scsi disk should beat the IDE speed.
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

Made a quick fix to support zm 1.22.1.
Use it only with 1.22.1, it won't work with 1.22.0.
Features are the same as in 0.4.

http://dig.hopto.org/xlib_shm/xlib_shm-0.4.1.tgz
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

New version of xlib_shm - now info is available at wiki
http://www.zoneminder.com/wiki/index.php/Xlib_shm

CHANGELOG:
0.5
added modes - single, quad, 9monitors and 16monitors
changing monitor and modes with keyboard
keyboard support

Please test it and write comments...
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

0.5.1 - fix for high cpu usage
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

I would like to use this here. But my graphics adapter (integrated) doesn't support xvideo extension. Versions before .4 worked well here.

The latest gives this error:
$ sudo ./xlib_shm -m1 -m2
xlib_shm viewer for zm 1.22.1 version 0.5.1
imgx=0 imgy=0
delay=10000
shmkey=7a6d2000
monitors:1 2
Found 3 Xv adaptors
ERROR: Couldn't find free Xv adaptor with RGB XvImage support
Could you make this fall back to x11 display if no Xv adaptor is found?

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

Post by maciekc »

rdmelin wrote:
Could you make this fall back to x11 display if no Xv adaptor is found?

Best regards,
Ross
please send me output of xvinfo command, and tell me the model of your card. Maybe it supports xv but in other format.
I will also do the fallback and rescalling in software(ugly).
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

The video0 "card" is the integrated video0 on the motherboard, which hwdb_test detects as 'Card:SiS Real256E'
Probing VIDEO class
$VAR1 = [
{
'subvendor' => 6217,
'bus' => 'PCI',
'description' => 'Silicon Integrated Systems [SiS]|SiS Real256E',
'pci_bus' => '1',
'subid' => 25393,
'pci_device' => '0',
'pci_function' => '0',
'media_type' => 'DISPLAY_VGA',
'id' => 25392,
'vendor' => 4153,
'driver' => 'Card:SiS Real256E'
}

Here is the xvinfo output.
$ xvinfo
X-Video Extension version 2.2
screen #0
Adaptor #0: "video4linux"
number of ports: 1
port base: 60
operations supported: PutVideo
supported visuals:
depth 24, visualID 0x22
depth 24, visualID 0x23
depth 24, visualID 0x24
depth 24, visualID 0x25
number of attributes: 22
"XV_ENCODING" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_BRIGHTNESS" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_CONTRAST" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_SATURATION" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_HUE" (range -1000 to 1000)
client settable attribute
client gettable attribute (current value is 0)
"XV_MUTE" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_FREQ" (range 0 to 16000)
client settable attribute
client gettable attribute (current value is 0)
"XV_COLORKEY" (range 0 to 16777215)
client settable attribute
client gettable attribute (current value is 66046)
"XV_AUTOPAINT_COLORKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 1)
"XV_SET_DEFAULTS" (range 0 to 0)
client settable attribute
"XV_TVXPOSITION" (range -32 to 32)
client settable attribute
client gettable attribute (current value is 0)
"XV_TVYPOSITION" (range -32 to 32)
client settable attribute
client gettable attribute (current value is 0)
"XV_GAMMA_RED" (range 100 to 10000)
client settable attribute
client gettable attribute (current value is 1000)
"XV_GAMMA_GREEN" (range 100 to 10000)
client settable attribute
client gettable attribute (current value is 1000)
"XV_GAMMA_BLUE" (range 100 to 10000)
client settable attribute
client gettable attribute (current value is 1000)
"XV_DISABLE_GRAPHICS" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_DISABLE_GRAPHICS_LR" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_DISABLE_COLORKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_USE_CHROMAKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_INSIDE_CHROMAKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_CHROMAMIN" (range 0 to 16777215)
client settable attribute
client gettable attribute (current value is 66046)
"XV_CHROMAMAX" (range 0 to 16777215)
client settable attribute
client gettable attribute (current value is 66047)
number of encodings: 28
encoding ID #0: "PAL-television"
size: 768 x 576
rate: 0.020000
encoding ID #1: "NTSC-television"
size: 640 x 480
rate: 0.016683
encoding ID #2: "SECAM-television"
size: 768 x 576
rate: 0.020000
encoding ID #3: "PAL-Nc-television"
size: 640 x 576
rate: 0.020000
encoding ID #4: "PAL-M-television"
size: 640 x 576
rate: 0.020000
encoding ID #5: "PAL-N-television"
size: 768 x 576
rate: 0.020000
encoding ID #6: "NTSC-JP-television"
size: 640 x 480
rate: 0.016683
encoding ID #7: "PAL-composite1"
size: 768 x 576
rate: 0.020000
encoding ID #8: "NTSC-composite1"
size: 640 x 480
rate: 0.016683
encoding ID #9: "SECAM-composite1"
size: 768 x 576
rate: 0.020000
encoding ID #10: "PAL-Nc-composite1"
size: 640 x 576
rate: 0.020000
encoding ID #11: "PAL-M-composite1"
size: 640 x 576
rate: 0.020000
encoding ID #12: "PAL-N-composite1"
size: 768 x 576
rate: 0.020000
encoding ID #13: "NTSC-JP-composite1"
size: 640 x 480
rate: 0.016683
encoding ID #14: "PAL-svideo"
size: 768 x 576
rate: 0.020000
encoding ID #15: "NTSC-svideo"
size: 640 x 480
rate: 0.016683
encoding ID #16: "SECAM-svideo"
size: 768 x 576
rate: 0.020000
encoding ID #17: "PAL-Nc-svideo"
size: 640 x 576
rate: 0.020000
encoding ID #18: "PAL-M-svideo"
size: 640 x 576
rate: 0.020000
encoding ID #19: "PAL-N-svideo"
size: 768 x 576
rate: 0.020000
encoding ID #20: "NTSC-JP-svideo"
size: 640 x 480
rate: 0.016683
encoding ID #21: "PAL-composite3"
size: 768 x 576
rate: 0.020000
encoding ID #22: "NTSC-composite3"
size: 640 x 480
rate: 0.016683
encoding ID #23: "SECAM-composite3"
size: 768 x 576
rate: 0.020000
encoding ID #24: "PAL-Nc-composite3"
size: 640 x 576
rate: 0.020000
encoding ID #25: "PAL-M-composite3"
size: 640 x 576
rate: 0.020000
encoding ID #26: "PAL-N-composite3"
size: 768 x 576
rate: 0.020000
encoding ID #27: "NTSC-JP-composite3"
size: 640 x 480
rate: 0.016683
Adaptor #1: "SIS 300/315/330 series Video Overlay"
number of ports: 1
port base: 61
operations supported: PutImage
supported visuals:
depth 24, visualID 0x22
depth 24, visualID 0x23
depth 24, visualID 0x24
depth 24, visualID 0x25
number of attributes: 19
"XV_COLORKEY" (range 0 to 16777215)
client settable attribute
client gettable attribute (current value is 66046)
"XV_BRIGHTNESS" (range -128 to 127)
client settable attribute
client gettable attribute (current value is 10)
"XV_CONTRAST" (range 0 to 7)
client settable attribute
client gettable attribute (current value is 2)
"XV_SATURATION" (range -7 to 7)
client settable attribute
client gettable attribute (current value is 0)
"XV_HUE" (range -8 to 7)
client settable attribute
client gettable attribute (current value is 0)
"XV_AUTOPAINT_COLORKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 1)
"XV_SET_DEFAULTS" (range 0 to 0)
client settable attribute
"XV_TVXPOSITION" (range -32 to 32)
client settable attribute
client gettable attribute (current value is 0)
"XV_TVYPOSITION" (range -32 to 32)
client settable attribute
client gettable attribute (current value is 0)
"XV_GAMMA_RED" (range 100 to 10000)
client settable attribute
client gettable attribute (current value is 1000)
"XV_GAMMA_GREEN" (range 100 to 10000)
client settable attribute
client gettable attribute (current value is 1000)
"XV_GAMMA_BLUE" (range 100 to 10000)
client settable attribute
client gettable attribute (current value is 1000)
"XV_DISABLE_GRAPHICS" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_DISABLE_GRAPHICS_LR" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_DISABLE_COLORKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_USE_CHROMAKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_INSIDE_CHROMAKEY" (range 0 to 1)
client settable attribute
client gettable attribute (current value is 0)
"XV_CHROMAMIN" (range 0 to 16777215)
client settable attribute
client gettable attribute (current value is 66046)
"XV_CHROMAMAX" (range 0 to 16777215)
client settable attribute
client gettable attribute (current value is 66047)
maximum XvImage size: 1920 x 1080
Number of image formats: 9
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x59565955 (UYVY)
guid: 55595659-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x35315652 (RV15)
guid: 52563135-0000-0000-0000-000000000000
bits per pixel: 16
number of planes: 1
type: RGB (packed)
depth: 15
red, green, blue masks: 0x7c00, 0x3e0, 0x1f
id: 0x36315652 (RV16)
guid: 52563136-0000-0000-0000-000000000000
bits per pixel: 16
number of planes: 1
type: RGB (packed)
depth: 16
red, green, blue masks: 0xf800, 0x7e0, 0x1f
id: 0x55595659 (YVYU)
guid: 59565955-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x3231564e (NV12)
guid: 4e563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 2
type: YUV (planar)
id: 0x3132564e (NV21)
guid: 4e563231-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 2
type: YUV (planar)
Adaptor #2: "SIS 315/330 series Video Blitter"
number of ports: 16
port base: 62
operations supported: PutImage
supported visuals:
depth 24, visualID 0x22
depth 24, visualID 0x23
depth 24, visualID 0x24
depth 24, visualID 0x25
number of attributes: 1
"XV_SET_DEFAULTS" (range 0 to 0)
client settable attribute
maximum XvImage size: 2046 x 2046
Number of image formats: 7
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x59565955 (UYVY)
guid: 55595659-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x55595659 (YVYU)
guid: 59565955-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x3231564e (NV12)
guid: 4e563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 2
type: YUV (planar)
id: 0x3132564e (NV21)
guid: 4e563231-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 2
type: YUV (planar)
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

@rdmerlin
Thanks for that.
Please also tell me what display depth you are running.
It can be important, but I'm not sure in this one.

I see rgb16 in your xvinfo. Maybe this can be used after little modification. I will let you know if I get some card that supports this.

Try 0.6 It must work, but not in xv mode which is a lot better.
@all
I made new version:
0.6 - fixed problem with setting higher mode than at start
- fallback to ximage when rgb32 xv is not available

download:
http://dig.hopto.org/xlib_shm/xlib_shm-0.6.tgz

If version 0.4 and higher didn't work at your system, 0.6 must work because it has fallback to ximage if xv is not working.
User avatar
rdmelin
Posts: 863
Joined: Wed Oct 29, 2003 2:23 pm
Location: Ellensburg, WA USA

Post by rdmelin »

I'm currently running 24bpp color depth. I can try changing if you like.

0.6 segfaults after trying to fall back to ximage
$ sudo ./xlib_shm -m1 -m2
xlib_shm viewer for zm 1.22.1 version 0.6
imgx=0 imgy=0
delay=10000
shmkey=7a6d2000
monitors:1 2
Found 3 Xv adaptors
WARNING: Couldn't find free Xv adaptor with RGB XvImage support
Falling back to ximage - slow and ugly rescalling
Segmentation fault
How can I help debug?
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

rdmelin wrote: 0.6 segfaults after trying to fall back to ximage

How can I help debug?
Run xserver in 32 bit mode and send me log of strace

strace -o log ./xlib_shm -m1


Send log file to my mail.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

HI mate im gonna finally have a look at your work here, but i am still running 1.22.0.
I notice the new 06 req 1.22.1.
As people upgrade the zm server at different rates, how much different is the code to get images on 1.22.0 and 1.22.1. Ie is it possible for the app to know what version is installed (or even edit a conf file) so it can communicate correctly?
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
maciekc
Posts: 150
Joined: Wed Feb 23, 2005 9:21 pm
Location: Czestochowa, POLAND

Post by maciekc »

jameswilson wrote:HI mate im gonna finally have a look at your work here, but i am still running 1.22.0.
I notice the new 06 req 1.22.1.
As people upgrade the zm server at different rates, how much different is the code to get images on 1.22.0 and 1.22.1. Ie is it possible for the app to know what version is installed (or even edit a conf file) so it can communicate correctly?
It is not much difference.
You only need to change shm structures.
Shm structures are in zm_monitor.h in zm sources, or copy them from my 0.4 version or 0.3.

I will try to make next version compile against every zm version using path to its sources.

If you don't know how to make it please send me mail and I can make version for 1.22.0 and other if someone wants.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

I must admit mae that im a bit green to this ./configure stuff and have yet to build zm this way as i always use rpm's. I have also only recently been looking at c# so i assume c++ cant be that much different. I will install an older one 0.4 by the looks and see how it goes. I never view cameras on the machines themselves but thought i ought to check out your app, with all the work your putting into it!!
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
Post Reply