MoeFwacky / vhstools

A set of python scripts with various video tools, including editing, automatic scene detection and splitting, and posting random clips to social media platforms
GNU General Public License v3.0
5 stars 0 forks source link

Splitter - Feature Request - Add support for blue frame detection #8

Open dege13 opened 1 year ago

dege13 commented 1 year ago

Since many VCRs use a blue screen to hide static, it would be nice to be able to also detect blue screens as a second divider for scenes. Not all VCRs use the same color of blue, so either have a range or allow the user to specify the color in the config. However, I personally use four VCRs (of three different brands), so having a color range or multiple values would be ideal.

MoeFwacky commented 1 year ago

The changes that include audio detection for scene splitting may have inadvertently helped with this. Give it a test with the audio detection and see how it does. The test file i've been using has a lot of cuts to blue because of how the content was recorded, and it appeared to have hit on each of those since the rgb brightness level is below the threshold and it's relying on also detecting silence instead of a fade.

dege13 commented 1 year ago

One of my videos resulted in a bunch of scenes detected where it is all just 4 to 11 seconds of blue. Would adding blue as a secondary scene splitter help resolve this? image

f it helps, two blues I commonly see are: RGB 2-6-254 image RGB 72-47-194 image

MoeFwacky commented 1 year ago

I think what's happening here is that it's detecting both below the brightness threshold and loudness threshold. A possible solution could be to check if the color values are unchanged in the next frame (within a threshold) and if so, to hold off from ending the clip until it falls outside of the threshold. Can you estimate how wide the detected blue frames vary from each other?