Encoded black bar auto-detection?

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Phadeguy

  • Posts: 33
  • Joined: Sun Feb 27, 2022 5:08 pm
  • Real Name: Kris McCormic

Encoded black bar auto-detection?

PostThu Feb 29, 2024 9:20 pm

Hey Everyone,

I have some very old 4:3 source footage that sometimes has 16:9 video with encoded black bars on the top and bottom to fill the 4:3 frame. I am using a 16:9 project and would like to zoom in to trim the black bars from the result. However, since I would prefer not to do this manually for every clip I use, it would be nice if Resolve had a way to do this automatically for me.

Does DaVinci Resolve have a way to auto-detect and zoom in the source footage to crop the 4:3 black bars in a 16:9 project?

Thank you for your help!
Offline

Peter Cave

  • Posts: 3799
  • Joined: Thu Aug 23, 2012 6:45 am
  • Location: Melbourne, Australia

Re: Encoded black bar auto-detection?

PostFri Mar 01, 2024 1:45 am

No. You will need to select those clips in the Media Pool and use the Inspector to change the Scaling to "Fill".
Now they will scale correctly when edited into a 16:9 timeline.
Resolve 18.6.6 Mac OSX 14.4.1 Sonoma
Mac Studio Max 32GB
Online
User avatar

Uli Plank

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

Re: Encoded black bar auto-detection?

PostFri Mar 01, 2024 2:25 am

Not if the black bars are truly encoded, as 'baked in'.

In that case, I'd suggest making them a group and apply a pre-group transform in the Color page.
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
User avatar

Marc Wielage

  • Posts: 11041
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Hollywood, USA

Re: Encoded black bar auto-detection?

PostFri Mar 01, 2024 5:53 am

Phadeguy wrote:I have some very old 4:3 source footage that sometimes has 16:9 video with encoded black bars on the top and bottom to fill the 4:3 frame. I am using a 16:9 project and would like to zoom in to trim the black bars from the result. However, since I would prefer not to do this manually for every clip I use, it would be nice if Resolve had a way to do this automatically for me.

There's no way to do this automatically with Avid or Baselight or Final Cut Pro or Premiere or Resolve, to my knowledge.

What might possibly work: if all the letterboxed material has specific timecode from a specific source, then you'd be able to group it and do all the changes at once. My observation is you'll have to pan/scan those shots manually, so there won't be a "set it and forget it" position -- you'll have to intelligently reframe it according to shot content.
marc wielage, csi • VP/color & workflow • chroma | hollywood
Offline

Peter Cave

  • Posts: 3799
  • Joined: Thu Aug 23, 2012 6:45 am
  • Location: Melbourne, Australia

Re: Encoded black bar auto-detection?

PostFri Mar 01, 2024 10:26 pm

I stand by my previous post explaining how to do it in a very simple way.
I have tested and used this technique on many projects.
Resolve 18.6.6 Mac OSX 14.4.1 Sonoma
Mac Studio Max 32GB
Offline

franciscovaldez

  • Posts: 387
  • Joined: Wed Aug 22, 2012 4:52 pm

Re: Encoded black bar auto-detection?

PostFri Mar 01, 2024 10:35 pm

It seems the OP is working from a single source video file and not on a clip based project
MacBook Pro 13"
M2
UltraStudio 4K

Mac Pro
2.7 GHz 12-Core Intel Xeon E5
64 GB 1866 MHz DDR3
AMD FirePro D700 6 GB
Online
User avatar

Uli Plank

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

Re: Encoded black bar auto-detection?

PostFri Mar 01, 2024 11:27 pm

If that’s the case, it can still be chopped up by scene detection and then grouped for selective treatment.
But Marc is right, the shots may need individual treatment for aesthetic optimization.
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
User avatar

Marc Wielage

  • Posts: 11041
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Hollywood, USA

Re: Encoded black bar auto-detection?

PostSat Mar 02, 2024 12:08 am

franciscovaldez wrote:It seems the OP is working from a single source video file and not on a clip based project

Then Scene Detect is the only thing I can think of... and its effectiveness will be very content-dependent.
marc wielage, csi • VP/color & workflow • chroma | hollywood
Offline

