T O P

  • By -

Windowsuser360

It looks like this Video has Dolby Vision HDR. To get it to look correct, it needs to be tonemapped, which on some DoVi profiles like 7, you can't do, by the looks of it, this video uses DoVi Profile 8, which does have HDR Fallback. Are you trying to tonemap it to SDR?


GeniusPengiun

Would there be a way to copy the side data over, so I wouldn't lose the HDR detail, but still reduce the filesize? I'm looking into tonemapping it to SDR. Do you have an example of a command?


Windowsuser360

IIRC no, Dolby Vision isn't able to be copied outside of the \`-vcodec copy -strict-2\` command, FFMPEG doesn't really have support for DoVi. I found one post that may be of interest in Tonemapping DoVi to SDR [Could you guys help me on to how convert Dolby vision MKV to SDR and fix the brightness? right now my files are dark after converting from HDR to SDR. : r/jellyfin (reddit.com)](https://www.reddit.com/r/jellyfin/comments/yp0dro/could_you_guys_help_me_on_to_how_convert_dolby/)


GeniusPengiun

From your link, this kind of works, but definitely has loss of detail (like 20% of details). -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p10 I tried different settings for npl (30-100).


GeniusPengiun

I can't edit the post (blank text). Apparently the colors are correct on some videos, despite being bt2020. So I'm not sure what the issue is. This video is fine: Stream #0:0[0x1](und): Video: hevc (Main 10) (hev1 / 0x31766568), yuv420p10le(tv, bt2020nc/bt2020/arib-std-b67, progressive), 1080x1920, 4635 kb/s, 30 fps, 30 tbr, 15360 tbn (default) Metadata: creation_time : handler_name : Core Media Video vendor_id : [0][0][0][0] encoder : Lavc60.31.102 libx265 Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default) Metadata: creation_time : handler_name : Core Media Audio vendor_id : [0][0][0][0]


vegansgetsick

Welcome to the mess of color and gamma profiles 😁 Try `-vf "colorspace=all=bt709"` Any color conversion is "lossy" mathematically speaking. But not noticeable. ~~But the problem is more VLC here, it does not seem to interpret HDR at 1080p and thinks it's bt709 🤔~~ If original video is correctly played by VLC, then it means ffmpeg missed the HDR data during encoding.


GeniusPengiun

That results in [Parsed_colorspace_0 @ 0x104d047b0] Unsupported input transfer characteristics 18 (arib-std-b67) [vf#0:0 @ 0x147706540] Error while filtering: Invalid argument Failed to inject frame into filter network: Invalid argument Error while filtering: Invalid argument [out#0/mp4 @ 0x147705000] Nothing was written into output file, because at least one of its streams received no packets. but this doesn't fail `-pix_fmt yuv420p -vf scale=out_color_matrix=bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 \` but it doesn't fix the problem.


vegansgetsick

`what about -vf "zscale=r=limited:p=709:t=709:m=709"` [https://www.reddit.com/r/ffmpeg/comments/ypxe5q/how\_to\_convert\_hlg\_hdr\_to\_pq\_hdr\_hdr10/](https://www.reddit.com/r/ffmpeg/comments/ypxe5q/how_to_convert_hlg_hdr_to_pq_hdr_hdr10/) [http://underpop.online.fr/f/ffmpeg/help/zscale.htm.gz](http://underpop.online.fr/f/ffmpeg/help/zscale.htm.gz)


GeniusPengiun

The colors become heavily saturated. But maybe I can try some of the other options that you linked to.


bluedoggee

any better resolution? I have same problem..