Nintendo Video: Difference between revisions

DaniElectra (talk | contribs)
m SD storage: Add video length
DaniElectra (talk | contribs)
m Metadata: The metadata length is fixed
 
(5 intermediate revisions by the same user not shown)
Line 115: Line 115:


== SD storage ==
== 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 [[SpotPass#Payload Content Header|payload header]]. 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.
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]].


Except for the Title ID, all the values are stored as little-endian.
While the SpotPass payload uses little-endian, the extra header added to the Extdata is stored in big-endian.
Structure of this SD data:
{| class="wikitable"
{| class="wikitable"
|-
|-
Line 127: Line 126:
| 0x0
| 0x0
| 0x4
| 0x4
| Title ID address of Nintendo Video? (usually 0x18, 0x0 if none)
| Unknown, value is 0x18
|-
| 0x4
| 0x14
| ?
|-
| 0x18
| 0x8
| TitleID of Nintendo Video
|-
| 0x20
| 0x8
| ?
|-
| 0x28
| 0x4
| File size
|-
| 0x2C
| 0x4
| ?
|-
| 0x30
| 0x4
| Release date (integer, YYYYmmddhh)
|-
| 0x34
|
| SpotPass payload
|}
 
== 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.
 
Region info is stored in the decrypted SpotPass crypto layer, see above SD section.
 
The following entries use little-endian.
 
=== Header ===
{| class="wikitable"
|-
! Offset
! Length
! Notes
|-
| 0x0
| 0x4
| Start address of header? (0x0)
|-
|-
| 0x4
| 0x4
| 0x4
| 0x4
| Start address of unknown extra data? (0x2C)
| End address of header
|-
|-
| 0x8
| 0x8
| 0x4
| 0x4
| End address of unknown extra data? (same as 0x4 if none)
| Start address of metadata and video
|-
|-
| 0xC
| 0xC
| 0x4
| 0x4
| Start address of video thumbnail
| End address of metadata and video
|-
|-
| 0x10
| 0x10
Line 150: Line 196:
|-
|-
| 0x18
| 0x18
| 0x14
|  
| [[#Interactive links header|Interactive links header]]
| [[#Interactive links header|Interactive links header]]
|-
|-
| 0x2C
|  
| 0x4 or 0x2C
|
| Unknown (Length 0x2C if extra data exists, 0x4 if not)
| [[#Metadata|Metadata]]
|}
 
=== Metadata ===
{| class="wikitable"
|-
! Offset
! Length
! Notes
|-
| 0x0
| 0x4
| Metadata length (0x248)
|-
|-
| 0x30 or 0x58
| 0x4
| 0x20
| 0x20
| Video ID (M<shortvidtitle>video ID)
| Video ID (M<shortvidtitle>video ID)
|-
|-
| 0x50 or 0x68
| 0x24
| 0x10 or 0x20?
| 0x8
| ?
| [[#Timestamp|Release date]]
|-
| 0x2C
| 0x8
| [[#Timestamp|Expire date]]
|-
|-
| 0x60 or 0x88
| 0x34
| 0x78
| 0x78
| UTF-16 video title
| UTF-16 video title
|-
|-
| 0xD8 or 0x100
| 0xAC
| 0x8
| 0x8
| ?
| ?
|-
|-
| 0xE0 or 0x108
| 0xB4
| 0x4
| 0x4
| Video length
| Video length
|-
|-
| 0xE4 or 0x10C
| 0xB8
| 0x190
| 0x190
| UTF-16 video description
| UTF-16 video description
|-
|-
| 0x274 or 0x29C
| 0x248
| 0x20 * number of links
| 0x20 * number of links
| Interactive link IDs (I<shortvidtitle>video ID)
| Interactive link IDs (I<shortvidtitle>video ID)
Line 196: Line 258:
| Interactive links data size
| Interactive links data size
| [[#Interactive links data|Interactive links data]]
| [[#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?
|}
|}


Line 232: Line 332:
| 0x0
| 0x0
| 0x4
| 0x4
| Metadata length
| Metadata length (0x16C)
|-
|-
| 0x4
| 0x4
Line 251: Line 351:
|-
|-
| 0x140
| 0x140
|  
| 0x28
| UTF-16 button link text
| UTF-16 button link text
|-
|-
|  
| 0x168
| 0x4
| 0x4
| Thumbnail length
| Thumbnail length
Line 262: Line 362:
| Thumbnail image
| Thumbnail image
|}
|}
== 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. See the above SD storage section for info on the cleartext payload.
Region info is stored in the decrypted SpotPass crypto layer, see above SD section.


== Server spoofing ==  
== Server spoofing ==