BRAW container format

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

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

BRAW container format

PostFri Apr 02, 2021 6:59 pm

Hi,

Is the BRAW container format documented somewhere ?

I'd like to have a software that keeps 1 out of every N frames from a braw file and saves the results as braw. AFAICT I can't do that using the SDK (no way to write ...).

So I was looking into the container format and see if I can easily parse the "outer layer" of it just enough to slice frames.

AFAICT there is a small header, then a frame pattern repeating and then a footer. But can't really find any official info about it.

(Obviously the audio would get screwed up, don't care about that).
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux
Offline
User avatar

carlomacchiavello

  • Posts: 1421
  • Joined: Tue Aug 28, 2012 6:04 pm
  • Location: italy

Re: BRAW container format

PostFri Apr 02, 2021 7:07 pm

Support page of Blackmagic Design
Install braw 2.0 and you find sdk installed with lib doc and more


Inviato dal mio iPhone utilizzando Tapatalk
Offline

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: BRAW container format

PostFri Apr 02, 2021 7:24 pm

I have that installed and I don't see any documentation about the file format ...

And the API provided by the SDK seems to be purely display/decode, you can't for instance trim a clip or as I want to do pick some frames and save those as a new BRAW file.
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux
Offline

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: BRAW container format

PostFri Apr 02, 2021 7:59 pm

Small correction, the SDK API actually allows trimming. But doesn't allow to pick 1:N frames like I want to do, so doesn't really help me here.
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux
Offline
User avatar

carlomacchiavello

  • Posts: 1421
  • Joined: Tue Aug 28, 2012 6:04 pm
  • Location: italy

Re: BRAW container format

PostFri Apr 02, 2021 9:15 pm

smunaut wrote:Small correction, the SDK API actually allows trimming. But doesn't allow to pick 1:N frames like I want to do, so doesn't really help me here.
Ask support directly to Blackmagic Design by form to dev team, the same from support page.
I thought that if you can trim (autokroma did a plug-in for premiere to do it) you can access and elaborate single frame solution.
Newer braw support dual file braw from 12k, should be (my idea) access to single frame and rewriting to single braw.
But who better then developer can answer you?
Good luck.


Inviato dal mio iPhone utilizzando Tapatalk
Offline
User avatar

antoine

  • Posts: 391
  • Joined: Sat Nov 24, 2018 2:20 am
  • Real Name: Antoine Dornstetter

Re: BRAW container format

PostSat Apr 03, 2021 4:03 am

smunaut wrote:Hi,

Is the BRAW container format documented somewhere ?

I'd like to have a software that keeps 1 out of every N frames from a braw file and saves the results as braw. AFAICT I can't do that using the SDK (no way to write ...).

So I was looking into the container format and see if I can easily parse the "outer layer" of it just enough to slice frames.

AFAICT there is a small header, then a frame pattern repeating and then a footer. But can't really find any official info about it.

(Obviously the audio would get screwed up, don't care about that).


Yes you can do that. Why do you want to do that ?
BRAW Studio for Adobe CC (Premiere Pro, After Effects, Media Encoder)
Offline

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: BRAW container format

PostSat Apr 03, 2021 5:43 am

I can ? How ?


Basically I want to take some piece of footage and convert it as if I had shot it using the "time lapse" option of the camera. This is to still keep then as original BRAW but reduce their size drastically since they are just b-roll and I just need to show "long term" evolution of the scene.
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux
Offline

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: BRAW container format

PostSun Apr 04, 2021 9:08 am

I ended up writing my own tool to do that :
https://gist.github.com/smunaut/8dedbf5 ... d8490fa763
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux
Offline
User avatar

antoine

  • Posts: 391
  • Joined: Sat Nov 24, 2018 2:20 am
  • Real Name: Antoine Dornstetter

Re: BRAW container format

PostSun Apr 04, 2021 11:31 pm

Haven't tested your code, but wow you're fast Sylvain ! You could have tried to hack ffmpeg to accept the braw and tweak it there (at least you would have had the MOV Quicktime demuxers and muxers)
BRAW Studio for Adobe CC (Premiere Pro, After Effects, Media Encoder)
Offline

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: BRAW container format

PostMon Apr 05, 2021 7:50 am

I thought about trying to reuse mov parsing code but given I wanted to try and keep the meta-data as close as possible to the original (I don't know what subset of MOV they actually allow/implement) with as close a structure to the original as possible.

In the end it wasn't too much of an issue to just go parse & patch the 'moov' block in python.

My code definitely doesn't support all of possible MOV option/structure, but it parses fine what's written by my bmpcc4k.
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux
Offline

CaptainHook

Blackmagic Design

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

Re: BRAW container format

PostTue Apr 06, 2021 2:59 am

Hi, we will consider this feature for the trim command in a future update, thanks.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

smunaut

  • Posts: 334
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: BRAW container format

PostTue Apr 06, 2021 5:49 am

\o/ Thanks, that would be great to be able to use the official SDK for this.
Ryzen 3700X - AMD R570X / NVidia RTX2700Super (switching between the 2) - Linux

Return to Software Developers

Who is online

Users browsing this forum: Matthias B and 3 guests