Not to get too awful off topic, but you can do that and it doesn’t work good.
There are two problems with what you’re suggesting being fast: the first is that there are elements of motion or color change in the video that you don’t wanna trigger on, like the shadows of leaves blowing in the wind or the colors slowly getting orange because the sun is setting and afaik there’s not a good method to figure out if the change in bitrate you’re catching is because an imperceptible swarm of gnats moved under a street lamp and caused the sidewalk underneath to move exactly one bit down the chroma scale or because a man in a trenchcoat stepped out from behind the pole that lamp is mounted on. The second is that the video is already compressed so you gotta uncompress it to figure out what is on the frame to then figure out if the change from that frame to the next is enough to call “motion” and start flagging.
It’s one of the reasons why you super want to be working with raw or minimally compressed video when you’re editing something because simple things are much harder from a computation perspective.
E: the script to use ffmpeg another person posted checks every few seconds so it doesn’t actually crunch through all the frames, so sort and path finding techniques like that can be used to make it faster.