photoprism
photoprism copied to clipboard
Video: Transcode HDR10+ to SDR
Describe what problem this solves and why this would be valuable to many users
Modern phone cameras can record video in HDR10+ and Dolby Vision. These videos (at least the HDR10+ ones I can test) look grey and washed out when viewed in Photoprism.
Describe the solution you'd like
It would be great if HDR10+ and Dolby Vision videos were converted to SDR as part of the transcoding process so that they can be viewed in a web browser properly.
Additional context
The video on the left is a normal SDR video recorded on the same phone (Xiaomi 12 Pro) as the video on the right which is HDR10+ The colours on the left look vibrant and 'normal' whereas the colours in the video on the right are washed out.
I'm unable to test Dolby Vision but I imagine the results are similar.
Did you test FFmpeg 6 yet? I remember they've been working on color profiles, so there's a chance this has been improved.
I wonder if there is a common way to do this 🤔 It took me two hours of experiments to set up an HDR-to-SDR shader for my PC video player, and the end parameters are related to my monitor color profile.
Our latest preview build includes FFmpeg v5.1 instead of v4. You could try how the result looks with that or if it offers any additional options. FFmpeg v6 will probably be available in October.
ffmpeg version 6.0-6ubuntu1 still have the same issue with thumbnails of HDR10+ videos
Edit: Something like this can help: /usr/bin/ffmpeg -y -ss 00:00:00.001 -i ./hdr10.mp4 -vframes 1 -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p ./hdr10.mp4.jpg
This converts it down from Rec2020/Rec2100 to Rec709 for an SDR thumbnail.
I've been using PhotoPrism for 6+ months and have several instances for each of my family members. Just ran into this issue after returning from a week away and taking many photos and videos. I have my S24 Ultra recording HDR videos at 4K60 - already had to increase the maximum file size as many videos were over 1GB - now I'm trying to tackle two problems, one the long delay for playing back some of these videos (as they are transcoded in the background) and the relevant issue of HDR videos being washed out after transcode.
Where/how could I test these different ffmpeg flags?