n00mkrad / flowframes

Flowframes Windows GUI for video interpolation using DAIN (NCNN) or RIFE (CUDA/NCNN)
GNU General Public License v3.0
1.5k stars 115 forks source link

HDR is not encoded #40

Open ensingerphilipp opened 3 years ago

ensingerphilipp commented 3 years ago

When interpolating a MKV File with HDR information as a source. The resulting MKV File is missing the HDR Data which leads to wrong colors displayed.

n00mkrad commented 3 years ago

HDR is currently not supported as the neural networks only work with 8bpp content.

I can't say if there will ever be HDR support.

OpenSourceAnarchist commented 3 years ago

OpenCV supports tonemapping, so it may be possible to recognize or ask if a file has HDR information, convert it to 8 bit using tonemapping, and outputting the SDR interpolated file. At least this would preserve the color information even if it wasn't HDR.

n00mkrad commented 3 years ago

OpenCV supports tonemapping, so it may be possible to recognize or ask if a file has HDR information, convert it to 8 bit using tonemapping, and outputting the SDR interpolated file. At least this would preserve the color information even if it wasn't HDR.

This is something I'm working on - Automatically detecting HDR content and tonemapping to SDR using FFmpeg. It's planned for 1.25.

wnabil commented 3 years ago

@n00mkrad you can detect the hdr from ffprob track info, search for bt2020:colormatrix=bt2020nc:transfer=smpte2084

Using ffmpeg you can convert the exported file again to have hdr support but for sure its better to have this automatically in the app itself optionally use -crf ffmpeg -i "in.mkv" -vcodec libx265 -x265-params "level=5.2:colorprim=bt2020:colormatrix=bt2020nc:transfer=smpte2084" "out.mkv"

jordanbtucker commented 1 month ago

Hello in late 2024. Do the neural networks support HDR yet?