mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.45k stars 2.91k forks source link

[macOS] Screenshot color different from video output? #8277

Closed jason5122 closed 3 years ago

jason5122 commented 3 years ago

Hi, I'm trying to have mpv screenshots be the same as the video output (or as close as possible). I'm not too knowledgeable about stuff like color profiles and I was wondering if anyone could help me diagnose why my screenshots appear less vibrant than the output. I'm on a macBook 2019 running macOS 11.0.1 and I'm not using any custom ICC color profile or a monitor.

I've tested with default settings, as well as with settings like screenshot-tag-colorspace, screenshot-high-bit-depth, and icc-profile-auto from reading other similar issues.

Video output

Screen Shot 2020-11-16 at 7 26 44 AM-2

mpv screenshot

mpv-shot0001

mpv.conf (if needed)

mpv.conf.txt

Log file

mpv.log

Akemi commented 3 years ago

if i open both screenshots with mpv and no-config they look identically colour wise.

also one screenshot is tagged with "sRGB IEC61966-2.1" profile and the other one with "Colour LCD". since who knows what exactly the screenshot tool of macOS does, it's not unlikely they will look different.

jason5122 commented 3 years ago

Wow, I didn't know mpv supported opening pictures. They do look the same in mpv which makes sense I guess.

Out of curiosity, do you know why macOS's Preview and web browsers display it differently? I see a slight difference when opening the screenshots with those applications.

Also, any way to donate to this project? I think the work you guys are doing is great. I would submit pull requests if I had the time/expertise, but I want to help however I can :)

Akemi commented 3 years ago

it's probably the way the macOS colour management handles the differently tagged images. here the two outputs of the identify imagemagick output. they are quite different and it's also possible one or the other ignores some of the info, which leads to the difference.

no there are no donations for the project. you can only donate to individual persons if they set something like that up.

Image:
  Filename: 99253077-1a283e00-27de-11eb-85b5-8e47c88b68e2.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 1920x1080+0+0
  Units: Undefined
  Colorspace: sRGB
  Type: TrueColor
  Base type: Undefined
  Endianness: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
  Channel statistics:
    Pixels: 2073600
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 110.824 (0.434605)
      median: 18 (0.0705882)
      standard deviation: 70.2043 (0.275311)
      kurtosis: -1.23366
      skewness: 0.187298
      entropy: 0.978765
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 97.5551 (0.382569)
      median: 25 (0.0980392)
      standard deviation: 64.7953 (0.254099)
      kurtosis: -0.607204
      skewness: 0.602941
      entropy: 0.957032
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 81.2323 (0.318558)
      median: 48 (0.188235)
      standard deviation: 59.747 (0.234302)
      kurtosis: 0.716561
      skewness: 1.0379
      entropy: 0.939408
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 96.5372 (0.378577)
      median: 30.3333 (0.118954)
      standard deviation: 64.9155 (0.254571)
      kurtosis: -0.662725
      skewness: 0.586361
      entropy: 0.958402
  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: 1920x1080+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Convex hull: 0,0 1919,0 1919,1074 1917,1079 0,1079 0,0 
  Minimum bounding box: 1919,0 1919,1079 0,1079 0,0 
  Properties:
    date:create: 2020-11-16T17:21:18+00:00
    date:modify: 2020-11-16T17:21:16+00:00
    minimum-bounding-box:_p: 0,0
    minimum-bounding-box:_q: 1919,0
    minimum-bounding-box:_v: 1917,1079
    minimum-bounding-box:angle: 0
    minimum-bounding-box:area: 2.0706e+06
    minimum-bounding-box:height: 1919
    minimum-bounding-box:unrotate: -0
    minimum-bounding-box:width: 1079
    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: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 1920, 1080
    png:pHYs: x_res=0, y_res=1, units=0
    png:sRGB: intent=1 (Relative Intent)
    signature: 1b96193cec114b899fc08cd947c3b81ac3a589279581d126df30f0e93cd0308b
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 6241210B
  Number pixels: 2073600
  Pixels per second: 84155400P
  User time: 0.030u
  Elapsed time: 0:01.024
  Version: ImageMagick 7.0.10-38 Q16 x86_64 2020-11-15 https://imagemagick.org
