BRAW and FFMPEG

Do you have questions about Desktop Video, Converters, Routers and Monitoring?
  • Author
  • Message
Offline

Justin Jackson

  • Posts: 670
  • Joined: Thu Apr 28, 2016 3:50 am

BRAW and FFMPEG

PostMon Apr 29, 2019 6:41 pm

Anyone know if there is work going on in the FFMPEG to support BRAW? I use FFMPEG to specifically seek/pull clips out for highlight reels, and am now using my BMPCC4K for recording games.. and it just dawned on me that my otherwise "fast" way of pulling clips is going to be slow at best if I have to load all the BRAW files into Resolve and navigate to shoe clip start times, then select to the end. I am hoping there is a fast/easy way to quickly enter start/end times of BRAW files to pull clips out in BRAW format?
Custom DIY AMD1950x 16-core/32-thread, liquid cooled, 64GB 3600Mhz RAM, 950Pro-512GB NVMe os/apps, 2x500GB 850 Evo RAID 0 SATA3, Zotac 1070 8GB video, USB 3.1Gen2 RAID0 2x4TB, 2x2TB Crucial MX500 SSD SATA3.
Offline

Andrew Kolakowski

  • Posts: 9212
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: BRAW and FFMPEG

PostMon Apr 29, 2019 9:38 pm

Not at the moment as far as I know.

Use media management for trimming BRAW.
Offline

Hendrik Proosa

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

Re: BRAW and FFMPEG

PostTue Apr 30, 2019 7:08 am

If I can pull my act together after finishing current project I'll try to add command line trimming to my braw player. It is long due already and could actually be useful for someone.
I do stuff
Offline

Justin Jackson

  • Posts: 670
  • Joined: Thu Apr 28, 2016 3:50 am

Re: BRAW and FFMPEG

PostTue May 07, 2019 6:22 pm

That would be so slick.. would it be able to pull the in/out points to BRAW files too? I assume it would.. yes.. if you could put that in it would be a big time saver over trying to cut the clips in Resolve.
Custom DIY AMD1950x 16-core/32-thread, liquid cooled, 64GB 3600Mhz RAM, 950Pro-512GB NVMe os/apps, 2x500GB 850 Evo RAID 0 SATA3, Zotac 1070 8GB video, USB 3.1Gen2 RAID0 2x4TB, 2x2TB Crucial MX500 SSD SATA3.
Offline

Hendrik Proosa

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

Re: BRAW and FFMPEG

PostWed May 08, 2019 3:18 pm

Justin Jackson wrote:That would be so slick.. would it be able to pull the in/out points to BRAW files too? I assume it would.. yes.. if you could put that in it would be a big time saver over trying to cut the clips in Resolve.

What do you mean by pulling in/out points to braw files?
I do stuff
Offline

Justin Jackson

  • Posts: 670
  • Joined: Thu Apr 28, 2016 3:50 am

Re: BRAW and FFMPEG

PostSat May 11, 2019 12:16 am

What I mean is, via CLI, if I could specify multipe in,out points within the one file, to "cut out" in to BRAW clips (files) that would be great. I record 1.3 hour long sports games. Usually it is two or more files. If you could add the ability to support multiple input files into one playback stream (e.g. your software concatenates the files to play it like its one big file, and handles the combined time.. e.g. first file ends after 10 minutes, 2nd file is 10 minutes.. combined 20, at minute 15 in playback it is actually minute 5 in second video, but in your player, it is seamless), AND the ability to specify one or more start and end points to save as separate small braw clips/files, that would be huge.
Custom DIY AMD1950x 16-core/32-thread, liquid cooled, 64GB 3600Mhz RAM, 950Pro-512GB NVMe os/apps, 2x500GB 850 Evo RAID 0 SATA3, Zotac 1070 8GB video, USB 3.1Gen2 RAID0 2x4TB, 2x2TB Crucial MX500 SSD SATA3.
Offline

Andrew Kolakowski

  • Posts: 9212
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: BRAW and FFMPEG

PostSat May 11, 2019 10:39 am

I assume all what you need is to create EDL (or FCP XML) file with correct in/out for your needed parts and load to Resolve to have single timeline just with needed parts. Once you have in/out point it's fairly easy to generate such an EDL with eg. Python (FCP XML is more tricky). If you need them as separate timelines you simply generate EDL per one set of in/out. Key point is to find in/out points, but I assume this has to be human decision.

There is real no need to have those parts as an actual separate BRAW clips, is there?
Offline

Hendrik Proosa

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

Re: BRAW and FFMPEG

PostSat May 11, 2019 4:32 pm

Not 100% sure (must check) but afaik braw sdk does not allow cutting multiple pieces from multiple files nor from the same file into new braw file. Trimming creates new braw file for one in/out point set only. So you can't concatenate multiple cuts into one file.
I do stuff
Offline

Hendrik Proosa

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

Re: BRAW and FFMPEG

PostMon May 13, 2019 9:02 am

Checked the SDK docs, trim operation takes start frame and frame count so no multi-cut trimming.
I do stuff
Offline

