Hi there, I'd like to help you out on your project.
It sounds like the simplest way to perform this specific task is to use a hashing algorithm to create the ID you're wanting, most likely using a combination of date/time and a random array of pixel location and/or RGB value from a snapshot of the video (this can be worked out later, just an idea) as input for the hash.
The only problem I see us possibly running into is serializing the video file onto a hard drive automatically. As far as I'm aware, the only way to save anything over HTML/JavaScript to a local disk is by notifying the user, who would have to decide where the file would download on their system. I do think it should be possible, depending on the browser, to set the website to be trusted and, therefore, automatically download, but you would still need to preset the destination per browser. We can discuss this further if you wish.
Besides that, I think we should be good. Though on a side note the two files you referenced, the html file and .js file, weren't actually attached to your proposal. And, unless I'm mistaken, it should be labeled as a JavaScript project, not PHP.
In any case, I hope to hear back from you soon.
Regards,
Nathaniel Griffin