Difference between revisions of "Sei Media Formats"

imported>NelsonJenkins
imported>NelsonJenkins
(Disk Playback Profiles)
 
(11 intermediate revisions by the same user not shown)
Line 21: Line 21:
 
.SVE files are only ideal for distribution in situations where all of the following criteria apply:
 
.SVE files are only ideal for distribution in situations where all of the following criteria apply:
 
* Content is public-domain (e.g. you, nor anyone else, will care if the individual UUIDs and/or content itself are given away)
 
* Content is public-domain (e.g. you, nor anyone else, will care if the individual UUIDs and/or content itself are given away)
* Content is short (under 4 minutes, as longer content will exceed 1024 bytes, causing media loading problems in some cases)
+
* Content is short (under 4 minutes, as longer content will exceed 1024 bytes, causing media loading problems)
 +
** Note that the SVE format cannot be directly used on end-user players, as their TextBox input is limited to 250 bytes
 
* Tag data is short (under 100 characters total)
 
* Tag data is short (under 100 characters total)
 
* The file needs to be played if the NTBI Group Media Database is down (not planned, but if you're paranoid or during rare service interruptions)
 
* The file needs to be played if the NTBI Group Media Database is down (not planned, but if you're paranoid or during rare service interruptions)
Line 34: Line 35:
 
   1    2
 
   1    2
 
* 1 = Filetype header (SVE)
 
* 1 = Filetype header (SVE)
* 2 = A 20-character reference to the .SVE database entry (case-sensitive random alphanumeric characters)
+
* 2 = A 4-character reference to the .SVE database entry (case-insensitive alphanumeric characters)
  
 
.SVL files are better for distribution in that they are:
 
.SVL files are better for distribution in that they are:
* Smaller - a single file would look like "SVL550e8400446655440000" and would fit within 32 bytes, the default file block size for the [[Mark I]], and easily transferable
+
* Smaller - a single file would look like "SVL1234" and would fit within 8 bytes
 
* Private - none of the raw content is ever shown to the user (''however'', note that obviously UUIDs are still visible to users who know how to view playing sound UUIDs)
 
* Private - none of the raw content is ever shown to the user (''however'', note that obviously UUIDs are still visible to users who know how to view playing sound UUIDs)
 
* Secure - files can have passive DRM that limits their use to certain player/receiver owners
 
* Secure - files can have passive DRM that limits their use to certain player/receiver owners
Line 65: Line 66:
 
   1    2
 
   1    2
 
* 1 = Filetype header (SAE)
 
* 1 = Filetype header (SAE)
* 2 = A 20-character reference to the .SAE database entry (case-sensitive random alphanumeric characters)
+
* 2 = A 4-character reference to the .SAE database entry (case-insensitive alphanumeric characters)
  
 
.SAL files are better for distribution for basically the same reasons as .SVL files.
 
.SAL files are better for distribution for basically the same reasons as .SVL files.
Line 73: Line 74:
  
 
File format:
 
File format:
  SVD02$[disktitle]$[linkkey][tracktitle]&[linkkey][tracktitle]
+
  SVD0[linkkey][linkkey][...]
   1 23      4          5
+
   1 2    3
 
* 1 = Filetype header (SVD)
 
* 1 = Filetype header (SVD)
 
* 2 = Playback profile (see Disk Playback Profiles)
 
* 2 = Playback profile (see Disk Playback Profiles)
* 3 = Link packet count
+
* 3 = Series of .SVL [linkkey]s, up to 40
* 4 = Disk title (shown during track selection)
 
* 5 = Series of link packets (a .SVL [linkkey] followed by the track title) separated by &
 
  
 
==Sei Audio Disk (.SAD)==
 
==Sei Audio Disk (.SAD)==
Line 85: Line 84:
  
 
File format:
 
File format:
  SAD02$[disktitle]$[linkkey][tracktitle]&[linkkey][tracktitle]
+
  SAD0[linkkey][linkkey][...]
   1 23      4          5
+
   1 2    3
 
* 1 = Filetype header (SAD)
 
* 1 = Filetype header (SAD)
 
* 2 = Playback profile (see Disk Playback Profiles)
 
* 2 = Playback profile (see Disk Playback Profiles)
* 3 = Link packet count
+
* 3 = Series of .SAL [linkkey]s, up to 40
* 4 = Disk title (shown during track selection)
 
* 5 = Series of link packets (a .SAL [linkkey] followed by the track title) separated by &
 
  
 
==Database Response Formats==
 
==Database Response Formats==
Line 116: Line 113:
 
** When disk is finished, return to track selection menu (cannot return to first track)
 
** When disk is finished, return to track selection menu (cannot return to first track)
 
However, note that these profiles can be overridden (for example, a simple .SAD player may only support profile 0).
 
However, note that these profiles can be overridden (for example, a simple .SAD player may only support profile 0).
 
'''IF YOU HAVE SUGGESTIONS FOR OTHER PROFILES, LET NELSON JENKINS KNOW'''
 
  
 
==Tagging Format==
 
==Tagging Format==
Line 132: Line 127:
 
* G - Genre. This is chosen when the file is created and should not be edited manually.
 
* G - Genre. This is chosen when the file is created and should not be edited manually.
 
* N - 2-character ISO 639-1 language code.
 
* N - 2-character ISO 639-1 language code.
 +
* R - Remark (any other text).

Latest revision as of 14:26, 28 June 2014

The Sei Media Formats are read-only text files designed to store audio/video content for playback on SVE/SVL/SVD and SAE/SAL/SAD compatible players. There are four types of formats, as listed below.

There are two "embedded" file formats - one for combined audio/video, and one for audio only. These formats hold the raw UUIDs (compressed slightly for better space usage), tagging information (title, series, season, episode, artist, album, etc.), and some extra metadata for playback handling.

There are two "linked" file formats - these are basically tiny files that reference an embedded file on the NTBI Group Media Database. When a player is given a linked file, it downloads the embedded file in the background. This provides the capacity for larger files, better security, and DRM handling, without worrying about the file size (as it always remains the same).

There are also two "disk" formats, which can hold multiple linked files in one package. This is typically for CDs/DVDs, and players can handle the included files depending on how the disk is set up.

Sei Video Embedded (.SVE)

This format is designed for audio/video files with UUIDs and tag data directly embedded into the file. This is used primarily for short video clip distribution, although it is also the format used internally for NTBI Group Media Database storage.

File format:

SVE2$5.000000$[tagdata]$[strippedkeyA1][strippedkeyV1][strippedkeyA2][strippedkeyV2]
 1 2    3         4          5
  • 1 = Filetype header (SVE)
  • 2 = Data packet count
  • 3 = Final packet duration
  • 4 = Raw embedded tag data (see Tagging Format)
  • 5 = Compiled [strippedkey]s (UUIDs without dashes), alternating between audio and video (64 bytes per 10 second packet)

.SVE files are only ideal for distribution in situations where all of the following criteria apply:

  • Content is public-domain (e.g. you, nor anyone else, will care if the individual UUIDs and/or content itself are given away)
  • Content is short (under 4 minutes, as longer content will exceed 1024 bytes, causing media loading problems)
    • Note that the SVE format cannot be directly used on end-user players, as their TextBox input is limited to 250 bytes
  • Tag data is short (under 100 characters total)
  • The file needs to be played if the NTBI Group Media Database is down (not planned, but if you're paranoid or during rare service interruptions)
    • It should be noted that if the Media Database ever were to disappear, most media using this format (as well as BTN) would break anyway, so there is no real need to "outlive" the database

In all other cases, using the .SVL format is highly recommended.

Sei Video Linked (.SVL)

This format is designed for audio/video files indirectly hosted on the NTBI Group Media Database.

File format:

SVL[linkkey]
 1     2
  • 1 = Filetype header (SVE)
  • 2 = A 4-character reference to the .SVE database entry (case-insensitive alphanumeric characters)

.SVL files are better for distribution in that they are:

  • Smaller - a single file would look like "SVL1234" and would fit within 8 bytes
  • Private - none of the raw content is ever shown to the user (however, note that obviously UUIDs are still visible to users who know how to view playing sound UUIDs)
  • Secure - files can have passive DRM that limits their use to certain player/receiver owners
  • Indirectly loaded - content and tags can be longer because players have far lower restrictions due to the content being downloaded in the background
  • Deletable - if you don't want the file to be played anymore (or you uploaded something copyrighted), the file can be deleted and will not be able to play
  • Chainable - multiple files can be chained together in a .SVD file for sequential playback

Sei Audio Embedded (.SAE)

This format is designed for audio-only files with UUIDs and tag data directly embedded into the file. This is used primarily for short audio clip distribution, although it is also the format used internally for NTBI Group Media Database storage.

File format:

SAE2$5.000000$[tagdata]$[strippedkey1][strippedkey2]
 1 2    3         4          5
  • 1 = Filetype header (SAE)
  • 2 = Data packet count
  • 3 = Final packet duration
  • 4 = Raw embedded tag data (see Tagging Format)
  • 5 = Compiled [strippedkey]s (UUIDs without dashes)

.SAE files are only ideal for distribution in situations where .SVE files would be also ideal (see above).

Sei Audio Linked (.SAL)

This format is designed for audio-only files indirectly hosted on the NTBI Group Media Database.

File format:

SAL[linkkey]
 1     2
  • 1 = Filetype header (SAE)
  • 2 = A 4-character reference to the .SAE database entry (case-insensitive alphanumeric characters)

.SAL files are better for distribution for basically the same reasons as .SVL files.

Sei Video Disk (.SVD)

This format is designed to compile multiple .SVL files into a single "disk". When played, .SVD files can give the user the option to choose between the included .SVL files or play all, depending on the playback profile flag.

File format:

SVD0[linkkey][linkkey][...]
 1 2    3
  • 1 = Filetype header (SVD)
  • 2 = Playback profile (see Disk Playback Profiles)
  • 3 = Series of .SVL [linkkey]s, up to 40

Sei Audio Disk (.SAD)

This format is designed to compile multiple .SAL files into a single "disk". When played, .SAD files can give the user the option to choose between the included .SAL files or play all, depending on the playback profile flag.

File format:

SAD0[linkkey][linkkey][...]
 1 2    3
  • 1 = Filetype header (SAD)
  • 2 = Playback profile (see Disk Playback Profiles)
  • 3 = Series of .SAL [linkkey]s, up to 40

Database Response Formats

For successful lookups, the .SVE or .SAE file data is returned.

For failed lookups, the following codes are available:

  • NOTFOUND = .SVL or .SAL file is invalid/corrupted
  • DELETED[reason] = File was deleted because of [reason]
  • ERROR = The server isn't able to process the request for some reason

Disk Playback Profiles

For .SVD and .SAD formats, these are the playback profiles available:

  • 0 = CD-like, ideal for a music CD or other basic sequential loopable media
    • On load, first track is started
    • When track is finished, follow player option on whether to repeat track or move to next track (default is no repeat, so move to next track)
    • When disk is finished, follow player option on whether to return to first track or stop (default is no repeat, so stop)
    • Allow user to select track to move to a specific track at any time
  • 1 = DVD-like separate tracks, ideal for a package of separate videos
    • On load, open track selection menu
    • When track is finished, return to track selection menu (cannot play tracks sequentially)
  • 2 = DVD-like sequential tracks, ideal for a movie or other long video (note that loading tracks may be delayed in some players, so this may not be a smooth transition!)
    • On load, open track selection menu
    • When track is finished, move to next track
    • When disk is finished, return to track selection menu (cannot return to first track)

However, note that these profiles can be overridden (for example, a simple .SAD player may only support profile 0).

Tagging Format

All tags in the raw tag data should be compiled as follows:

[tagname][data]&[tagname][data]...

The following is a list of supported tags:

  • T - Title of the media. Required for all files.
  • C - Copyright/license type and data. Required for all files. Typically this is generated automatically, although it can be manually edited.
  • A - Artist(s)/creator(s) of the media. Generally required for audio files.
  • L - Album title. Recommended for audio files.
  • I - Series name (e.g. the name of a show).
  • S - Season number.
  • E - Episode number. This should start with 1 for each season.
  • G - Genre. This is chosen when the file is created and should not be edited manually.
  • N - 2-character ISO 639-1 language code.
  • R - Remark (any other text).