任天堂视频

Revision as of 03:10, 29 March 2013 by T (talk | contribs) (translate 40%)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Nintendo Video 是一项允许美国/日本/欧洲的3DS用户下载各种任天堂提供的3D视频的服务。Nintendo Video 甚至能在应用自身不再运行时,使用 SpotPass下载视频。

Eurosport 是一项与 Nintendo Video 相似的,提供给欧洲用户的服务。

互联网接入

它会确认你的3DS所在的国家和地区。不同国家的3DS发起不同的URL请求,它是包含了区域代码(EU/USA/JP)的二级域名, 国家代码根据国家和语言确定。下表包含了已知的国家代码、二级域名与相应文件名。

国家 二级域名 文件名
EUR (Nintendo Video) pubeu-p ESP_MD
EUR (Eurosport) pubes-p EWP_MD
USA pubus-p ESE_MD
Japan pubjp-p ESJ_MD

查看国家代码: http://www.wiibrew.org/wiki/Country_Codes

已知语言代码:

语言 代码 区域
Japanese 0 Japan
English 1 EUR/USA
French 2 EUR/USA
German 3 EUR
Italian 4 EUR
Spanish 5 EUR/USA
Netherlands 8 EUR
Portuguese 9 EUR/USA
Russian 10 EUR

在下面所有的请求中,COUNTRYCODE应该用你的国家的代码代替,COUNTRYSUBDOMAIN/FILENAME也应据实更换。语言代码应该被替换为所需语言(现在所有可用的语言的大部分的内容是相同的,所以可以使用“1”)。

令人惊讶的是,Nintendo Video使用未加密的HTTP连接来传输视频。按下“连接检查”按钮,Nintendo Video发送一个HTTP请求给COUNTRYSUBDOMAIN.est.c.app.nintendowifi.net:

GET /1/COUNTRYCODE/LANGUAGECODE/CHECK HTTP/1.1

Host: COUNTRYSUBDOMAIN.est.c.app.nintendowifi.net

如你所见,没有发送console-specific数据。服务器的响应可能是 403 或者 404 错误代码。403 表示用户区域不匹配 COUNTRYCODECOUNTRYSUBDOMAIN (可能根据IP判断),而 404 表示一切OK.

如果一切正常,3DS进行下载视频。支持Nintendo Video 应用硬解码的似乎只有四个视频,因为它发起以下请求来确认查询到同一台服务器:

GET /1/COUNTRYCODE/LANGUAGECODE/FILENAME1 HTTP/1.1

Host: COUNTRYSUBDOMAIN.est.c.app.nintendowifi.net


GET /1/COUNTRYCODE/LANGUAGECODE/FILENAME2 HTTP/1.1

Host: COUNTRYSUBDOMAIN.est.c.app.nintendowifi.net


GET /1/COUNTRYCODE/LANGUAGECODE/FILENAME3 HTTP/1.1

Host: COUNTRYSUBDOMAIN.est.c.app.nintendowifi.net


GET /1/COUNTRYCODE/LANGUAGECODE/FILENAME4 HTTP/1.1

Host: COUNTRYSUBDOMAIN.est.c.app.nintendowifi.net

FILENAMEi seems to return 403 if user's region doesn't match, 404 if ith video doesn't exist and the video itself otherwise. As of 18th of July 2011, only 1st and 2nd videos are available from UK IP addresses.

For Japan region /1/1/0/ESJ_CNF must also present on a server in order to play video files.

These videos can easily be downloaded from any computer with IP address that matches country specified by COUNTRYCODE, COUNTRYSUBDOMAIN and LANGUAGECODE using wget without any special settings. Videos are region-locked.

SD storage

Downloaded videos are stored in the SD card Extdata, from the decrypted SpotPass content payload. Country info is presumably stored in this metadata, region-lock is handled by the BOSS module via the programID in the payload header. At the end of the video file is a JPEG, which contains the video thumbnail, and various metadata in the EXIF including the URL associated with the video. The text shown on the web browser button is also stored in the EXIF.

All of these fields are big-endian? Structure of the metadata:

Offset Length Notes
0x0 4 Unknown, value is 0x18
0x4 0x14 ?
0x18 8 TitleID of Nintendo Video
0x20 0x8 ?
0x28 0x4 Total filesize?
0x2c 0x2c Unknown, some countries' videos has two extra words added here?
0x58 0x20 ASCII Video ID? M<shortvidtitle>someid
0x68 0x20 ?
0x88 0x78 UTF-16 video title
0x100 0xc ?
0x10c 0x190 UTF-16 video description
0x29c 0x20 Another ASCII video ID? I<shortvidtitle>someid
0x2bc 0xd44 ?
0x1000 ? Video data?

File format

File format used for storing videos is not yet known either. Both videos that were available at 18th of July 2011 contained string "boss" in the first four bytes, which leads me to believe this is a "magic number" used to identify this type of file. This header and the crypto used for the payload following it, is the SpotPass content container format.(See the SpotPass page for info on the container format) See the above SD storage section for info on the cleartext payload.

The video codec used is unknown.(But going by the manual it should be Mobiclip in some form) Region info is stored in the decrypted SpotPass crypto layer, see above SD section.

Server spoofing

In case you want to try messing with Nintendo Video, here's a description of what I did:

  1. Set up a DNS server using bind9, which returned my IP as the IP for pubeu-p.est.c.app.nintendowifi.net (bind config).
    1. Don't forget to replace MY_IP in config with your IP address, but don't replace the IP of conntest.nintendowifi.net service
  2. Set up an HTTP server using nginx and put ESP_MD1, ESP_MD2 (which I have downloaded from Nintendo's servers earlier, see above) in my /var/www/1/110/1/ folder.
  3. Configured my 3DS to use my DNS server as both primary and secondary DNS server.
  4. ???
  5. PROFIT!

External links