MMaker

Programming · Video/Audio · YTPMV/音MAD

Re:Sample & otoDB


Kept you waiting, huh?

I’m very, very excited today to announce two initiatives in the YTPMV and 音MAD sphere. Two initiatives that uphold my personal beliefs on what YTPMV and 音MAD could be. Two initiatives that would not have been possible without those who have contributed to their creation, and those in the community who have shaped who I am up to this point.

Re:Sample and otoDB.

These projects have had quite a few hands involved in their coming to fruition, but on a personal note I want to give a huge thank you to lachrymal. They have been extremely instrumental in getting this project off the ground and have carried it in my times of absence. I frankly cannot thank them enough.

There won’t be much else dilly-dally from me here. Please go and read the respective announcement posts for more. And don’t forget to check out our first event: VIDEO JAM!

https://jam.resample.works/

https://resample.works/posts/an-invitation-to-explore/

https://otodb.net/post/2

Both projects, being a community growth effort, I believe we can only do so much, and the rest is up to whether or not the community will embrace it. Only time (and support) will tell!

I hope you will continue to share the joy of 音MAD and YTPMV, just as I have…!

Niconico geo-block & User-Agent spoofing


Back in late October 2024, Niconico put in place access restrictions to prevent any device-restricted videos (likely containing sensitive content) from being viewed outside of Japan. The full announcement can be read here.

However, in practice, because much of the Internet’s infrastructure is grounded in the US, this ended up breaking functionality even for users from Japan. One such example of this are Open Graph embeds.

Device-restricted video embeds have been broken on not only Twitter/X, but also Discord. Source

Because most social networking services proxy and cache their embeds via a web crawler, and most of these crawlers originate from an IP address located in the US, this causes embeds to break on almost every site. Niconico has no interest in fixing this, so I decided to look into creating a service to resolve this myself, much like other “embed fixer” projects that have popped up for Discord such as FxTwitter.

Just replace ‘.jp’ in a Niconico URL with ‘.gay’!

This service is available at https://www.nicovideo.gay/ — the root URL will redirect to my own site, but any other link, such as one to a video, will directly send you to Niconico’s site. Here’s an example: https://www.nicovideo.gay/watch/sm29250555

Currently, this service only fixes the thumbnail and nothing more. No new functionality is added, but I may consider it later. The goal for now was just to fix what previously worked.

The thumbnail fix was pretty simple: in the initial HTTP response of a Niconico video’s watch page, a JSON payload contained in a <meta> tag with the name server-response stores a bunch of data about the video, including the thumbnail URL. If you try to access a device-restricted video from a foreign IP, this data is absent. With a Japanese IP address, it is available.


Initially, I was under the assumption that true geo-blocking was implemented and I would in fact have to host this service in Japan and access Niconico with a IP address originating from Japan. It turns out, Niconico was extremely lazy implementing this. By simply spoofing the User-Agent header with a common web crawler, i.e. Googlebot/2.1, it completely bypasses the geo-block. This returns the JSON payload contained in the initial HTTP request.

What’s even more insane about this though… is this works in any standard web browser. No VPN is necessary. Niconico geo-blocking can be defeated entirely by simply setting your user agent to that of a common web crawler.

That server-response payload mentioned earlier? It doesn’t contain only the thumbnail — it contains everything. Right now, you can watch any device-resticted Niconico video directly from an IP address originating outside of Japan.

Who knows how long this will last. Or if Niconico even cares. But for now… go watch American Gay Wrestling 2 from America while you still can!