Opened 14 years ago
Closed 11 years ago
#8182 closed Patch - Bug Fix (Fixed)
Incorrect colors in zmliveplayer
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | 0.27.1 |
Component: | Plugin - MythZoneminder | Version: | Master Head |
Severity: | medium | Keywords: | mythzoneminder liveview colors |
Cc: | Ticket locked: | no |
Description
MythTV trunk, ZoneMinder?-1.24.2 Show Live View produces video with wrong colors.
Resolved by changing of the order of placing r,g and b to m_rgba in zmliveplayer.cpp from b,g,r to g,r,b
Patch is attached.
Attachments (4)
Change History (35)
Changed 14 years ago by
Attachment: | zmliveplayer_colors.patch added |
---|
comment:1 Changed 14 years ago by
Status: | new → infoneeded_new |
---|
I can't use this patch because it would obviously break things for everyone else.
Can you please tell me what settings you have on the source tab in ZoneMinder? for the camera you are having problems with. Also in the frontend log there should be a line saying what the palette MythZoneMinder? is using for the camera.
I'm still using ZM 1.23 here so it's possible something changed in 1.24. Have you used 1.23 previously and it worked?
comment:2 Changed 14 years ago by
Resolution: | → invalid |
---|---|
Status: | infoneeded_new → closed |
No response from submitter.
comment:3 Changed 14 years ago by
Resolution: | invalid |
---|---|
Status: | closed → new |
I've had this bug confirmed from a reliable source. The problem is caused by ZM 1.24 now supporting V4l v2 as well as v1 and MythZM not handling the new palettes properly.
comment:4 Changed 14 years ago by
Just wanted to note that I'd be happy to test out any (correct) patches for this.. having the same issue on my new zm 0.24 setup.
comment:5 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [25061]) MythZoneMinder?: Fix the colors of the live images when using a V4L2 source in ZM 1.24. Fixes #8182.
comment:6 Changed 14 years ago by
(In [25065]) Backport r25061 from trunk.
MythZoneMinder?: Fix the colors of the live images when using a V4L2 source in ZM 1.24. Refs #8182.
comment:7 Changed 14 years ago by
Resolution: | fixed |
---|---|
Status: | closed → new |
Hi Paul,
I'm running mythbuntu 10.04 x86_64 + autobuild for 0.23-fixes, currently revision 25065 with zoneminder 1.24.2. However, the above fix is for detecting V4L2 palettes where ZM's mysql table Monitors.palette > 255.
I'm using a foscam FI8908W IP Cam which has a zoneminder Monitors.type of "remote" with a Monitors.palette of "3" so the colours are still inverted.
Colours on the events are perfect.
Any thoughts much appreciated.
Cheers,
Doug
comment:8 Changed 14 years ago by
Status: | new → infoneeded_new |
---|
In ZoneMinder?'s monitor setup window what is the Capture Method and Capture Palette set to on the source tab and in mythfronend's log you should see a line saying what palette MythZoneminder? has detected.
comment:9 Changed 14 years ago by
Hi Paul,
The mythzmserver output states:
root@spug:/mnt/store1# mythzmserver -c /etc/zm/zm.conf -v loading zm config from /etc/zm/zm.conf ZM is version '1.24.2' Listening on port: 6548 Using server protocol version '6' getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000 Shared memory key is: 0x7a6d0000 getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 3 Event file format is: %03d-capture.jpg Analyse file format is: %03d-analyse.jpg Got 1 monitors new connection from 192.168.200.3 on socket 5 Using server protocol version '6' getZMSetting: ZM_SHM_KEY Result: 0x7a6d0000 Shared memory key is: 0x7a6d0000 getZMSetting: ZM_EVENT_IMAGE_DIGITS Result: 3 Event file format is: %03d-capture.jpg Analyse file format is: %03d-analyse.jpg Got 1 monitors new connection from 192.168.200.3 on socket 6 Processing: 'HELLO' Processing: 'HELLO' Processing: 'GET_MONITOR_LIST' Got 1 monitors id: 1 name: ThePoint width: 640 height: 480 palette: 3
The source tab in zoneminder shows:
Remote Protocol HTTP Remote Method Simple Remote Host Name 192.168.200.20 Remote Host Port 80 Remote Host Path /videostream.cgi?user=XXX&pwd=YYY Remote Image Colours 24 bit color Capture Width (pixels) 640 Capture Height (pixels) 320 Preserve Aspect Ratio false Orientation Inverted
The output from the mythfrontend.log is:
2010-06-13 10:49:07.531 Using protocol version 6 2010-06-13 10:49:07.531 Using protocol version 6 2010-06-13 10:49:07.531 XMLParseBase: Loading window theme from /usr/share/mythtv/themes/Mythbuntu/menu-ui.xml 2010-06-13 10:49:07.531 XMLParseBase: Loading window theme from /usr/share/mythtv/themes/Mythbuntu/menu-ui.xml 2010-06-13 10:49:07.557 Loading menu theme from /usr/share/mythtv/zonemindermenu.xml 2010-06-13 10:49:07.558 Loading menu theme from /usr/share/mythtv/zonemindermenu.xml 2010-06-13 10:49:17.018 Monitor: ThePoint (1) is using palette: 3 2010-06-13 10:49:17.018 XMLParseBase: Loading window theme from /usr/share/mythtv/themes/Mythbuntu/zoneminder-ui.xml 2010-06-13 10:49:17.018 Monitor: ThePoint (1) is using palette: 3 2010-06-13 10:49:17.018 XMLParseBase: Loading window theme from /usr/share/mythtv/themes/default-wide/zoneminder-ui.xml 2010-06-13 10:49:17.018 XMLParseBase: Loading window theme from /usr/share/mythtv/themes/Mythbuntu/zoneminder-ui.xml 2010-06-13 10:49:17.018 XMLParseBase: Loading window theme from /usr/share/mythtv/themes/default-wide/zoneminder-ui.xml
Yet my blue car continues to appear green ;)
Cheers,
Doug
comment:10 Changed 14 years ago by
Status: | infoneeded_new → new |
---|
comment:11 Changed 14 years ago by
Status: | new → assigned |
---|
comment:12 Changed 14 years ago by
I have also incorrect colours in zmliveplayer with one remote camera using palette "3". Earlier patch (does not apply anymore) does not solve this for me, I've attached patch that fixes the colours for me.
ZoneMinder? version is 1.24.2, in monitor settings I have: "Remote image Colours: 24-bit colour"
MythFrontend also thinks palette is "3":
Monitor: Axis (2) is using palette: 3
Changed 14 years ago by
Attachment: | zmlive-colors.patch added |
---|
comment:17 Changed 13 years ago by
Sorry for the delay. Just tested the patch I uploaded a few days ago and it does work.
comment:19 Changed 13 years ago by
Gibby, the patch is still wrong. The buffer that we read the live images from can only ever be in two formats 8 bit grey scale or 24 bit RGB.
The palette from the monitor is only used to decide which of these two formats the buffer is in. If the monitor is using one of the grey palettes then we need to read 8 bits/pixel gray scale image. If the monitor is using one of the color palettes then we need to read 24 bits/pixel rgb image.
I have spoke to the ZM author and he confirms that nothing has changed in the buffer format and looking at the ZM code I see no changes to the buffer format either.
comment:20 Changed 13 years ago by
paulh, I agree it should be 8 or 24bit after looking at the zoneminder source... so it should be named RGB24 then correct? that is based of off /usr/include/linux/videodev.h
Changed 13 years ago by
Attachment: | zmlive-colors.RGB565-git.patch added |
---|
Updated previous patch to git version, no functional changes
comment:21 Changed 13 years ago by
Updated latest patch to git version, no functional changes. Don't know about inner workings of ZoneMinder? or colour palettes but this patch really is needed to get the Live player to show correct colors.
comment:22 Changed 13 years ago by
Any idea if this patch will fix the same issue but with the Zoneminder colour pallet 'YUYV'? I'm seeing the same issue where the events show correctly, but the live view the colours are wrong.
Looking at the patch changes it doesn't even looking is YUYV a known pallet type to the plugin?
comment:23 Changed 12 years ago by
Type: | patch → Patch - Bug Fix |
---|---|
Version: | head → Master Head |
Long running ticket, something fixable for 0.25?
comment:24 Changed 12 years ago by
Owner: | paulh deleted |
---|
comment:25 Changed 12 years ago by
I too have this colour problem using Myth 0.25, ZoneMinder? v1.25.0 with Foscam IP cameras (Foscam FI8910W).
I see the code in 0.26beta has not changed from 0.25.
I need to reverse the pixel data order as per the suggested patches above, to have the correct colours displayed during live viewing.
m_rgba[pos_rgba++] = g; m_rgba[pos_rgba++] = r; m_rgba[pos_rgba++] = b;
I understand that there is confusion over the source of the data swap, but this is a REAL problem. Peculiar to the Foscam IP cameras or not.
It would be great to get a fix into the source tree so that individuals (like myself) don't have to patch and recompile every upgrade.
comment:26 Changed 12 years ago by
I just got MythZM running on my long time working ZM 1.25.0 installation and have the same color issue with the Live View.
I'm using ZM with a Aviosys 9100 (4) Input->Ethernet digitizer.
comment:30 Changed 11 years ago by
Status: | assigned → infoneeded |
---|
Can you please update to latest 0.27-fixes or master and report if this is fixed for you.
comment:31 Changed 11 years ago by
Milestone: | unknown → 0.27.1 |
---|---|
Resolution: | → Fixed |
Status: | infoneeded → closed |
Reported to be fixed on the users list.
fixes zoneminder liveview color issue