panos_mts

  • Posts: 1158
  • Joined: Mon Oct 21, 2019 3:18 pm
  • Real Name: Panagiotis Vellios

Re: Encoded black bar auto-detection?

PostSat Mar 02, 2024 12:10 am

Considering that the black bars are burned in and you have a single long clip with multiple shots.
One way I can think to automate this is to use the fusion page with the probe modifier.

The setup will be something like this:
A transform node that zooms the clip and makes the black bars disappear. The probe modifier will be attached to the blend parameter of the transform node. The probe modifier will sample the upper or bottom area of the image, and if it detects that the area is completely black, it will set the blend of the transform to 1.0, otherwise, the blend will be set to 0, and the transform will not have any effect.
It may need some time to tweak the parameters of the probe modifier to get the desired result.

The downsides of this approach are that you are applying a fixed amount of zoom/transform to the portions with black bars. There will also be an impact on performance but you can always re-render the video.
Online
User avatar

Uli Plank

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

Re: Encoded black bar auto-detection?

PostSat Mar 02, 2024 1:17 am

Which would only work if the black areas are truly black, and that depends on the source and transfer.
But we are getting into speculation if the TO doesn't call back…
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

Phadeguy

  • Posts: 33
  • Joined: Sun Feb 27, 2022 5:08 pm
  • Real Name: Kris McCormic

Re: Encoded black bar auto-detection?

PostSat Mar 02, 2024 2:55 am

Hey Everyone,

Thank you for the replies!

The black bars are solidly hard-coded into the video file. The original source is often very old VHS footage that will have VCR gray noise in the letterbox areas. Having the clip's letterbox black bars auto-detected, zoomed, and flagged for review (change the clip color) would be a fantastic time saver. I was hoping that since security cameras can instantly recognize "human" in real-time anywhere in a video feed, it wouldn't be too much of a stretch to recognize static (mostly) black letterbox bars in a video clip.

Again, any help is greatly appreciated!!
Offline

Peter Cave

  • Posts: 3799
  • Joined: Thu Aug 23, 2012 6:45 am
  • Location: Melbourne, Australia

Re: Encoded black bar auto-detection?

PostSat Mar 02, 2024 10:08 pm

franciscovaldez wrote:It seems the OP is working from a single source video file and not on a clip based project


If this is the case, then manually is the only way.
Resolve 18.6.6 Mac OSX 14.4.1 Sonoma
Mac Studio Max 32GB
Online
User avatar

Uli Plank

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

Re: Encoded black bar auto-detection?

PostSun Mar 03, 2024 12:11 am

Cut detection might still be worth a try. It can be adjusted and manually corrected for false negatives or positives. Grouping would be manually, though.
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

Phadeguy

  • Posts: 33
  • Joined: Sun Feb 27, 2022 5:08 pm
  • Real Name: Kris McCormic

Re: Encoded black bar auto-detection?

PostSun Mar 03, 2024 3:47 pm

Peter Cave wrote:If this is the case, then manually is the only way.
Darn. This is quite disappointing.

Given all that modern image detection can accomplish nowadays (that is a car, that is a pet, that is a human, that human is [this person]), it seems it would be simple by comparison to have image recognition go, "There appear to be black bars in this clip with the average coordinates being from Y=0 to Y=[y1] and from Y=[y2] to Y=[end]".

I could imagine a programming manager saying, "Welcome to our company, n00b programmer. Before we fully open our code base and lose you upon actual important programming, we want to confirm your abilities and knowledge of our programming standards by having you do a fairly simple development task. Let's see... black bar detection. That should be easy enough. Once you're done with that, your programming lead will evaluate your solution's adherence to our standards. If they are good, we will incorporate your code into production and then assign you more meaningful tasks. Good luck!"

Maybe detecting dark rectangles using modern image detection methods and returning the Y-coordinates is harder than it sounds in my brain? To me, it's magic either way.
Online
User avatar

Uli Plank

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

Re: Encoded black bar auto-detection?

PostMon Mar 04, 2024 12:13 am

Everything that has a sufficiently large market and is easy enough to do, will be produced sooner or later.
If it doesn't show up, at least one of the conditions isn't met.
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