Image:
  Filename: 99253438-c10cda00-27de-11eb-9a22-90b12002dd0f.png
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 3360x1892+0+0
  Resolution: 144x144
  Print size: 23.3333x13.1389
  Units: PixelsPerInch
  Colorspace: sRGB
  Type: TrueColorAlpha
  Base type: Undefined
  Endianness: Undefined
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
    Alpha: 8-bit
  Channel statistics:
    Pixels: 6357120
    Red:
      min: 0  (0)
      max: 255 (1)
      mean: 110.784 (0.434447)
      median: 17 (0.0666667)
      standard deviation: 69.6387 (0.273093)
      kurtosis: -1.23084
      skewness: 0.180332
      entropy: 0.978912
    Green:
      min: 0  (0)
      max: 255 (1)
      mean: 97.5245 (0.382449)
      median: 25 (0.0980392)
      standard deviation: 64.152 (0.251577)
      kurtosis: -0.595947
      skewness: 0.598681
      entropy: 0.957171
    Blue:
      min: 0  (0)
      max: 255 (1)
      mean: 81.2378 (0.31858)
      median: 48 (0.188235)
      standard deviation: 59.1256 (0.231865)
      kurtosis: 0.751602
      skewness: 1.04172
      entropy: 0.939435
    Alpha:
      min: 0  (0)
      max: 255 (1)
      mean: 254.985 (0.999943)
      median: 255 (1)
      standard deviation: 1.86519 (0.00731446)
      kurtosis: 17798.7
      skewness: -132.572
      entropy: 0.000228869
  Image statistics:
    Overall:
      min: 0  (0)
      max: 255 (1)
      mean: 136.133 (0.533855)
      median: 86.25 (0.338235)
      standard deviation: 48.6954 (0.190962)
      kurtosis: -1.48941
      skewness: 0.160284
      entropy: 0.718937
  Alpha: none   #00000000
  Rendering intent: Perceptual
  Gamma: 0.454545
  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: 3360x1892+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Convex hull: 14,0 3345,0 3348,1 3350,2 3353,4 3355,6 3357,9 3358,11 3359,14 3359,1877 3358,1880 3357,1882 3355,1885 3353,1887 3350,1889 3348,1890 3345,1891 14,1891 11,1890 9,1889 6,1887 4,1885 2,1882 1,1880 0,1877 0,14 1,11 2,9 4,6 6,4 9,2 11,1 14,0 
  Minimum bounding box: 3359,0 3359,1891 0,1891 0,0 
  Profiles:
    Profile-exif: 144 bytes
    Profile-icc: 4088 bytes
  Properties:
    date:create: 2020-11-16T17:21:19+00:00
    date:modify: 2020-11-16T17:21:11+00:00
    exif:ExifOffset: 78
    exif:PixelXDimension: 3360
    exif:PixelYDimension: 1892
    exif:UserComment: 65, 83, 67, 73, 73, 0, 0, 0, 83, 99, 114, 101, 101, 110, 115, 104, 111, 116
    icc:copyright: Copyright Apple Inc., 2020
    icc:description: Display
    minimum-bounding-box:_p: 14,0
    minimum-bounding-box:_q: 3345,0
    minimum-bounding-box:_v: 3345,1891
    minimum-bounding-box:angle: 0
    minimum-bounding-box:area: 6.35187e+06
    minimum-bounding-box:height: 3359
    minimum-bounding-box:unrotate: -0
    minimum-bounding-box:width: 1891
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:iCCP: chunk was found
    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: 3360, 1892
    png:pHYs: x_res=5669, y_res=5669, units=1
    png:text: 9 tEXt/zTXt/iTXt chunks were found
    png:text-encoded profiles: 1 were found
    signature: d9e9ce818ef4b326b9588a86b4fcafc48b11d140cb815ebcca22e4ef3a6f9cab
  Artifacts:
    verbose: true
  Tainted: False
  Filesize: 8.26965MiB
  Number pixels: 6357120
  Pixels per second: 19.7453MP
  User time: 0.960u
  Elapsed time: 0:01.321
  Version: ImageMagick 7.0.10-38 Q16 x86_64 2020-11-15 https://imagemagick.org

here the same for exiftool

