Start uploading a video, pause the upload, you could already get the ID of the vid, render rest of the video and then continue the upload that now contains the ID of the video :D
Here's a guess: upload from a browser running on Linux, and create a FUSE filesystem that blocks read() calls until you've generated the video.
I tried it with a named pipe ("mknod /tmp/foo.mp4 p") and it gave me an error, but before the error, the web page blocked during upload, but it showed me the URL that will be used (before I gave it a single byte of data).