Dan Sherman

  • Posts: 1185
  • Joined: Fri Jul 01, 2016 11:07 pm

Re: BRAW and FFMPEG

PostMon May 13, 2019 3:24 pm

Andrew Kolakowski wrote:I Once you have in/out point it's fairly easy to generate such an EDL with eg. Python (FCP XML is more tricky).


I've written code to FCPX xml files, and its really pretty easy. All the issues I faced came from how Resolve reads the file. Resolve seems to ignore a lot of stuff, specially when you are trying to set up and organize multiple audio and video tracks.
AMD 7950X | AMD 7900XTX (23.20.24) | DDR5-6000 CL30-40-40-96 2x32 GB | Multiple PCIe 4.0 X4 NVME | ASUS x670e HERO | Win 11 Pro 23H2 | Resolve Studio 18.6.5 B7
Offline

Andrew Kolakowski

  • Posts: 9212
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: BRAW and FFMPEG

PostTue May 14, 2019 10:00 am

Is it generic FCP XML generator (with all there rules and structure for give number of streams, cuts etc)? For me this is too complex to write in Python. I use pre-generated templates :D and I convert DPP XML into FCP XML.

Well- not a single company (except Apple) seems to have 100% valid FCP XML parser. They all support just a fraction of the whole spec (or add its own bits like Adobe does for example).
Offline

Dan Sherman

  • Posts: 1185
  • Joined: Fri Jul 01, 2016 11:07 pm

Re: BRAW and FFMPEG

PostTue May 14, 2019 3:08 pm

Andrew Kolakowski wrote:Is it generic FCP XML generator (with all there rules and structure for give number of streams, cuts etc)? For me this is too complex to write in Python. I use pre-generated templates :D and I convert DPP XML into FCP XML.

Well- not a single company (except Apple) seems to have 100% valid FCP XML parser. They all support just a fraction of the whole spec (or add its own bits like Adobe does for example).




The FCPX format is substantially simpler than the previous version, so it wan't that bad to generate from scratch.

The situation I was working with was multiple cameras, multiple clips per camera, multiple audio tracks from an external recorder, and everything contained LTC timecode.

I noticed two issues with how resolve was importing the clips. I even went back and forth with support for a while and got no where, so i had to work around the issues.

  • No matter what you do, Resolve will not treat the audio in clips in anyway other than the default. By that i mean if the clip has a stereo audio track, you are always going to get stereo in resolve no matter what the xml says. You can't mute a channel, or split it out into dual mono tracks.
  • Resolve always trys to minimize the number of tracks being used. For example say you have 3 camera angles, and thus want the clips from each camera on a separate track. This works fine as long as you have no gaps. If you have a gap in a track that's wider than any clip above it, then the clip above will drop down onto the lower track for audio and/or video, throwing all your organization out the window. if you use an xml gap element to prevent this resolve ignores it.


Honestly, if multicam had better audio output options this wouldn't be an issue. I haven't reviewed the api for 16 yet, but when I reviewed 15 it didn't have the features to organize audio and video clips appropriately either.
AMD 7950X | AMD 7900XTX (23.20.24) | DDR5-6000 CL30-40-40-96 2x32 GB | Multiple PCIe 4.0 X4 NVME | ASUS x670e HERO | Win 11 Pro 23H2 | Resolve Studio 18.6.5 B7
Offline

Andrew Kolakowski

  • Posts: 9212
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: BRAW and FFMPEG

PostWed May 15, 2019 9:46 am

I think I've seen the same issue with audio in Premiere in the past. Not sure how it behaves now.
Offline

Justin Jackson

  • Posts: 670
  • Joined: Thu Apr 28, 2016 3:50 am

Re: BRAW and FFMPEG

PostSat May 25, 2019 9:12 pm

So here is why I want to take multiple clips from BRAW. I record sports games, an hour or so in length, as one file in BRAW. Coaches/kids will then view a youtube version of it with overlayed timecode, and send me a list of start/end times in the one game they want clips of. I can feed that list to a program I wrote, or a script, that can then automate the steps of cutting those bits out. The clips are then put in a timeline in one shot to become a highlight reel.

Having to use Resolve for each person that wants clips to read BRAW means I have to manually navigate to the start point, mark it, end point, then drag/drop it down to timeline. While the new CUT window is decent at this, it is still WAY slower than if I just had the list of start/end times and run the list of them at one time through my script that does all the clips in one go.
Custom DIY AMD1950x 16-core/32-thread, liquid cooled, 64GB 3600Mhz RAM, 950Pro-512GB NVMe os/apps, 2x500GB 850 Evo RAID 0 SATA3, Zotac 1070 8GB video, USB 3.1Gen2 RAID0 2x4TB, 2x2TB Crucial MX500 SSD SATA3.
Offline

Andrew Kolakowski

  • Posts: 9212
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: BRAW and FFMPEG

PostSun May 26, 2019 12:16 pm

