Using this page https://www.reddit.com/r/ffmpeg/comments/17ma3mm/hdr_tone_mapping_not_workin... and our guide at https://cinelerra-gg.org/download/CinelerraGG_Manual/File_naming_convention.... I come up with this (working) line to put in file.opts for HDR to SDR bt 709 100 nits mapping: video_filter=zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv444p But it only works with software decoding. At, like, 2.3 fps for full 4k frame. And also you need to compile your ffmpeg used in cingg with z.img library.
ср, 7 мая 2025 г., 18:38 Andrew Randrianasulu <[email protected]>:
Using this page
https://www.reddit.com/r/ffmpeg/comments/17ma3mm/hdr_tone_mapping_not_workin...
and our guide at
https://cinelerra-gg.org/download/CinelerraGG_Manual/File_naming_convention....
I come up with this (working) line to put in file.opts for HDR to SDR bt 709 100 nits mapping:
video_filter=zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv444p
But it only works with software decoding. At, like, 2.3 fps for full 4k frame.
And also you need to compile your ffmpeg used in cingg with z.img library.
Got it working with Vulkan hw decoding, not much faster, but leaves cingg a bit more responsive: video_filter=zscale=tin=smpte2084:min=bt2020nc:pin=bt2020:rin=tv:t=smpte2084:m=bt2020nc:p=bt2020:r=tv,zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:p=bt709:m=bt709 monster line from https://forum.doom9.net/showpost.php?p=1898421&postcount=56 I think we better to put those examples somewhere in manual before I forgot them/lost my opts files ;)
I think we better to put those examples somewhere in manual before I forgot them/lost my opts files ;)
Agreed! Andrea, if you have time to do this that would be great! if not, just let me know and I can do it. On Fri, May 9, 2025 at 4:42 PM Andrew Randrianasulu via Cin < [email protected]> wrote:
ср, 7 мая 2025 г., 18:38 Andrew Randrianasulu <[email protected]>:
Using this page
https://www.reddit.com/r/ffmpeg/comments/17ma3mm/hdr_tone_mapping_not_workin...
and our guide at
https://cinelerra-gg.org/download/CinelerraGG_Manual/File_naming_convention....
I come up with this (working) line to put in file.opts for HDR to SDR bt 709 100 nits mapping:
video_filter=zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv444p
But it only works with software decoding. At, like, 2.3 fps for full 4k frame.
And also you need to compile your ffmpeg used in cingg with z.img library.
Got it working with Vulkan hw decoding, not much faster, but leaves cingg a bit more responsive:
video_filter=zscale=tin=smpte2084:min=bt2020nc:pin=bt2020:rin=tv:t=smpte2084:m=bt2020nc:p=bt2020:r=tv,zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:p=bt709:m=bt709
monster line from
https://forum.doom9.net/showpost.php?p=1898421&postcount=56
I think we better to put those examples somewhere in manual before I forgot them/lost my opts files ;)
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
I wrote a theoretical introduction as a basis; but I still don't really understand how it works in CinGG. I guess I need to re-study the chapter “ffmpeg interactions”... Corrections and guidance are welcome.
сб, 10 мая 2025 г., 16:46 Andrea paz via Cin <[email protected]>:
I wrote a theoretical introduction as a basis; but I still don't really understand how it works in CinGG. I guess I need to re-study the chapter “ffmpeg interactions”... Corrections and guidance are welcome.
I think it is important to note somewhere that while vf_zscale is indeed exist in mainline ffmpeg, it does not get build by default, so you need to pass switch ( --enable-libzimg) to ffmpeg's configure script. And of course have zimg development files installed. (I tested on 3.0.4) --
Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
...so you need to pass switch ( --enable-libzimg) to ffmpeg's configure script. And of course have zimg development files installed. (I tested on 3.0.4) Previously I had tried '--enable-libzimg' in configure but it was not recognized. Now I tried: export FFMPEG_EXTRA_CFG=' --enable-libzimg' and it was recognized. However, the compilation stops with this error:
ERROR: zimg >= 2.7.0 not found using pkg-config I already had the zimg 3.0.5-1 package in the system. I attach the entire cin.log.
сб, 10 мая 2025 г., 18:27 Andrea paz <[email protected]>:
...so you need to pass switch ( --enable-libzimg) to ffmpeg's configure script. And of course have zimg development files installed. (I tested on 3.0.4) Previously I had tried '--enable-libzimg' in configure but it was not recognized. Now I tried: export FFMPEG_EXTRA_CFG=' --enable-libzimg' and it was recognized. However, the compilation stops with this error:
ERROR: zimg >= 2.7.0 not found using pkg-config
I already had the zimg 3.0.5-1 package in the system.
I think I stepped on this landmine too while enabling Vulkan. Be sure you also set EXTRA_LIBS=" -lOpenCL -lSvtAv1Enc -lvpl -ldav1d -lxvidcore -lass -lbluray -lsnappy -lzimg -lplacebo -lshaderc_shared" \ in addition to FFMPEG_EXTRA_CFG= before launching autogen.sh/configure/make
I attach the entire cin.log.
I have done many attempts, but always with the same error: ERROR: zimg >= 2.7.0 not found using pkg-config In Arch, the zimg package files are as follows: /usr/include/zimg++.hpp /usr/include/zimg.h /usr/lib/libzimg.so /usr/lib/libzimg.so.2 /usr/lib/libzimg.so.2.0.0 /usr/lib/pkgconfig/zimg.pc One question: what is “pkg-config”? A CinGG's script? A system script? I search this: https://people.freedesktop.org/~dbn/pkg-config-guide.html He seems to see the library: sudo pkg-config --list-all zimg | grep zimg zimg zimg - Scaling, colorspace conversion, and dithering library sudo pkg-config --simulate zimg node 'virtual:world' { dependency 'zimg'; }; node 'zimg' { version = '3.0.5'; I suppose pkg-config can't see the *.pc file in /usr/lib/pkgconfig/zimg.pc, and I tried editing /usr/lib/pkgconfig/zimg.pc by putting in: libdir=${exec_prefix}/lib/pkgconfig But I keep getting the same error. Any advice?
вс, 11 мая 2025 г., 13:59 Andrea paz <[email protected]>:
I have done many attempts, but always with the same error:
ERROR: zimg >= 2.7.0 not found using pkg-config
Check thirdparty/ffmpeg-7.0/ffbuild/config.log near the end .....
In Arch, the zimg package files are as follows:
/usr/include/zimg++.hpp /usr/include/zimg.h
/usr/lib/libzimg.so /usr/lib/libzimg.so.2 /usr/lib/libzimg.so.2.0.0 /usr/lib/pkgconfig/zimg.pc
One question: what is “pkg-config”? A CinGG's script? A system script? I search this: https://people.freedesktop.org/~dbn/pkg-config-guide.html
He seems to see the library: sudo pkg-config --list-all zimg | grep zimg zimg zimg - Scaling, colorspace conversion, and dithering library
sudo pkg-config --simulate zimg node 'virtual:world' { dependency 'zimg'; }; node 'zimg' { version = '3.0.5';
I suppose pkg-config can't see the *.pc file in /usr/lib/pkgconfig/zimg.pc, and I tried editing /usr/lib/pkgconfig/zimg.pc by putting in:
libdir=${exec_prefix}/lib/pkgconfig
But I keep getting the same error. Any advice?
I find this: /usr/bin/ld: /tmp/ffconf.LBw6bqQB/test.o: in function `check_zimg_get_api_version': test.c:(.text+0x3): undefined reference to `zimg_get_api_version' collect2: error: ld returned 1 exit status ERROR: zimg >= 2.7.0 not found using pkg-config But here I stop for total incompetence.
вс, 11 мая 2025 г., 14:42 Andrea paz <[email protected]>:
I find this:
/usr/bin/ld: /tmp/ffconf.LBw6bqQB/test.o: in function `check_zimg_get_api_version': test.c:(.text+0x3): undefined reference to `zimg_get_api_version' collect2: error: ld returned 1 exit status ERROR: zimg >= 2.7.0 not found using pkg-config
Are you sure you added correct EXTRA_LIBS environment variable? Sometimes typos ruin it ....May be throw -L with path to libzimg there too ...
But here I stop for total incompetence.
I copied and pasted your line: EXTRA_LIBS=" -lOpenCL -lSvtAv1Enc -lvpl -ldav1d -lxvidcore -lass -lbluray -lsnappy -lzimg -lplacebo -lshaderc_shared" I have also tried just “-lzimg”. I have also tried several variations (along with or without your line) of: export EXTRA_LDFLAGS=' -L/usr/lib/libzimg.so /usr/lib/libzimg.so.2 /usr/lib/libzimg.so.2.0.0 -L/usr/lib/pkgconfig/zimg.pc' export EXTRA_CFLAGS=' -I/usr/include/zimg++.hpp /usr/include/zimg.h'
вс, 11 мая 2025 г., 15:00 Andrea paz <[email protected]>:
I copied and pasted your line:
EXTRA_LIBS=" -lOpenCL -lSvtAv1Enc -lvpl -ldav1d -lxvidcore -lass -lbluray -lsnappy -lzimg -lplacebo -lshaderc_shared"
strange, it was working with those TWO lines in Slackbuild: EXTRA_LIBS=" -lOpenCL -lSvtAv1Enc -lvpl -ldav1d -lxvidcore -lass -lbluray -lsnappy -lzimg -lplacebo -lshaderc_shared" \ FFMPEG_EXTRA_CFG=" --enable-libvpl --disable-doc --enable-opencl --enable-libsvtav1 --enable-frei0r --enable-libdav1d --enable-libzimg --enable-libxvid --enable-libass --enable-libbluray --enable-libsnappy --enable-libshaderc --enable-libplacebo --enable-vulkan --disable-debug --extra-cflags=-I/usr/local/include/vpl --extra-cflags=-I/usr/include/svt-av1" \ be sure to export both?
I have also tried just “-lzimg”. I have also tried several variations (along with or without your line) of:
You can't use something.pc in -L statement directly, it sets directory where linker looks for libraries. pkg-config is basically program (from system - I saw it on Linux distros and NetBSD's pkgsrc) that checks those *.pc files and helps to construct include and libs lines. -I is also sets include search *directory* and not a file, as far as I understand. But yeah, for example cmake sometimes mis-set those, so I tend to try and fix this on my slightly non-standart system. Or just give up and symlink few things into /usr
export EXTRA_LDFLAGS=' -L/usr/lib/libzimg.so /usr/lib/libzimg.so.2 /usr/lib/libzimg.so.2.0.0 -L/usr/lib/pkgconfig/zimg.pc' export EXTRA_CFLAGS=' -I/usr/include/zimg++.hpp /usr/include/zimg.h'
On Sun, 11 May 2025, Andrea paz via Cin wrote:
I have done many attempts, but always with the same error:
ERROR: zimg >= 2.7.0 not found using pkg-config
In Arch, the zimg package files are as follows:
/usr/lib/pkgconfig/zimg.pc
Is really /usr/lib/pkgconfig/zimg.pc the right place? By me it would be /usr/lib64/pkgconfig/zimg.pc═if I am under 64-bit system (/usr/lib/pkgconfig/zimg.pc would be compatibility lib for 32-bit applications). _______________________________________________________________________________ Georgy Salnikov NMR Group Novosibirsk Institute of Organic Chemistry Lavrentjeva, 9, 630090 Novosibirsk, Russia Phone +7-383-3307864 Email [email protected] _______________________________________________________________________________
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Georgy Salnikov -
Phyllis Smith