Many people believe that this is not possible to do in MTA, but in fact this is very possible. I believe the frames could be exported to image formats such as JPG, PNG, BMP, etc, then the images could be converted into a video format (mp4 for instance) by using some web API and then it's done.
However, there are a couple of problems with this:
1) Process of rendering frames to images, and images to a video format will be pretty slow, and the longer the replay is, the longer it will take to complete the process.
2) Quality of video - Since most probably the HD version of the video would be too much in size, it would be compressed by API to save space
3) API Limits(?)
Making this idea into reality would for sure be a challenge, and it might work and it might not, I don't know for certain, but at least I have an idea how to do it. I'll try making this by myself as a challenge when I get the time to do so to see if it would work and how much performance it would take in process, but I can't promise anything, nor can I promise even if I manage to do this that it'll be in server.