Hacker News new | ask | show | jobs
by dylan604 1745 days ago
Just shooting from the hip, but streaming videos are all done as short 1-5 second chunks that are all listed in a playlist. They could have specific versions of the hour:minute with a specific playlist that includes the correct segment. When you click, the time is checked and the correct playlist is sent down the wire.

Edit: I opened up the dev tools, and did not see the typical HLS style segments. I saw several MP4 files intro/outro/etc. They could still have the segments ready to go, serve up the intro to buy time for the server to ```ffmpeg -i time.mp4 -c:v copy -c:a copy output.mp4``` type of thing before serving to you

2 comments

Not that many chunks, looks like the entire video is re-generated.

My browser fetched

https://thechoiceisyours.whatisthematrix.com/generated/v7/hi...

which is for 1:54.

I'd bet all the marbles that they're "JIT" rendering the full video upon request. Intro + hour chunk (12 options) + minute chunk (59 options, skipped if minute is 0?) + am-pm chunk (2 options) + Outro. If you open the page in two different browsers at the same time and chose the same pill color, the resulting video file URL is different; this suggests to me that they're not caching the compilation results for the next client.
I would have strong doubts that they are rendering them each time. I would put all my marbles that they have each one pre-rendered 1 time, and then paid Keanu to sit in a booth and count from 0 to 59
Here's mine from 12:57 to confirm your hypothesis.

https://thechoiceisyours.whatisthematrix.com/generated/v7/hi...