Am 11.10.2020 um 21:07 schrieb Michael Koch:
Am 11.10.2020 um 20:56 schrieb Paul B Mahol:
On Sun, Oct 11, 2020 at 07:37:25PM +0200, Michael Koch wrote:
I tested all 4 DNG images again with the latest FFmpeg version (Gyan's build
from today).
I tested with and without zscale filter. All tests failed. When testing with
IrfanView, all DNG input images seem to be ok.

Your issues is that you do not know how to use zscale properly.

DNG decoding is just fine, what is missing is colorspace stuff in swscale,
for proper display.

Can you please give an example for the correct zscale options?


Finally I found a command line that converts DNG (from Adobe DNG converter) to JPG with a more or less acceptable result:

ffmpeg -i IMG_3459.dng -vf zscale=t=linear,tonemap=gamma:param=1.85,tonemap=linear:param=64,colorlevels=rimin=0.0:gimin=0.0:bimin=0.0:rimax=0.53:gimax=1:bimax=0.57 -y out.jpg

But I think everything after "zscale" is only a dirty workaround to correct errors that were made somewhere else. Especially the strong amplification by factor 64 and strong color correction doesn't look right. Please also note that the size of the output image is wrong. It's bigger than the input image and has black borders at the left and top. The console output is below.

Michael



C:\Users\astro\Desktop\dng>c:\ffmpeg\ffmpeg -i IMG_3459.dng -vf zscale=t=linear,tonemap=gamma:param=1.85,tonemap=linear:param=64,colorlevels=rimin=0.0:gimin=0.0:bimin=0.0:rimax=0.53:gimax=1:bimax=0.57 -y out.jpg ffmpeg version 2020-10-11-git-7ea4bcff7b-full_build-www.gyan.dev Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 10.2.0 (Rev3, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 60.100 / 56. 60.100
  libavcodec     58.111.100 / 58.111.100
  libavformat    58. 62.100 / 58. 62.100
  libavdevice    58. 11.102 / 58. 11.102
  libavfilter     7. 87.100 /  7. 87.100
  libswscale      5.  8.100 /  5.  8.100
  libswresample   3.  8.100 /  3.  8.100
  libpostproc    55.  8.100 / 55.  8.100
[tiff @ 000001d36e8cf800] Assuming black level pattern values are identical
[tiff @ 000001d36e8cf800] Tiled TIFF is not allowed to strip
[tiff_pipe @ 000001d36e8cd800] Stream #0: not enough frames to estimate rate; consider increasing probesize
Input #0, tiff_pipe, from 'IMG_3459.dng':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: tiff, bayer_rggb16le, 5568x3708, 25 tbr, 25 tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (tiff (native) -> mjpeg (native))
Press [q] to stop, [?] for help
[tiff @ 000001d36e8d4900] Assuming black level pattern values are identical
[tiff @ 000001d36e8d4900] Tiled TIFF is not allowed to strip
[swscaler @ 000001d3706eed40] deprecated pixel format used, make sure you did set range correctly [tonemap @ 000001d36e901040] Missing color space information, desaturation is disabled [tonemap @ 000001d36e900240] Missing color space information, desaturation is disabled
Output #0, image2, to 'out.jpg':
  Metadata:
    encoder         : Lavf58.62.100
    Stream #0:0: Video: mjpeg, yuvj444p(pc), 5568x3708, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
    Metadata:
      encoder         : Lavc58.111.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
frame=    1 fps=0.5 q=12.1 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.0185x video:853kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown


_______________________________________________
ffmpeg-user mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to