Input UIDs and video UIDs are a bit hard to compare, as they serve much different purposes. An Input is reusable, so each time something publishes to it, it'll create a new video with associated UID for that particular session. So in that way, it's about what you are trying to keep track of.
I believe there is a timeout where if an input goes offline and back online within a certain amount of time (a few minutes IIRC), it will reuse the last video. Perhaps you're running into that behavior?