ExifTool Version Number         : 11.85
File Name                       : 99253077-1a283e00-27de-11eb-85b5-8e47c88b68e2.png
File Size                       : 6.0 MB
File Modification Date/Time     : 2020:11:16 18:21:16+01:00
File Access Date/Time           : 2020:11:16 19:15:07+01:00
File Inode Change Date/Time     : 2020:11:16 18:21:18+01:00
File Permissions                : rw-r--r--
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 1920
Image Height                    : 1080
Bit Depth                       : 8
Color Type                      : RGB
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Pixels Per Unit X               : 0
Pixels Per Unit Y               : 1
Pixel Units                     : Unknown
SRGB Rendering                  : Relative Colorimetric
White Point X                   : 0.3127
White Point Y                   : 0.329
Red X                           : 0.64
Red Y                           : 0.33
Green X                         : 0.3
Green Y                         : 0.6
Blue X                          : 0.15
Blue Y                          : 0.06
Gamma                           : 2.2
Image Size                      : 1920x1080
Megapixels                      : 2.1
ExifTool Version Number         : 11.85
File Name                       : 99253438-c10cda00-27de-11eb-9a22-90b12002dd0f.png
File Size                       : 8.3 MB
File Modification Date/Time     : 2020:11:16 18:21:11+01:00
File Access Date/Time           : 2020:11:16 19:15:16+01:00
File Inode Change Date/Time     : 2020:11:16 18:21:19+01:00
File Permissions                : rw-r--r--
File Type                       : PNG
File Type Extension             : png
MIME Type                       : image/png
Image Width                     : 3360
Image Height                    : 1892
Bit Depth                       : 8
Color Type                      : RGB with Alpha
Compression                     : Deflate/Inflate
Filter                          : Adaptive
Interlace                       : Noninterlaced
Profile Name                    : icc
White Point X                   : 0.3127
White Point Y                   : 0.329
Red X                           : 0.64
Red Y                           : 0.33
Green X                         : 0.3
Green Y                         : 0.6
Blue X                          : 0.15
Blue Y                          : 0.06
Background Color                : 255 255 255
Pixels Per Unit X               : 5669
Pixels Per Unit Y               : 5669
Pixel Units                     : meters
Profile CMM Type                : Apple Computer Inc.
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 2020:11:14 11:24:51
Profile File Signature          : acsp
Primary Platform                : Apple Computer Inc.
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : Apple Computer Inc.
Device Model                    : 
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : Apple Computer Inc.
Profile ID                      : 0
Profile Description             : Display
Profile Description ML (hr-HR)  : LCD u boji
Profile Description ML (ko-KR)  : 컬러 LCD
Profile Description ML (nb-NO)  : Farge-LCD
Profile Description ML (hu-HU)  : Színes LCD
Profile Description ML (cs-CZ)  : Barevný LCD
Profile Description ML (da-DK)  : LCD-farveskærm
Profile Description ML (nl-NL)  : Kleuren-LCD
Profile Description ML (fi-FI)  : Väri-LCD
Profile Description ML (it-IT)  : LCD a colori
Profile Description ML (es-ES)  : LCD a color
Profile Description ML (ro-RO)  : LCD color
Profile Description ML (fr-CA)  : ACL couleur
Profile Description ML (uk-UA)  : Кольоровий LCD
Profile Description ML (he-IL)  : ‏LCD צבעוני
Profile Description ML (zh-TW)  : 彩色LCD
Profile Description ML (vi-VN)  : LCD Màu
Profile Description ML (sk-SK)  : Farebný LCD
Profile Description ML (zh-CN)  : 彩色LCD
Profile Description ML (ru-RU)  : Цветной ЖК-дисплей
Profile Description ML (en-GB)  : Colour LCD
Profile Description ML (fr-FR)  : LCD couleur
Profile Description ML (hi-IN)  : रंगीन LCD
Profile Description ML (th-TH)  : LCD สี
Profile Description ML (ca-ES)  : LCD en color
Profile Description ML (en-AU)  : Colour LCD
Profile Description ML (es-XL)  : LCD color
Profile Description ML (de-DE)  : Farb-LCD
Profile Description ML          : Color LCD
Profile Description ML (pt-BR)  : LCD Colorido
Profile Description ML (pl-PL)  : Kolor LCD
Profile Description ML (el-GR)  : Έγχρωμη οθόνη LCD
Profile Description ML (sv-SE)  : Färg-LCD
Profile Description ML (tr-TR)  : Renkli LCD
Profile Description ML (pt-PT)  : LCD a Cores
Profile Description ML (ja-JP)  : カラーLCD
Profile Copyright               : Copyright Apple Inc., 2020
Media White Point               : 0.94955 1 1.08902
Red Matrix Column               : 0.51085 0.23949 -0.00104
Green Matrix Column             : 0.29871 0.70819 0.04276
Blue Matrix Column              : 0.15465 0.05232 0.78319
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Video Card Gamma                : (Binary data 48 bytes, use -b option to extract)
Native Display Info             : (Binary data 62 bytes, use -b option to extract)
Chromatic Adaptation            : 1.04861 0.02332 -0.05034 0.03018 0.99002 -0.01714 -0.00922 0.01503 0.75172
Make And Model                  : (Binary data 40 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Exif Byte Order                 : Big-endian (Motorola, MM)
X Resolution                    : 144
Y Resolution                    : 144
Resolution Unit                 : inches
User Comment                    : Screenshot
Exif Image Width                : 3360
Exif Image Height               : 1892
Warning                         : [minor] Text chunk(s) found after PNG IDAT (may be ignored by some readers)
Datecreate                      : 2020-11-16T12:37:19+00:00
Datemodify                      : 2020-11-16T12:37:19+00:00
Exif Exif Offset                : 78
Exif Pixel X Dimension          : 3360
Exif Pixel Y Dimension          : 1892
Exif User Comment               : 65, 83, 67, 73, 73, 0, 0, 0, 83, 99, 114, 101, 101, 110, 115, 104, 111, 116
Icccopyright                    : Copyright Apple Inc., 2020
Iccdescription                  : Display
Image Size                      : 3360x1892
Megapixels                      : 6.4