You have to manually find in/out points in first place no?
Once you done cuts for the first time export an EDL or FCP XML and give it to others. Once they import it they will have final timeline with all cuts.
You don't have to give actual trimmed files. In/out points can be just metadata.
Offline

jsmith

  • Posts: 80
  • Joined: Wed Aug 29, 2018 7:50 pm
  • Real Name: Jaymes Poudrier

Re: BRAW and FFMPEG

PostMon May 27, 2019 6:52 pm

Couldn't, in the case of multiple cut segments, the operation be to make a copy then trim and repeat for each segment? In resolve you can copy and trim so I'd imagine to do that with multiple cuts of the same file it would be the same process.
OS: Windows 10 Pro 64-bit (1903) | Processor:i7-5820K CPU @ 3.30GHz | Memory: 32GB RAM |
Video Card: AMD Radeon VII | VRAM: 16GB | Playback: Intensity Pro 4k
Resolve Version: 16.0.0B.033 | GPU Driver: Adrenaline 2019 19.5.2 [[Updated:6/17/2019]]
Offline

Justin Jackson

  • Posts: 670
  • Joined: Thu Apr 28, 2016 3:50 am

Re: BRAW and FFMPEG

PostSun Jun 02, 2019 2:26 am

In my case, I have a 350GB 1.3 hour long video. Source video. I wish to KEEP the source, not cut/trim it. I want to provide a series of in/out points that can be fed to the tool to save clips of those in/out points to separate BRAW or DNxHR files.
Custom DIY AMD1950x 16-core/32-thread, liquid cooled, 64GB 3600Mhz RAM, 950Pro-512GB NVMe os/apps, 2x500GB 850 Evo RAID 0 SATA3, Zotac 1070 8GB video, USB 3.1Gen2 RAID0 2x4TB, 2x2TB Crucial MX500 SSD SATA3.
Offline
User avatar

Uli Plank

  • Posts: 21743
  • Joined: Fri Feb 08, 2013 2:48 am
  • Location: Germany and Indonesia

Re: BRAW and FFMPEG

PostSun Jun 02, 2019 10:28 am

Then why not use the function to render individual clips from Deliver? You can have DNxHR.
Now that the cat #19 is out of the bag, test it as much as you can and use the subforum.

Studio 18.6.6, MacOS 13.6.6, 2017 iMac, 32 GB, Radeon Pro 580
MacBook M1 Pro, 16 GPU cores, 32 GB RAM and iPhone 15 Pro
Speed Editor, UltraStudio Monitor 3G
Offline

Dan Sherman

  • Posts: 1185
  • Joined: Fri Jul 01, 2016 11:07 pm

Re: BRAW and FFMPEG

PostSun Jun 02, 2019 12:38 pm

Uli Plank wrote:Then why not use the function to render individual clips from Deliver? You can have DNxHR.


Look at his example case.

  • He publishes a video to YouTube overlay time code
  • He sends the link to a bunch of athletes
  • They send back as many in / out segments as they want
  • From that, he has to generate a custom timeline for each athlete

Doing this in resolve manually would be a pain in the butt.

Op, you should check the python API you might be able to do what you want with it.
AMD 7950X | AMD 7900XTX (23.20.24) | DDR5-6000 CL30-40-40-96 2x32 GB | Multiple PCIe 4.0 X4 NVME | ASUS x670e HERO | Win 11 Pro 23H2 | Resolve Studio 18.6.5 B7
Offline

Justin Jackson

  • Posts: 670
  • Joined: Thu Apr 28, 2016 3:50 am

Re: BRAW and FFMPEG

PostSun Jun 02, 2019 6:41 pm

Dan gets it. Exactly.. any sort of one off manual in/out seeking and saving takes a long time. Plus, if it is not clear, I record in 4K DNxHR or BRAW. When I use DNxHR, I can use ffmpeg with a simple script that takes in multiple in/outs and a file, and spits out clips. I cant do the same with BRAW because FFMPEG doesnt support it (yet). If FFMPEG adds the BRAW SDK to handle BRAW files, and the copy mode works to save small clips as BRAW files, that would be great.

The concern I have is IF you can do this. As it stands now the only way BRAW can be saved is in the camera as part of the encoding is built in to the hardware of the cameras that support or (or at least the firmwares). I dont doubt that BM could offer the SDK to both read and write BRAW, but for now at least they want to keep all of the BRAW creation bits inside the camera firmware. Thus, I am not sure if it will be possible to take a BRAW input and cut it out into BRAW files. However, there are other formats that are almost as good, such as DNxHR. You would lose the BRAW bits unfortunately, but at least you could cut the file up in to high quality DNxHR clips.
Custom DIY AMD1950x 16-core/32-thread, liquid cooled, 64GB 3600Mhz RAM, 950Pro-512GB NVMe os/apps, 2x500GB 850 Evo RAID 0 SATA3, Zotac 1070 8GB video, USB 3.1Gen2 RAID0 2x4TB, 2x2TB Crucial MX500 SSD SATA3.

Return to Post Production

Who is online

Users browsing this forum: No registered users and 32 guests