#4364(avcodec:new): Support for DMG (RAW)
#4364: Support for DMG (RAW) -------------------------------------+------------------------------------- Reporter: ubitux | Owner: Type: | Status: new enhancement | Component: avcodec Priority: wish | Keywords: dmg raw Version: git- | tiff master | Blocking: Blocked By: | Analyzed by developer: 0 Reproduced by developer: 0 | -------------------------------------+------------------------------------- Currently only detects the preview: {{{ ☭ ./ffprobe /tmp/L1004220.DNG ffprobe version N-70643-gb7cb8b3 Copyright (c) 2007-2015 the FFmpeg developers built with gcc 4.9.2 (GCC) 20150304 (prerelease) configuration: --prefix=/home/ux/local --enable-gpl --enable-nonfree --enable-libx264 --enable-libfaac --enable-libvorbis --enable- libfontconfig --enable-libfreetype --enable-libass --enable-libmp3lame --samples=/home/ux/fate-samples --assert-level=2 libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 12.100 / 5. 12.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 [tiff_pipe @ 0x2c39c60] Stream #0: not enough frames to estimate rate; consider increasing probesize Input #0, tiff_pipe, from '/tmp/L1004220.DNG': Duration: N/A, bitrate: N/A Stream #0:0: Video: tiff, rgb24, 320x216 [SAR 1:1 DAR 40:27], 25 tbr, 25 tbn, 25 tbc }}} Overview: https://en.wikipedia.org/wiki/Digital_Negative Sample: http://kenrockwell.com/leica/m9/sample-photos-3.htm -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) --------------------------------------+----------------------------------- Reporter: ubitux | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: dmg raw tiff | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | --------------------------------------+----------------------------------- -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) -------------------------------------+----------------------------------- Reporter: ubitux | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: dmg raw tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by michael): * keywords: dmg raw tiff => dmg raw tif Comment: consistent keyword with other tiff tickets -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) -------------------------------------+----------------------------------- Reporter: ubitux | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: dmg raw tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by compn): Is there a dng spec somewhere? -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) -------------------------------------+----------------------------------- Reporter: ubitux | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: dmg raw tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by rkromer): Sorry for late step in! Here it is: http://wwwimages.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/dng_... -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) -------------------------------------+----------------------------------- Reporter: ubitux | Owner: Type: enhancement | Status: new Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: dmg raw tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by rkromer): Sorry for late steping in! Here it is: http://wwwimages.adobe.com/content/dam/Adobe/en/products/photoshop/pdfs/dng_... -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) -------------------------------------+----------------------------------- Reporter: ubitux | Owner: Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * keywords: dmg raw tif => tif * status: new => open -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Balling): It now says {{{ [tiff @ 0000018cc81ba000] non increasing IFD offset is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Niedermayer): Replying to [comment:7 Balling]:
It now says
{{{ [tiff @ 0000018cc81ba000] non increasing IFD offset is not implemented. Update your FFmpeg version to the newest one from Git. If the problem still occurs, it means that your file has a feature which has not been implemented. }}}
patch which fixes this regression is on the ML "[PATCH] avcodec/tiff: Fix loop detection" -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): Here are a few DNG images for testing: This image was taken with a Canon 6D camera (in CR2 format) and converted to DNG by Adobe DNG converter V12.4: http://www.astro-electronic.de/IMG_3459.dng This image was taken with a Canon 5D-MK4 camera (in CR2 format) and converted to DNG by Adobe DNG converter V12.4: http://www.astro-electronic.de/Canon_5D.dng This image was directly generated by a Pentax K5 camera: http://www.astro-electronic.de/Pentax_K5.DNG Some other DNG images are linked in this thread: http://ffmpeg.org/pipermail/ffmpeg-user/2020-August/049681.html -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Balling): So to support RAW like GRBG or more common RGGB you just need to support mosaicing from raw planes and then some demosaicing alogorithm, AMaZE, LMMSE, RCD, etc. See Rawtherapee code. You should also support quite complex color managment both before and after. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): I don't understand why this must be invented again. The work is already done in Libraw. DNG and many other RAW formats. People want to import RAW images from their digital cameras for making timelapse videos. If RAW images can be imported directly, then DNG is an unnecessary intermediate step. https://www.libraw.org/ -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Balling): Thanks to bf64a75c5ae58ed575303f70b2ab9b2208ded339 there are no longer any crazy problems when you convert to png or jpeg xl. Tnanks. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): There is still the problem that the PNG or JXL output images have the wrong size. In the first three cases there are black or noisy borders visible, and in the 4th case the image size is doubled: http://www.astro-electronic.de/IMG_3459.dng Should be 5472x3648, but is 5568x3708 http://www.astro-electronic.de/Canon_5D.dng Should be 6720x4480, but is 6880x4544 http://www.astro-electronic.de/Pentax_K5.DNG Should be 4928x3264, but is 4992x3284 http://ffmpeg.org/pipermail/ffmpeg-user/2020-August/049681.html Should be 3008x1600, but is 6016x3200 -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Balling):
P.S. Colors seem to be better in JXL than in PNG. But maybe I'm doing something wrong. I'd like to see an example for conversion to PNG
That is because jpeg xl supports tagging as linear transfer, ffplay does not support linear transfer, use mpv. It is still not perfect, blue is desaturated. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): FFmpeg fails to import a DNG image which was taken by a Panasonic GH5S camera (in RW2 format) and converted to DNG by Adobe DNG Converter 12.4.0.555. Here is a sample: http://www.astro-electronic.de/GH5S.dng -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:15> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): A possible algorithm for cropping could work as follows. The following tags from the DNG files are required: "Default Crop Size", "Default Crop Origin" and "Active Area" The cropping size is "Default Crop Size", or if this tag isn't set, then no cropping is required. The cropping origin is the sum of "Default Crop Origin" and "Active Area", but please note that in "Active Area" the order is y before x. If "Active Area" isn't set, then use only "Default Crop Origin". If "Default Crop Origin" is also unset, then use 0,0 as cropping origin. This algorithm should work at least for images from Canon 6D, Canon 5D- MK4, Pentax K1, Pentax K5 and DJI Zemuse X7. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:16> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Carl Eugen Hoyos): I have implemented this and will send a patch. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:17> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): If anybody has DNG images from other cameras which weren't yet mentioned here, please post a link to sample files. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:18> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Balling):
P.S. Does anybody have a DNG test image with known colors?
RAW cannot be shown on SDR display. See new Photosop 2023 and Camera Raw 15 feature. https://www.youtube.com/watch?v=FW7hee5j49w (Use HDR dislay.) '''We know''' how color managment works in DNG. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:19> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Michael Koch): Replying to [comment:19 Balling]:
P.S. Does anybody have a DNG test image with known colors?
RAW cannot be shown on SDR display. See new Photosop 2023 and Camera Raw 15 feature. https://www.youtube.com/watch?v=FW7hee5j49w (Use HDR display.)
'''We know''' how color managment works in DNG.
What can be done to import DNG images with the correct colors? Are there any workarounds? -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:20> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by Adrian): Here's a sample dng file which crashes ffmpeg, but works in other players (eg. Resolve, and Windows can show thumbnail) https://eddy.cx/files/B001_029_20221207_000001.DNG This file was compressed by SlimRaw, and the original file was working correctly in ffmpeg -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:21> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4364: Support for DNG (RAW) ---------------------------------------+----------------------------------- Reporter: Clément Bœsch | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: avcodec Version: git-master | Resolution: Keywords: tif | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ---------------------------------------+----------------------------------- Comment (by domdom): Any chance compressed DNG could be supported? -- Ticket URL: <https://trac.ffmpeg.org/ticket/4364#comment:22> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg