Opened 8 years ago

Last modified 3 weeks ago

#4364 open enhancement

Support for DNG (RAW)

Reported by: Clément Bœsch Owned by:
Priority: wish Component: avcodec
Version: git-master Keywords: tif
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

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

Change History (11)

comment:1 by Clément Bœsch, 8 years ago

Summary: Support for DMG (RAW)Support for DNG (RAW)

comment:2 by Michael Niedermayer, 7 years ago

Keywords: tif added; tiff removed

consistent keyword with other tiff tickets

comment:3 by compn, 7 years ago

Is there a dng spec somewhere?

comment:4 by Reto Kromer, 7 years ago

Last edited 7 years ago by Reto Kromer (previous) (diff)

comment:6 by Carl Eugen Hoyos, 7 years ago

Keywords: dmg raw removed
Status: newopen

comment:7 by Balling, 7 months ago

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.

in reply to:  7 comment:8 by Michael Niedermayer, 3 weeks ago

Replying to 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"

comment:9 by Michael Koch, 3 weeks ago

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

comment:10 by Balling, 3 weeks ago

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.

comment:11 by Michael Koch, 3 weeks ago

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/

Note: See TracTickets for help on using tickets.