Magic Lantern Forum

Developing Magic Lantern => Feature Requests => Topic started by: olik on May 15, 2013, 10:12:28 AM

Title: Cinema-DNG for RAW2DNG
Post by: olik on May 15, 2013, 10:12:28 AM
Hello,

my feature request would be that raw2dng would convert to cinema-dng instead of photo-dng.
Almost all professional software supports cinema-dng while the only video software that I know off that support photo-dng would be After effects. This would safe us a render-time-consuming workflow step. Footage could be imported straight to editing or grading suits.

White papers of cinema-dng can be found here http://download.macromedia.com/pub/labs/cinemadng/cinemadng_p1_spec_091009.pdf


Thank you so much for everything! You guys rock!
Title: Re: Cinema-DNG for RAW2DNG
Post by: olik on May 16, 2013, 04:30:09 PM
Is there a way how I could help with this? More whitepapers, anything?
Title: Re: Cinema-DNG for RAW2DNG
Post by: nanomad on May 16, 2013, 05:26:33 PM
A reference implementation would be handy. I would probably keep the RAW format and convert it to cinema-dng on the PC
Title: Re: Cinema-DNG for RAW2DNG
Post by: olik on May 16, 2013, 07:06:37 PM
Okay, I ll check about some open source reference implementation.
But are sure with the raw? If the camera could record cinema-dng to the card that would just be amazing. After backup to the pc you could start editing, no conversion needed.
Title: Re: Cinema-DNG for RAW2DNG
Post by: olik on May 16, 2013, 07:39:51 PM
Here are more informations about the format: http://www.adobe.com/devnet/cinemadng.html
Dc raw could also be interesting http://www.guillermoluijk.com/tutori...w/index_en.htm
This is also interesting to take a look at http://eyepatchfilms.com/?p=903
Here is a software that maybe does already what we are looking for? http://www.apertus.org/opencine   anyhow the guys from apertus are listed on the adobe cinema-dng webpage and all there tools are open source. I think they could help us.
Title: Re: Cinema-DNG for RAW2DNG
Post by: g3gg0 on May 17, 2013, 01:45:52 AM
so we need a programmer + video guy that has the tools to test his output.
Title: Re: Cinema-DNG for RAW2DNG
Post by: g3gg0 on May 17, 2013, 01:48:07 AM
Quote from: olik on May 16, 2013, 07:39:51 PM
Here is a software that maybe does already what we are looking for? http://www.apertus.org/opencine   anyhow the guys from apertus are listed on the adobe cinema-dng webpage and all there tools are open source. I think they could help us.

"This software is still in the concept phase - there is no download link. We are looking for software developers! Help us to push it further."
Title: Re: Cinema-DNG for RAW2DNG
Post by: Chucho on May 17, 2013, 02:14:24 AM
There is no difference between regular DNG and CinemaDNG. CinemaDNG only has 5 more tags that are recommended not mandatory.
Tag 51043 TimeCode in IFD 0 ,
Tag 51044 FrameRate in IFD 0,
Tag 51058 TStop in IFD 0,
Tag 51081 ReelName in IFD 0
and Tag 51105 CameraLabel in IFD 0.
A link to all the version of DNG specs
http://justsolve.archiveteam.org/wiki/DNG
A link to the TIFF specs which DNG is based on
http://www.barrypearson.co.uk/top2009/downloads/TAG2000-22_DIS12234-2.pdf
A link to the first version specs of CinemaDNG
http://www.ikonoskop.com/begood/forum_attach.php?919745734d31d92f2ab5c8.34737310
and a link to version 1.1.0.0 specs of CinemaDNG
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/cinemadng/pdfs/CinemaDNG_Format_Specification_v1_1.pdf
Title: Re: Cinema-DNG for RAW2DNG
Post by: squig on May 17, 2013, 04:30:29 AM
atarijedi @ dvxuser wrote:

"The MLraw is simply all the image frames back to back in 1 .raw file, no headers, no nothing, just the data. You then use a supplied raw2DNG program to split it into DNG files.

I believe to create a CinemaDNG file, it is as simple as taking those DNG files, putting them into a folder, and then using an MXF wrapper on that folder. There is a open source freeware application called mxfwrap which could probably do it.

According to Adobe, you can also create one by creating a special folder structure and zipping it. Each DNG file in the structure needs to be sequentially numbered with at least 4 digits. Here is an example, it seems to work like this, I will use (f) for file and (F) for folder

(f) MovieNameDNG.zip
> (F) MovieNameDNG
>> (F) Contents
>>> (F) IMAGE
>>>> (F) MovieName
>>>>> (f) 0000.DNG
>>>>> (f) 0001.DNG
>>>>> (f) 0002.DNG
>>> (F) ICON
>>>> (f) possible_icon.jpg
>>> (F) CLIP

Nothing was specified for the CLIP folder. So you have your zip file, the root folder, inside that is a Contents folder, and inside that is 3 folders: IMAGE, ICON, and CLIP. Inside IMAGE is what I assume are your video "streams", so each folder inside IMAGE would be a different stream made up of the DNG files. The ICON folder is for an optional icon I believe, and I don't know what the CLIP folder is for, maybe a short clip? I do not know if naming conventions come into play, I am just going based on the example they gave.

