Edit Braw metadata?

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

zapteam

  • Posts: 18
  • Joined: Tue Nov 27, 2018 12:35 am
  • Real Name: Alex Bouchard

Edit Braw metadata?

PostFri Jan 08, 2021 8:00 pm

Hi,

Is it possible to edit the metadata on a Braw file? I have to change the camera # and the clip name ID in the metadata for future relinking for the conform on a 13 multicam shoot.

Any hints?

Thanks!
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostSun Jan 10, 2021 4:11 pm

It is in theory, but I'm not sure there are any off the shelf tools available currently that do it.

PM me, I can maybe help.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostThu Jan 14, 2021 2:12 am

In general you override metadata by creating/editing a sidecar file. However, camera ID cannot be overridden but camera number can.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostThu Jan 14, 2021 10:27 am

Is there a list somewhere of all the metadata keys that currently can be overridden? It would be very neat if any and all keys could be set in sidecar and also new metadata key-value pairs injected, it could open up some interesting workflows for softwares that can do something with all metadata.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostTue Jan 19, 2021 4:06 am

You currently can set any metadata key you want in the sidecar, but there isn't currently a list public of what all the possible keys are. The most common ones you want have specific methods for setting/validating the values already. And there are some that would never be allowed to be overridden as it would cause decoding issues (wrong camera type etc) but we could look at adding the full list that is allowed to be overridden to the manual in the future.

Of course you can also use the metadata iterator in the SDK to get a list of all currently set metadata for a particular clip which is useful for showing metadata info UI lists etc, but could also be used to get the key names for overriding them in processing and/or entering into a sidecar. As mentioned though, many have preferred methods for doing this that provide you valid ranges/lists etc.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostTue Jan 19, 2021 8:57 am

Thanks, I asked just because of these exceptions of what are not allowed to change (or vice versa).

As I understand it, injecting new keys that don’t exist in braw file isn’t possible and only overrides work? Is it something you plan to add later down the road?
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostTue Jan 19, 2021 1:24 pm

You can inject "keys" that may not be in the clip/file as long as they are already supported by the SDK/Blackmagic RAW in general. For instance if the user left some slate metadata blank on the camera like director, production name, camera operator, etc and it didn't get written to a file/clip you could add it to a sidecar later so that it shows in Resolve or whatever app.

But if you mean adding "custom" metadata we don't support that at the moment, no. How would you make use of it? It would require changes in Resolve too I think to be useful there as it currently only uses pre-defined metadata keys AFAIK.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostTue Jan 19, 2021 2:52 pm

CaptainHook wrote:But if you mean adding "custom" metadata we don't support that at the moment, no. How would you make use of it? It would require changes in Resolve too I think to be useful there as it currently only uses pre-defined metadata keys AFAIK.

