Nintendo Video: Difference between revisions

Duke srg (talk | contribs)
Eurosport information added
m Metadata: The metadata length is fixed
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
'''Nintendo Video''' is a service allowing owners of American, Japanese, and European 3DSes to download and watch various videos offered by Nintendo. Nintendo Video uses SpotPass to download videos even when the Nintendo Video app itself is not running.
'''Nintendo Video''' is a service allowing owners of American, Japanese, and European 3DS's to download and watch various videos offered by Nintendo. Nintendo Video uses SpotPass to download videos, even when the Nintendo Video app itself is not running. Nintendo Video was discontinued March 31, 2014.
 
'''Eurosport''' is a service similar to '''Nintendo Video''' and allowing owners of European 3DSes to download and watch various videos offered by Eurosport.  
'''Eurosport''' is a service similar to '''Nintendo Video''' and allowing owners of European 3DS's to download and watch various videos offered by Eurosport. Eurosport was discontinued December 31, 2012.


== Internet connection ==
== Internet connection ==


To identify your 3DS's region and country, different URLs are requested by 3DS's from different countries. A URL contains a subdomain that's specific for your region (EU/USA/JP), a country code that's specific to your country and a language code. Here's a table containing country codes and subdomains known so far and corresponding file names:
To identify your 3DS's region and country, different URLs are requested by 3DS's from different countries. A URL contains a subdomain that's specific for your region (EU/USA/JP), a country code that's specific to your country, and a language code. Here's a table containing country codes and subdomains known so far and their corresponding file names:


