mpv icon indicating copy to clipboard operation
mpv copied to clipboard

screenshot function doesn't add an ICC profile to hdr pngs, causing the image to be washed out when uploaded to discord

Open WearyOlly opened this issue 2 months ago • 7 comments

mpv Information

mpv v0.40.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
libplacebo version: v7.349.0
FFmpeg version: 7.1.1 (runtime 7.1.2)
FFmpeg library versions:
   libavcodec      61.19.101
   libavdevice     61.3.100
   libavfilter     10.4.100
   libavformat     61.7.100
   libavutil       59.39.100
   libswresample   5.3.100
   libswscale      8.3.100

Other Information

- Linux version: Fedora Linux 42 (KDE Plasma Desktop Edition)
- Kernel Version: Linux 6.16.12-200.fc42.x86_64
- GPU Model: AMD Radeon RX 7900 XTX
- Mesa/GPU Driver Version: Mesa 25.1.9
- Window Manager and Version: Kwin 6.4.5-1.fc42
- Source of mpv: fedora repo
- Latest known working version: N/A
- Issue started after the following happened: N/A

Reproduction Steps

steps to reproduce (this requires a config / launch arguments to reproduce the issue)

  1. add vo=gpu-next target-colorspace-hint=yes gpu-api=vulkan gpu-context=waylandvk screenshot-format=png screenshot-tag-colorspace=yes screenshot-high-bit-depth=yes to your config
  2. launch mpv and drop / paste a hdr file or url, then take a screenshot using the screenshot function (s)
  3. locate the screenshot, open a terminal and type in magick identify -verbose [filename]

Expected Behavior

Profiles: Profile-icc:, icc:copyright, icc:description and png:iCCP: chunk was found should be present in the saved png, and the image should retain HDR when uploading to discord.

Actual Behavior

these characteristics are not present in the HDR png, this causes the image to become washed out lose its HDR when uploading to discord.

comparison between mpv hdr png and reshade hdr png: (left is mpv, right is reshade) Image what the image looks like in discord: Image

Log File

output.txt

Sample Files

No response

I carefully read all instruction and confirm that I did the following:

  • [x] I tested with the latest mpv version to validate that the issue is not already fixed.
  • [x] I provided all required information including system and mpv version.
  • [x] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • [x] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • [x] I attached the full, untruncated log file.
  • [x] I attached the backtrace in the case of a crash.

WearyOlly avatar Oct 19 '25 08:10 WearyOlly

The new PNG standard supports HDR by using cICP chunk and that's what FFmpeg uses to write HDR PNG. https://www.w3.org/TR/png-3/#cICP-chunk

Using HDR ICC is deprecated: https://www.w3.org/TR/png-hdr-pq/

Doom in HDR? Really?

L4cache avatar Oct 20 '25 03:10 L4cache

The new PNG standard supports HDR by using cICP chunk and that's what FFmpeg uses to write HDR PNG. https://www.w3.org/TR/png-3/#cICP-chunk

Doom in HDR? Really?

Discord still has to rely on ICC profile shenanigans as discord converts the hdr pngs to 8-bit "HDR" webps when you upload a HDR png

and doom in HDR? sorry that happened to be the thing I was using as an example to try and get a HDR png from mpv to properly upload onto discord.

WearyOlly avatar Oct 20 '25 03:10 WearyOlly

The new PNG standard supports HDR by using cICP chunk and that's what FFmpeg uses to write HDR PNG. https://www.w3.org/TR/png-3/#cICP-chunk Doom in HDR? Really?

Discord still has to rely on ICC profile shenanigans as discord converts the hdr pngs to 8-bit "HDR" webps when you upload a HDR png

and doom in HDR? sorry that happened to be the thing I was using as an example to try and get a HDR png from mpv to properly upload onto discord.

You can add the ICC profile manually, I don't think implementing a deprecated "new" feature is a good thing.

Don't get me wrong, I love Doom.

L4cache avatar Oct 20 '25 04:10 L4cache

Discord supports avif screenshots, so I think you could take avif screenshots from mpv and they should work in Discord

llyyr avatar Oct 20 '25 07:10 llyyr

Discord supports avif screenshots, so I think you could take avif screenshots from mpv and they should work in Discord

Image (although honestly this is just discord handling avifs poorly lol)

WearyOlly avatar Oct 20 '25 23:10 WearyOlly

Discord supports avif screenshots, so I think you could take avif screenshots from mpv and they should work in Discord

Image (although honestly this is just discord handling avifs poorly lol)

What should it look like, if handled correctly?

L4cache avatar Oct 21 '25 00:10 L4cache

Discord supports avif screenshots, so I think you could take avif screenshots from mpv and they should work in Discord

Image (although honestly this is just discord handling avifs poorly lol)

What should it look like, if handled correctly?

it should look like this

Image

WearyOlly avatar Oct 21 '25 04:10 WearyOlly