Opened 8 years ago
Closed 4 years ago
#8182 closed Patch - Bug Fix (Fixed)
Incorrect colors in zmliveplayer
| Reported by: | dluzin@… | 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 8 years ago by dluzin@…
comment:1 Changed 8 years ago by paulh
- Status changed from new to 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 8 years ago by robertm
- Resolution set to invalid
- Status changed from infoneeded_new to closed
No response from submitter.
comment:3 Changed 8 years ago by paulh
- Resolution invalid deleted
- Status changed from closed to 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 8 years ago by mythtv@…
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 8 years ago by paulh
- Resolution set to fixed
- Status changed from new to 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 8 years ago by paulh
(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 8 years ago by dscoular@…
- Resolution fixed deleted
- Status changed from closed to 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 8 years ago by paulh
- Status changed from new to 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 8 years ago by dscoular@…
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 7 years ago by robertm
- Status changed from infoneeded_new to new
comment:11 Changed 7 years ago by robertm
- Status changed from new to assigned
comment:12 Changed 7 years ago by otto at kolsi dot fi
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 7 years ago by otto at kolsi dot fi
comment:13 Changed 7 years ago by anonymous
Patch worked for me. Lets get this in the upstream ASAP.
comment:14 Changed 7 years ago by Gibby
Patch worked for me with 0.23.1 and ZM 1.24.2
comment:15 Changed 7 years ago by Gibby
Contrary to 0.24 release notes, this fix is not in 0.24
Changed 7 years ago by Gibby
Fixed MP_XXX to MP_RGB565
comment:16 Changed 7 years ago by Gibby
Uploaded new patch that changed MP_XXX to MP_RGB565
comment:17 Changed 7 years ago by Gibby
Sorry for the delay. Just tested the patch I uploaded a few days ago and it does work.
comment:18 Changed 7 years ago by beirdo
comment:19 Changed 7 years ago by paulh
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 7 years ago by Gibby@…
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 7 years ago by otto@…
Updated previous patch to git version, no functional changes
comment:21 Changed 7 years ago by otto@…
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 6 years ago by l_bonney@…
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 6 years ago by stuartm
- Type changed from patch to Patch - Bug Fix
- Version changed from head to Master Head
Long running ticket, something fixable for 0.25?
comment:24 Changed 6 years ago by paulh
- Owner paulh deleted
comment:25 Changed 5 years ago by andy12t@…
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 5 years ago by bkamen@…
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:27 Changed 5 years ago by jl_ewing@…
Same problem here, Myth 0.25, ZM 1.25.0, ACTI ACM cameras.
comment:28 Changed 4 years ago by Paul Harrison <pharrison@…>
comment:29 Changed 4 years ago by Paul Harrison <pharrison@…>
comment:30 Changed 4 years ago by paulh
- Status changed from assigned to infoneeded
Can you please update to latest 0.27-fixes or master and report if this is fixed for you.
comment:31 Changed 4 years ago by paulh
- Milestone changed from unknown to 0.27.1
- Resolution set to Fixed
- Status changed from infoneeded to closed
Reported to be fixed on the users list.

fixes zoneminder liveview color issue