{| class="wikitable"
{| class="wikitable"
Line 78: Line 78:
In all requests below, ''COUNTRYCODE'' should be replaced with your country's code, ''COUNTRYSUBDOMAIN'' should be replaced with your region's subdomain. ''FILENAME'' are also depends on the region and should be replaced correspondingly. ''LANGUAGECODE'' should be replaced by a desired language (by now most of the content are the same for all available languages, so one can use "1" as a most common).
In all requests below, ''COUNTRYCODE'' should be replaced with your country's code, ''COUNTRYSUBDOMAIN'' should be replaced with your region's subdomain. ''FILENAME'' are also depends on the region and should be replaced correspondingly. ''LANGUAGECODE'' should be replaced by a desired language (by now most of the content are the same for all available languages, so one can use "1" as a most common).


Surprisingly, Nintendo Video uses plain unencrypted HTTP connection to transfer videos. When "Connectivity check" button is pressed, Nintendo Video sends a following HTTP request to ''COUNTRYSUBDOMAIN''.est.c.app.nintendowifi.net:
Surprisingly, Nintendo Video uses plain unencrypted HTTP connection to transfer videos. When "connectivity check" button is pressed, Nintendo Video sends a following HTTP request to ''COUNTRYSUBDOMAIN''.est.c.app.nintendowifi.net:


<tt>GET /1/''COUNTRYCODE''/''LANGUAGECODE''/CHECK HTTP/1.1
<tt>GET /1/''COUNTRYCODE''/''LANGUAGECODE''/CHECK HTTP/1.1
Line 108: Line 108:
Host: ''COUNTRYSUBDOMAIN''.est.c.app.nintendowifi.net</tt>
Host: ''COUNTRYSUBDOMAIN''.est.c.app.nintendowifi.net</tt>


''FILENAMEi'' seems to return 403 if user's region doesn't match, 404 if ''i''th 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.
''FILENAME'' seems to return a 403 error if the user's region doesn't match, 404 if the video doesn't exist and the video itself otherwise. As of July 18th, 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.
For Japan region /1/1/0/ESJ_CNF must also present on a server in order to play video files.
Line 115: Line 115:


== SD storage ==
== SD storage ==
After downloading videos, Nintendo Video stores them on the SD card. Videos with the decrypted SpotPass payload are stored in [[Extdata]]. [https://gist.github.com/bef27e4a60cdb472c359 Metadata] is stored in cleartext in the decrypted extdata - the actual video might be encrypted(unknown), there's no magic number/fourcc in the decrypted extdata for the video. Region/country info is presumably stored in this metadata.
Downloaded videos are stored in the SD card [[Extdata]], from the decrypted [[SpotPass]] content payload, adding an additional header to them. Country info is presumably stored in this metadata, region-lock is handled by the BOSS module via the programID in the [[SpotPass#Payload Content Header|payload header]].


Structure of the above metadata:(size is 0x1000-bytes)
While the SpotPass payload uses little-endian, the extra header added to the Extdata is stored in big-endian.
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 125: Line 125:
|-
|-
| 0x0
| 0x0
| 4
| 0x4
| Unknown, value is 0x18
| Unknown, value is 0x18
|-
|-
Line 133: Line 133:
|-
|-
| 0x18
| 0x18
| 8
| 0x8
| Big-endian titleID of Nintendo Video
| TitleID of Nintendo Video
|-
|-
| 0x20
| 0x20
| 0x38
| 0x8
| Unknown, some countries' videos has two extra words added here?
|-
| 0x58
| 0x20
| ASCII Video ID? M<shortvidtitle>someid
|-
| 0x68
| 0x20
| ?
| ?
|-
|-
| 0x88
| 0x28
| 0x78
| 0x4
| UCS-2 video title
| File size
|-
|-
| 0x100
| 0x2C
| 0xc
| 0x4
| ?
| ?
|-
|-
| 0x10c
| 0x30
| 0x190
| 0x4
| UCS-2 video description
| Release date (integer, YYYYmmddhh)
|-
| 0x29c
| 0x20
| Another ASCII video ID? I<shortvidtitle>someid
|-
|-
| 0x2bc
| 0x34
| 0xd44
|  
| ?
| SpotPass payload
|}
|}


== File format ==
== File format ==
The SpotPass content downloaded for Nintendo Video uses the [[SpotPass]] content container format, see the SpotPass page for info on the container format. At the end of the video file is a JPEG, which contains the video thumbnail, and various advertising metadata (interactive links) including the URL associated with the video. The text shown on the web browser button is also stored in the interactive links.


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 [http://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files "magic number"] used to identify this type of file. This header and the crypto used for the payload following it is presumably the [[SpotPass]] content encapsulation format.
Region info is stored in the decrypted SpotPass crypto layer, see above SD section.


The following entries use little-endian.
=== Header ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Offset
! Offset
! Length
! Length
!  
! Notes
|-
|-
| 0x0
| 0x0
| 0x4
| 0x4
| "boss"
| Start address of header? (0x0)
|-
|-
| 0x4
| 0x4
| 0x4
| 0x4
| Always 00 01 00 01
| End address of header
|-
|-
| 0x8
| 0x8
| 0x4
| 0x4
| Big-endian filesize
| Start address of metadata and video
|-
|-
| 0xC
| 0xC
| 0x4
| 0x4
| Always 00 00 00 00
| End address of metadata and video
|-
|-
| 0x10
| 0x10
| 0x4
| 0x4
| Release date (UNIX timestamp)
| Video thumbnail length
|-
|-
| 0x14
| 0x14
| 0x4
| Unknown (padding?)
|-
| 0x18
|
| [[#Interactive links header|Interactive links header]]
|-
|
|
| [[#Metadata|Metadata]]
|}
=== Metadata ===
{| class="wikitable"
|-
! Offset
! Length
! Notes
|-
| 0x0
| 0x4
| Metadata length (0x248)
|-
| 0x4
| 0x20
| Video ID (M<shortvidtitle>video ID)
|-
| 0x24
| 0x8
| [[#Timestamp|Release date]]
|-
| 0x2C
| 0x8
| [[#Timestamp|Expire date]]
|-
| 0x34
| 0x78
| UTF-16 video title
|-
| 0xAC
| 0x8
| ?
|-
| 0xB4
| 0x4
| Video length
|-
| 0xB8
| 0x190
| UTF-16 video description
|-
| 0x248
| 0x20 * number of links
| Interactive link IDs (I<shortvidtitle>video ID)
|-
|
| Video size
| Mobiclip .moflex video data (first word here is little-endian magic number 0xABAA324C)
|-
|
| Thumbnail size
| Video thumbnail
|-
|
| Interactive links data size
| [[#Interactive links data|Interactive links data]]
|}
=== Timestamp ===
The release and expire date are stored using a custom timestamp, where each value (year, month, day...) is stored as unique bytes.
{| class="wikitable"
|-
! Offset
! Length
! Notes
|-
| 0x0
| 0x2
| Year
|-
| 0x2
| 0x1
| Month
|-
| 0x3
| 0x1
| Day
|-
| 0x4
| 0x1
| Hours
|-
| 0x5
| 0x1
| Minutes
|-
| 0x6
| 0x1
| Seconds
|-
| 0x7
| 0x1
| Padding?
|}
=== Interactive links ===
Interactive links are structures that store the advertising and thumbnail data that is displayed to the user during the video playback.
==== Interactive links header ====
{| class="wikitable"
|-
! Offset
! Length
! Notes
|-
| 0x0
| 0x4
| Number of interactive links
|-
| 0x4
| 0x4
| Address of interactive link data
|-
| 0x8
| 0x8
| Always 00 01 00 00 00 02 00 02
|  
| Address of additional interactive links data
|}
|}


It appears that this file format is big-endian, unlike [[CXI]].
==== Interactive links data ====
Interactive links store a thumbnail image as a JPEG image.


Data following the header is encrypted, the CTR used is likely based on metadata in the header.(like the timestamp) Since [http://wiibrew.org/wiki/WiiConnect24/WC24_Content WC24] content was signed, it's likely SpotPass content is signed as well. The video codec used is unknown. Region info is stored the decrypted SpotPass crypto layer, see above SD section.
{| class="wikitable"
|-
! Offset
! Length
! Notes
|-
| 0x0
| 0x4
| Metadata length (0x16C)
|-
| 0x4
| 0x30
| Interactive link ID (I<shortvidtitle>video ID)
|-
| 0x34
| 0x8
| Unknown
|-
| 0x3C
| 0x100
| URL address of link. For eShop link, use (tiger://<TitleID>)
|-
| 0x13C
| 0x4
| Button link color (RGBA)
|-
| 0x140
| 0x28
| UTF-16 button link text
|-
| 0x168
| 0x4
| Thumbnail length
|-
|
| Thumbnail size
| Thumbnail image
|}


== Server spoofing ==  
== Server spoofing ==  
Line 218: Line 373:
# ???
# ???
# PROFIT!
# PROFIT!
This can be done with any DNS server and HTTP server, as long as you spoof everything correctly. It is possible on Windows. I have not tried Mac OS X.
Unfortunately, this currently has little use since Nintendo shut the services down. However, they can still be spoofed if you have everything still on your 3DS. Spoofing your own videos could be possible, but you can already watch videos with the web browser and something like Universal Media Server.


== External links ==
== External links ==
* [http://www.youtube.com/watch?v=Tl8QYofL1tg A video showing Nintendo Video server being spoofed]
* [http://www.youtube.com/watch?v=Tl8QYofL1tg A video showing Nintendo Video server being spoofed]