chromakey not replacing background properly
Hi, I'm using Freeswitch 1.8.5 and am trying to get Chromakey to work to replace the background with a png or an mp4 file. I used the syntax: chromakey <uuid> start auto 25 <path to png/mp4 file> If I replaced the png file with a bg color like #00FF00, it works successfully. However, if I use a png, it blends the png with the background rather than replace it. I read in the code that the image file needs to be RGBa, which it is and I've set the background in the png explicitly to a color, but when chromakey is used to replace the background, what was brown in the png shows up as purple. I must be missing something on the properties of the png file to make this work correctly. Furthermore, if I replace it with an mp4, it shows up all black. Can someone tell me the properties of the files that need to be present for both png and mp4 for it to work? I can't seem to find any documentation on this. If you have any samples of png or mp4 files that have worked and and can share with me, that would be great so I can try to model that. Thanks, Terry
Is your png partial opacity? If it is its going to mix instead of replace those pixels. Mike
On Mar 18, 2019, at 8:21 AM, Terry C <infinite3219@gmail.com> wrote:
Hi, I'm using Freeswitch 1.8.5 and am trying to get Chromakey to work to replace the background with a png or an mp4 file. I used the syntax: chromakey <uuid> start auto 25 <path to png/mp4 file>
If I replaced the png file with a bg color like #00FF00, it works successfully. However, if I use a png, it blends the png with the background rather than replace it. I read in the code that the image file needs to be RGBa, which it is and I've set the background in the png explicitly to a color, but when chromakey is used to replace the background, what was brown in the png shows up as purple.
I must be missing something on the properties of the png file to make this work correctly. Furthermore, if I replace it with an mp4, it shows up all black.
Can someone tell me the properties of the files that need to be present for both png and mp4 for it to work? I can't seem to find any documentation on this. If you have any samples of png or mp4 files that have worked and and can share with me, that would be great so I can try to model that.
Thanks for the reply, Mike. The png is in fact fully opaque. This is the link to one of the png's I used that is all green that shows up as purple in chromakey (https://1drv.ms/u/s!AjoGLBAOTKwok4sEsN_oFHpyx8QhCA). If there is a sample png and/or mp4 that works that I can look at, I can compare and see the differences. Alpha: min: 255 (1) max: 255 (1) mean: 255 (1) %identify -verbose leaf_1280_2.png Image: leaf_1280_2.png Format: PNG (Portable Network Graphics) Mime type: image/png Class: DirectClass Geometry: 1280x616+0+0 Resolution: 118.11x118.11 Print size: 10.8374x5.21548 Units: PixelsPerCentimeter Colorspace: sRGB Type: TrueColorAlpha Base type: Undefined Endianess: Undefined Depth: 8-bit Channel depth: Red: 8-bit Green: 8-bit Blue: 8-bit Alpha: 1-bit Channel statistics: Pixels: 788480 Red: min: 0 (0) max: 232 (0.909804) mean: 53.3939 (0.209388) standard deviation: 35.179 (0.137957) kurtosis: -0.222281 skewness: 0.380167 entropy: 0.873176 Green: min: 3 (0.0117647) max: 255 (1) mean: 143.551 (0.562945) standard deviation: 47.2475 (0.185284) kurtosis: -0.708943 skewness: -0.134383 entropy: 0.947618 Blue: min: 0 (0) max: 229 (0.898039) mean: 12.233 (0.0479725) standard deviation: 14.8046 (0.0580573) kurtosis: 12.2167 skewness: 2.40529 entropy: 0.615689 Alpha: min: 255 (1) max: 255 (1) mean: 255 (1) standard deviation: 0 (0) kurtosis: 8.192e+51 skewness: 1e+36 entropy: 0 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 116.044 (0.455076) standard deviation: 24.3078 (0.0953246) kurtosis: -1.46953 skewness: 0.326922 entropy: 0.609121 Rendering intent: Perceptual Gamma: 0.45455 Chromaticity: red primary: (0.64,0.33) green primary: (0.3,0.6) blue primary: (0.15,0.06) white point: (0.3127,0.329) Matte color: grey74 Background color: white Border color: srgb(223,223,223) Transparent color: none Interlace: None Intensity: Undefined Compose: Over Page geometry: 1280x616+0+0 Dispose: Undefined Iterations: 0 Compression: Zip Orientation: Undefined Properties: date:create: 2019-03-18T18:29:52-05:00 date:modify: 2019-03-18T18:29:52-05:00 png:bKGD: chunk was found (see Background color, above) png:cHRM: chunk was found (see Chromaticity, above) png:gAMA: gamma=0.45455 (See Gamma, above) png:IHDR.bit-depth-orig: 8 png:IHDR.bit_depth: 8 png:IHDR.color-type-orig: 6 png:IHDR.color_type: 6 (RGBA) png:IHDR.interlace_method: 0 (Not interlaced) png:IHDR.width,height: 1280, 616 png:pHYs: x_res=11811, y_res=11811, units=1 png:sRGB: intent=0 (Perceptual Intent) png:text: 2 tEXt/zTXt/iTXt chunks were found png:tIME: 2019-03-18T13:27:15Z signature: c461e759eb2ea41bf96aa66d74a9c3a21e5f2a23c5d0003e56de23bbdde8eddb Artifacts: verbose: true Tainted: False Filesize: 1.84901MiB Number pixels: 788480 Pixels per second: 15.7696MP User time: 0.070u Elapsed time: 0:01.049 Version: ImageMagick 7.0.8-33 Q16 x86_64 2019-03-13 https://imagemagick.org
participants (2)
-
Mike Jerris
-
Terry C