Anyways, you can test it out if you want, it might work, it might not.

Also, supposedly DaVinci Resolve is unique in its capability to handle CinemaDNG with hardware support."
Title: Re: Cinema-DNG for RAW2DNG
Post by: peoplemerge on May 24, 2013, 07:01:18 PM
Anybody successfully done this?  I've tried using ffmpeg/ffmbc with dng image sequence but it can't seem to decode it.  Using:
ffmbc -f image2 -i M0000000/%06d.dng m0.mxf

mxfwrap 000000.dng,000001.dng ../m00.mxf
bails with
Input files = 000000.dng then 000001.dng
Output file = ../m00.mxf

Output OP = OP2a
ERROR: Only OP1a and OP1b currently supported
ERROR: Could not identify the essence in file "000000.dng"

Obviously I'll ping their respective lists but I have the feeling I just don't understand the command-line usage.  If you have it working, could you post specifics?
Title: Re: Cinema-DNG for RAW2DNG
Post by: aquinozp on May 30, 2013, 05:06:02 AM
Quote from: Chucho on May 17, 2013, 02:14:24 AM
There is no difference between regular DNG and CinemaDNG. CinemaDNG only has 5 more tags that are recommended not mandatory.
Tag 51043 TimeCode in IFD 0 ,
Tag 51044 FrameRate in IFD 0,
Tag 51058 TStop in IFD 0,
Tag 51081 ReelName in IFD 0
and Tag 51105 CameraLabel in IFD 0.
A link to all the version of DNG specs
http://justsolve.archiveteam.org/wiki/DNG
A link to the TIFF specs which DNG is based on
http://www.barrypearson.co.uk/top2009/downloads/TAG2000-22_DIS12234-2.pdf
A link to the first version specs of CinemaDNG
http://www.ikonoskop.com/begood/forum_attach.php?919745734d31d92f2ab5c8.34737310
and a link to version 1.1.0.0 specs of CinemaDNG
http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/cinemadng/pdfs/CinemaDNG_Format_Specification_v1_1.pdf

I think you maybe right about those tags. In Resolve 9 lite the MLraw converted DNGs (with raw2dng) just wont load.

But I found these sample files from http://www.ikonoskop.com/downloads/cinemadng/ (http://www.ikonoskop.com/downloads/cinemadng/) (tried the one titled "Coffee 3") and they loaded right up.  No special directories needed just the sequential DNG files.  In the Resolve library when you select the directory of DNG files it will recognize it as a clip and lists "File Name", "Reel No", "Start TC"(ex: 00:07:24:14), "Start"(just the starting file no), "End"(just the ending file no),"Frames","Resolution","FPS","Audio Channels"(which was 0), and "Date Modified".

Seems pretty straightforward.  If someone could modify the raw2dng tool to add these tags then the MLraw converted files should load right up in Resolve.  They would have to figure out the TimeCode stuff and maybe add the FPS as an option in raw2dng.

This should be a worthwhile endeavor.  Resolve 9 Lite is free from BlackMagicDesigns http://www.blackmagicdesign.com/support/detail/register?sid=3948&pid=11735&fid=0&did=36817&os=win&alt=true&sdk=false (http://www.blackmagicdesign.com/support/detail/register?sid=3948&pid=11735&fid=0&did=36817&os=win&alt=true&sdk=false) and seems to be a very capable and the only major restriction (of the Lite free version)is the max output resolution of 1080p and 3d rendering.
Title: Re: Cinema-DNG for RAW2DNG
Post by: Intenditore on May 31, 2013, 01:28:19 AM
Stupid question - is this possible to keep audio an cinema dng?
Title: Re: Cinema-DNG for RAW2DNG
Post by: marekk on June 03, 2013, 08:58:56 PM
You can compare DNG header entries for file from ikonoskop.com and ML RAW on exifdata.com

CINEMADNG
https://docs.google.com/file/d/0B-HdscXfsKpgWlo1Skc4RmdCVkk/edit?usp=sharing

ML RAW
https://docs.google.com/file/d/0B-HdscXfsKpgbzFsWlhWR3pRZ2c/edit?usp=sharing




Quote from: Chucho on May 17, 2013, 02:14:24 AM
There is no difference between regular DNG and CinemaDNG. CinemaDNG only has 5 more tags that are recommended not mandatory.
Title: Re: Cinema-DNG for RAW2DNG
Post by: guentergunter on June 15, 2013, 11:59:22 PM
I suggest you a look at the tool RAWMagic (http://www.magiclantern.fm/forum/index.php?topic=6218.0), since it converts even spanned RAW files directly from the card (or any other directory) into CinemaDNG. You can also choose an output directory via prompt.
Title: Re: Cinema-DNG for RAW2DNG
Post by: chmee on June 17, 2013, 03:19:15 PM
finally, i was wrong in thoughts, cinemadng has more mandatory tags - and the only thing, the "original" dngs couldnt be imported into resolve, was the bitdepth. Discussion and Windows Tool (http://www.magiclantern.fm/forum/index.php?topic=5618.0)

regards chmee