by gregsadetsky · 5y ago · 0 comments
In https://thechoiceisyours.whatisthematrix.com/_nuxt/commons/a...
The client side generates an unobfuscated string such as:
red-a-b1-c1435-d-e2-f-g3-h2-i
where 1435 is the current local time (search for `key: "teaserSrcProps"` in the code to find the relevant function)
Then "17" is prepended to that string ("BOND_OBFUSCATION_SALT" in the source code), and then the video file name is simply the MD5 of the string.
To find the video URL:
// change 1435 for any HHMM time
timeStr = "red-a-b1-c1435-d-e2-f-g3-h2-i"
videoFile = MD5("17" + timeStr) + ".mp4"
url = "https://thechoiceisyours.whatisthematrix.com/generated/v7/high/" + videoFile
:-)---
All 1440 red pill video URLs (tested all of them in bulk without downloading any using `wget --spider -i allurls.txt` — spider is a cool option!):
https://gist.github.com/gregsadetsky/cb4754d123f0ea1eae26820...
Then the "generated" folder made me think, and i decided to test it a bit more, so i started the experience at 15:00 and 35 seconds, just the right amount to get to the time reveal just after the clock change, and i was blown away, the video shows 15:01 and not 15:00 as i expected, whatever they are doing here to replace the video at the exact time without us noticing it is quite crazy.
For a user who’s clock changes midplay, you would simply check the time with seconds before choosing the video to render, if it’s MM:35 or after you would play the MM+1 video instead of MM
So yes you’re right, they do take that (minute changes while watching the video) into account!
There's "only" 1440 combinations and the site is going to get a lot more views than that so why bother re-rendering everything dynamically?
But while conceptually easy to do this, I've never seen other streaming servers do this, certainly not open source ones. And of course the most obvious, simplest way is to just pre-render a bunch of static files and serve using a dumb HTTP server.
https://gist.github.com/EriksRemess/62f946bda713da80c7905d1c...
I didn’t go into that but I should have mentioned it. There are also multiple resolutions for the videos…! It’s truly 1440 videos times all of the options…!
Have you have been able to decode what the b, e, g and h options mean?
Math.floor(Math.random() * 3) + 1
edit: b, e, g, h are different segments included. So all unique segments are in these videos:
blue-a-b1-c0000-d-e1-f-g1-h1-i 1f3dbdfd6a7c3d574b6b9eb8d07a3567.mp4
blue-a-b2-c0000-d-e2-f-g2-h2-i 241eb47071c89d8f18b0948763d6389a.mp4
blue-a-b3-c0000-d-e3-f-g3-h3-i 498ec3ba6719291e77b2a8870c744bdf.mp4
red-a-b1-c0000-d-e1-f-g1-h1-i ea2222b8b7a5c72396f76d65cf56890a.mp4
red-a-b2-c0000-d-e2-f-g2-h2-i bac726340f5486d9e02942c243e5b56b.mp4
red-a-b3-c0000-d-e3-f-g3-h3-i ce1aef26388b49562eab495b597e8fbc.mp4
So 1440 per-minute videos * 2 pill colors (red/blue) * 3^4 segments (1..3 values for each b, e, g, h argument) * 2 video qualities (high/low)!
https://news.ycombinator.com/item?id=28448361
Having looked at it a bit more, I only see "low" and "high" mentioned as qualities. You can replace "high" with "low" in the list of URLs I included (see my gist, posted above) and they seem to work e.g.,
https://thechoiceisyours.whatisthematrix.com/generated/v7/lo...
There is an intriguing list in the source code though:
["4000k", "5000k", "6000k", "7000k", "8000k", "9000k", "12000k", "15000k"]
which ... could be a list of (pretty extreme) resolutions? Or are these color temperatures?h = ["high", "low"]
Original video file name: blue-a-b1-c1234-d-e1-f-g1-h1-i
which is this url: https://thechoiceisyours.whatisthematrix.com/generated/v7/hi...
Another video file name: blue-a-b3-c0555-d-e3-f-g3-h3-i
which is this url: https://thechoiceisyours.whatisthematrix.com/generated/v7/hi...
Notice the differences due to the b, e, g and h values:
- at 0:13 the video is different
- at 0:18 the video is different
- at 0:23 the displayed time is different (12:34 versus 5:55)
- at 0:35 the video is different
- at 0:39 the video is different
- at 0:42 the video is different
---
This is also really helpful to see all of the clips :-)
https://www.youtube.com/watch?v=MeRmoU7VxIA
Found on https://www.reddit.com/r/matrix/comments/pjww65/whatismatrix...
Are you saying that the video files should have been cached, or..?
Thanks
https://gist.github.com/gregsadetsky/cb4754d123f0ea1eae26820...
May have be generated dynamically on the fly (probably programmatically editing / splicing the vids), but the developers, knowing that some people were going save the URLs, cache what's generated for a time so you can access it again without the expense of regen (also splicing in the different clips).
I'm just speculating though. It's part of what makes this promo really cool.
I'd love to see a breakdown. As promo sites go, it's very smart.
I don’t think that we have definitive proof that the video files are not being generated every time, but most evidence points to that. (There might be some metadata in the mp4 that could help resolve this more definitely)
Considering the complexity of doing on the fly video splicing (even if the results are cached) vs the ability for big studios like WB to do the splicing offline in a controlled environment that they’re used to, it’s probably safe-ish to assume everything was generated in advance.
It also definitely helps with QA - you can be more sure that the splicing worked if you can test some/any/all files before serving them via CloudFront vs relying on a complex-enough piece of tech.
A breakdown of the tech behind this from WB would be interesting to read for sure!
Cheers