This is what I meant, yes. For example there could be data that is stored during shoot but not in camera (because adding them in-camera takes time, logging happens somewhere else or there just isn't suitable keys available by default) or come from other sources, that could be merged into braw files later down the road either manually or in some automated way (from production management software etc) by creating sidecar files. It would create an application-independent way to transfer this metadata together with braw files and make it available anywhere where braw meta reading is implemented. If Resolve only reads a hardcoded set of metadata keys it is a bit limited implementation imho, why not read all keys that metadata iterator gives...
I do stuff.
Offline

zapteam

  • Posts: 18
  • Joined: Tue Nov 27, 2018 12:35 am
  • Real Name: Alex Bouchard

Re: Edit Braw metadata?

PostFri Jan 22, 2021 1:03 am

CaptainHook wrote:You can inject "keys" that may not be in the clip/file as long as they are already supported by the SDK/Blackmagic RAW in general. For instance if the user left some slate metadata blank on the camera like director, production name, camera operator, etc and it didn't get written to a file/clip you could add it to a sidecar later so that it shows in Resolve or whatever app.
.


It's exactly what I need to do. Just changing the CAMERA #

Can you give an example?


I've generate a .sidecar from ' update sidecar ' in COLOR Camera Raw
But wondering how to add the Key. Also, if I had a key and do an 'update sidecar' I'm assuming that will delete the new KEY?

Thanks for your help!
I've try
Code: Select all
{

"camera_number": "A",
}


But i doesn't work.

Code: Select all
{
   "tone_curve_contrast": 1.000000,
   "tone_curve_saturation": 1.000000,
   "tone_curve_midpoint": 0.409008,
   "tone_curve_highlights": 1.000000,
   "tone_curve_shadows": 1.000000,
   "tone_curve_black_level": 0.000000,
   "tone_curve_white_level": 1.000000,
   "tone_curve_video_black_level": 0,
   "highlight_recovery": 0,
   "post_3dlut_mode": "Disabled",
   "viewing_gamma": "Blackmagic Design Film",
   "viewing_gamut": "Blackmagic Design",
   "viewing_bmdgen": 4,
   "gamut_compression_enable": 0,
   "exposure": {
      "15:32:00:01": 0.000000
   },
   "iso": {
      "15:32:00:01": 1250
   },
   "white_balance_kelvin": {
      "15:32:00:01": 3500
   },
   "white_balance_tint": {
      "15:32:00:01": 0
   }
}
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostFri Jan 22, 2021 3:16 am

Resolve will cache metadata in a project so you have to completely remove the file/clip from your media pool and re-import. Sometimes I've found I have to close/re-open the project or restart Resolve. The easiest way is to create a new project and import the clips after modifying the sidecar - have you tried that?
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

zapteam

  • Posts: 18
  • Joined: Tue Nov 27, 2018 12:35 am
  • Real Name: Alex Bouchard

Re: Edit Braw metadata?

PostFri Jan 22, 2021 4:25 pm

CaptainHook wrote:Resolve will cache metadata in a project so you have to completely remove the file/clip from your media pool and re-import. Sometimes I've found I have to close/re-open the project or restart Resolve. The easiest way is to create a new project and import the clips after modifying the sidecar - have you tried that?


Yes, I tried, but unfortunately it doesn't work.

Code: Select all
{
   "tone_curve_contrast": 1.000000,
   "tone_curve_saturation": 1.000000,
   "tone_curve_midpoint": 0.409008,
   "tone_curve_highlights": 1.000000,
   "tone_curve_shadows": 1.000000,
   "tone_curve_black_level": 0.000000,
   "tone_curve_white_level": 1.000000,
   "tone_curve_video_black_level": 0,
   "highlight_recovery": 0,
   "post_3dlut_mode": "Disabled",
   "viewing_gamma": "Blackmagic Design Film",
   "viewing_gamut": "Blackmagic Design",
   "viewing_bmdgen": 4,
   "gamut_compression_enable": 0,
   "exposure": {
      "15:32:00:01": 0.000000
   },
   "iso": {
      "15:32:00:01": 1250
   }

   "camera_number": "A"

}
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostSat Jan 23, 2021 12:32 am

You need a comma after each metadata value to seperate before the next key and there's one missing after the ISO before the camera number. I would also move the camera number higher up or put it at the top so its with the other per clip metadata and keep all the per frame metadata like exposure/ISO etc together after it - just as a general rule to make the file easier to read for people.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostTue Jan 26, 2021 12:35 pm

I have a bit different question though: is it somehow possible to discover which processing parameters are overridden in sidecar without explicitly parsing the sidecar file myself? I'd like to try an idea with disabling UI knobs for those parameters and opening others to make sure some things are kept as I want and others can be manipulated by user.

Edit: at first I had problem with setting camera_number key from sidecar but it works as expected, I had an error in my own stuff, as usual :)
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostWed Jan 27, 2021 3:25 am

Hendrik Proosa wrote:I have a bit different question though: is it somehow possible to discover which processing parameters are overridden in sidecar without explicitly parsing the sidecar file myself? I'd like to try an idea with disabling UI knobs for those parameters and opening others to make sure some things are kept as I want and others can be manipulated by user.

I'd have to double check but I don't believe so - can you give me more of an idea of how/why you'd want to do this? Why would you want the user to not be able to change some of the metadata settings? The whole point is for users to be able to change it later.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostWed Jan 27, 2021 7:34 am

The idea would be to use sidecar file as a deliberate ”lock” on some of the parameters in some specific workflows. I understand it deviates from reference implementation but it could have some uses. I’d probably have locking as an option (a tickbox) that makes it possible to signal and inform user about what parameters are set in sidecar.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostThu Jan 28, 2021 2:19 am

Just to understand more - you want the end user to be able to lock out changing certain parameters so that they aren't accidentally changed etc?

If so, let me think about that some more. We have added the "isReadOnly" parameter to the GetClipProcessingAttributeList and GetFrameProcessingAttributeRange etc methods so potentially we could allow users to define a processing attribute as "Read Only" via the sidecar since we have a lot of that in place already and then the SDK wouldn't allow it to be changed. Doing something similar for all metadata fields might be less likely though (have to think about it and discuss it more), but for processing attributes its more likely.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 1420
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Edit Braw metadata?

PostThu Jan 28, 2021 9:32 am

Yes, something like that. For example, lets imagine a workflow where lots of braw files get moved around and it wouldn't be efficient for whatever reasons to create plates from them in similar manner. What I could do is auto-generate sidecar files that lock some specfiic aspects, for example gamut, gamma and color science gen so that user doesn't have to do the somewhat error prone manual setup for each file. I'm currently pondering on this locking mechanism in specific application but it could in also be a feature of braw format itself, just as you suggest. Having an option to set sidecar file attributes as a read-only sounds exactly like this. It would be a soft constraint, removing or modifying sidecar would remove the lock, and very easy to create in automated manner.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 1782
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: Edit Braw metadata?

PostThu Jan 28, 2021 11:55 am

Okay, thanks for the feedback. We will discuss it and consider it for an update. Cheers.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 2 guests