Phadeguy

  • Posts: 33
  • Joined: Sun Feb 27, 2022 5:08 pm
  • Real Name: Kris McCormic

Re: Encoded black bar auto-detection?

PostTue Mar 05, 2024 2:41 pm

I'm fairly certain that I'm not the first person in the history of the universe to run into this. I'm sure at least one of those persons had the skills to make a helpful tool and release it to the public. If Resolve can't do it, are there standalone programs or plugins that can help me out?
Offline

Andy Mees

  • Posts: 3258
  • Joined: Wed Aug 22, 2012 7:48 am

Re: Encoded black bar auto-detection?

PostTue Mar 05, 2024 3:01 pm

Panos already posted info on an avenue you can pursue within Resolve:
https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=197411#p1025278
Offline

Phadeguy

  • Posts: 33
  • Joined: Sun Feb 27, 2022 5:08 pm
  • Real Name: Kris McCormic

Re: Encoded black bar auto-detection?

PostWed Mar 06, 2024 2:11 am

Andy Mees wrote:Panos already posted info on an avenue you can pursue within Resolve:
https://forum.blackmagicdesign.com/viewtopic.php?f=21&t=197411#p1025278
Yes, but then Uli said that method would work only if the areas were true black, which they aren't; the black bars frequently are extremely light gray and have slight noise in them. This lead me to believe that Panos method would be fruitless.

Are there other automated methods or tools to consider?
Offline

panos_mts

  • Posts: 1158
  • Joined: Mon Oct 21, 2019 3:18 pm
  • Real Name: Panagiotis Vellios

Re: Encoded black bar auto-detection?

PostWed Mar 06, 2024 3:48 am

I can't answer for sure if the method I proposed is going to work with your situation.
Keep in mind that you can manipulate the image before feeding it to the probe modifier.

For example you can pass the image to a color corrector node to crush the blacks, followed by a blur node or some other filter to reduce the noise, then pass it to the probe modifier.
All these modifications will be used just to help the probe modifier and will be not visible in the final image.
Online
User avatar

Uli Plank

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

Re: Encoded black bar auto-detection?

PostWed Mar 06, 2024 5:48 am

You are right, with some image processing it can be adjusted, this can definitely be done.
I just wasn't sure how deep Kris wants to dive into Fusion ;-)

I don't know the amount of footage to treat, Kris might be done now with the help cut detection and manual grouping anyway. Finally, since those 4:3 scenes will be cropped massively, manual work will be needed anyway for good framing.
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

Sam Steti

  • Posts: 2504
  • Joined: Tue Jun 17, 2014 7:29 am
  • Location: France

Re: Encoded black bar auto-detection?

PostWed Mar 06, 2024 7:57 am

panos_mts wrote:IFor example you can pass the image to a color corrector node to crush the blacks, followed by a blur node or some other filter to reduce the noise, then pass it to the probe modifier.
All these modifications will be used just to help the probe modifier and will be not visible in the final image.

One option is to use a ChannelBooleans node with the right expression inside... I can't post it now but I can post later a ChannelBooleans made to fix the edges of a matte (put to 0 what's below 0,5 and to one what's above 0,5), easy to modify to reach this goal..
*MacMini M1 16 Go - Ext nvme SSDs on TB3 - 14 To HD in 2 x 4 disks USB3 towers
*Legacy MacPro 8core Xeons, 32 Go ram, 2 x gtx 980 ti, 3SSDs including RAID
*Resolve Studio everywhere, Fusion Studio too
*https://www.buymeacoffee.com/videorhin
Offline

Phadeguy

  • Posts: 33
  • Joined: Sun Feb 27, 2022 5:08 pm
  • Real Name: Kris McCormic

Re: Encoded black bar auto-detection?

PostFri Mar 15, 2024 12:00 pm

Hey Everyone,

Thank you for your replies. They are very helpful!

I am familiar with the "Edit" and "Deliver" tabs, but the others are mysterious to my n00b brain. Are there some good videos or tutorials that can help me accomplish my narrow needs quickly?

Thank you again for being awesome!!

Return to DaVinci Resolve

Who is online

Users browsing this forum: buraxgrn, Google [Bot] and 139 guests