[FFmpeg-user] Convert from TIF to DNG

Michael Koch astroelectronic at t-online.de
Mon Oct 24 17:47:22 EEST 2022


On a website (1) I found the idea that a TIF file can be converted to a 
DNG file just by adding some tags and renaming it. Let's test it. Make a 
16-bit TIF file:

ffmpeg -f lavfi -i nullsrc=s=320x320,format=yuv444p10le -vf 
geq=lum='X/W*32+32*floor(Y/H*32)':cr=512:cb=512,format=rgb48be -frames 1 
-y test16.tif

Add some tags:

exiftool -DNGVersion="1.4.0.0" -PhotometricInterpretation="Linear Raw" 
test16.tif

Rename the file to DNG:

copy test16.tif test16.dng

The DNG file can be opened with FFmpeg without any problems. But all 
other programs complain that the file is corrupt. I tested with 
IrfanView, FastStone, Gimp and Fitswork.
What else might be required to make it a valid DNG file?

Michael

(1) 
https://rawpedia.rawtherapee.com/Film_Simulation#Advanced_-_Identity_DNG


More information about the ffmpeg-user mailing list