SAMI
Encyclopedia
SAMI is a Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

 accessibility initiative released in 1998. The structured markup language is designed to simplify creating captions for media playback on a PC, i.e. not for broadcast purposes.

SAMI documents are text, and can be written in any text editor, although there are special utilities available to create SAMI documents. They use .smi or .sami file extensions. The common use of .smi for SAMI files creates a file extension collision with SMIL
Synchronized Multimedia Integration Language
SMIL , the Synchronized Multimedia Integration Language, is a W3C recommended XML markup language for describing multimedia presentations. It defines markup for timing, layout, animations, visual transitions, and media embedding, among other things...

 files.

Each SAMI document may contain more than one language.

Provides Closed Caption Information

A SAMI file provides closed caption support for a variety of multimedia formats. Generally, a multimedia file (such as a video or a sound file) can be played using a utility such as Windows Media Player. Closed captions can be provided for that media via a separate SAMI file.

How SAMI Works

The multimedia file and the SAMI file are synchronized by timing information that is included in the SAMI file. The format is simple. The SAMI file basically tells the player to display a certain closed caption at a particular time.

Basic Example

Here's an example SAMI file. It sets the time to milliseconds. It uses CSS for formatting for both the source and text lines and it supports language selection (English and faux-French shown). Each SYNC block sets the start time for the caption (start=). A new caption is displayed every second (1000ms). The Class= identifies the language. The ID=Source (matching the #Source in the CSS identifier definition) indicates the source/speaker line; the default is the closed caption. The identifier name need not be "Source"; it may be any name.

The Microsoft parser is fragile. Formatting information can be added to the closed caption information, but adding format information to the source line can have unpredictable results. Defining more than one ID can have unpredictable results.





SAMI Example


Media {cheap44.wav}
Metrics {time:ms;}
Spec {MSFT:1.0;}








<-- Open play menu, choose Captions and Subtiles, On if available -->
<-- Open tools menu, Security, Show local captions when present -->


The Speaker


SAMI 0000 text



French The Speaker


French SAMI 0000 text





SAMI 1000 text


French SAMI 1000 text





SAMI 2000 text


French SAMI 2000 text





SAMI 3000 text


French SAMI 3000 text







How SAMI links to a Multimedia File

The player needs to know how to link a particular media file to a SAMI file. Sometimes that is achieved by using the same filename as the underlying media file but using a .SMI file extension. For example, when Windows Media Player ("WMP") opens the sound file cheap44.wav, it checks to see if the file cheap44.smi exists in the same directory. If it does, WMP uses that file to display closed captions.

Alternatively, the linkage can be made explicit using an entry in an ASX
Advanced Stream Redirector
The Advanced Stream Redirector format is a type of XML metafile designed to store a list of Windows Media files to play during a multimedia presentation....

 file and opening the ASX file.



ASXHEAD This is the shows abstract
ASXHEAD The show title goes here
Author Name
(c) 2002 - company name



ASX This is the clips abstract
ASX The title for the clip goes here
ASX Your Name
ASX (c) 2000 - company name




Use of HTML Tags and CSS

SAMI format is similar to and borrowed from HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 and CSS
CSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...

, but SAMI only implements a subset of both. SAMI does not require strict tag matching.

The Microsoft SAMI parser used in Windows XP is a limited parser. Although CSS is supported, the parser may be confused by comment lines. Although several examples on the web show the use of several CSS ID tags, the MS SAMI parser only uses two ID tags -- and perhaps only one named ID and one default ID. The ID tags are used to distinguish the source (speaker) line from the ordinary CC text. Using explicit format tags in the speaker line confuses the parser. Some automated tools may avoid the problem by using explicit text formatting rather than relying on CSS.

The following HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 tags are valid in SAMI:
Name Description
B Bold text style
BASEFONT Base font size
BDO I18N BiDi override
BIG Large text style
BLOCKQUOTE Long quotation
BR Forced line break
CAPTION Table caption
CENTER Shorthand for DIV align=center
COL Table column
COLGROUP Table column group
DD Definition description
DIV Generic language/style container
DL Definition list
DT Definition term
FONT Local change to font
H1 Heading
H2 Heading
H3 Heading
H4 Heading
H5 Heading
H6 Heading
HR Horizontal rule
I Italic text style
IMG Embedded image
LI List item
OL Ordered list
P Paragraph
PRE Preformatted text
Q Short inline quotation
S Strike-through text style
SMALL Small text style
SPAN Generic language/style container
STRIKE Strike-through text
SUB Subscript
SUP Superscript
TABLE N/A
TBODY Table body
TD Table data cell
TFOOT Table footer
TH Table header cell
THEAD Table header
TR Table row
TT Teletype or monospaced text style
U Underlined text style
UL Unordered list

Playback

The following is a list of software that can play SAMI along with multimedia contents:
  • Chameleo
    Chameleo
    Chameleo is a media platform with support for rich video playback. Chameleo is designed to make it easy to extend a media player with custom features through extensions and extensions points.-External links:* *...

  • GOM Player
    Gom player
    GOM Player is a 32-bit media player for Microsoft Windows, distributed by the Gretech Corporation of South Korea. It is alleged that Gretech distributes GOM Player in violation of copyright law....

  • K-Multimedia Player
    K-Multimedia Player
    K-Multimedia Player is a media player software for Microsoft Windows which can play a large number of formats including VCD, DVD, AVI, MKV, Ogg, OGM, 3GP, MPEG-1/2/4, WMV, RealMedia, FLV and QuickTime...

  • Media Player Classic Home Cinema
  • MPlayer
    MPlayer
    MPlayer is a free and open source media player. The program is available for all major operating systems, including Linux and other Unix-like systems, Microsoft Windows and Mac OS X. Versions for OS/2, Syllable, AmigaOS and MorphOS are also available. The Windows version works, with some minor...

  • Perian
    Perian
    Perian is an open source QuickTime component that enables Apple Inc.’s QuickTime to play several popular video formats not supported natively by QuickTime on Mac OS X...

  • Plex
  • VLC Media Player
    VLC media player
    VLC media player is a free and open source media player and multimedia framework written by the VideoLAN project.VLC is a portable multimedia player, encoder, and streamer supporting many audio and video codecs and file formats as well as DVDs, VCDs, and various streaming protocols. It is able to...

  • Windows Media Player
    Windows Media Player
    Windows Media Player is a media player and media library application developed by Microsoft that is used for playing audio, video and viewing images on personal computers running the Microsoft Windows operating system, as well as on Pocket PC and Windows Mobile-based devices...

  • XBMC
  • Xine
    Xine
    xine is a multimedia playback engine for Unix-like operating systems released under the GNU General Public License. xine is built around a shared library that supports different frontend player applications. Another important feature of xine is the ability to manually correct the synchronization...


Authoring

The following is a list of software that can author SAMI files:
Commercial

Freeware

See also

  • SMIL
    Synchronized Multimedia Integration Language
    SMIL , the Synchronized Multimedia Integration Language, is a W3C recommended XML markup language for describing multimedia presentations. It defines markup for timing, layout, animations, visual transitions, and media embedding, among other things...

  • Closed captioning
    Closed captioning
    Closed captioning is the process of displaying text on a television, video screen or other visual display to provide additional or interpretive information to individuals who wish to access it...

  • Subtitle (captioning)
    Subtitle (captioning)
    Subtitles are textual versions of the dialog in films and television programs, usually displayed at the bottom of the screen. They can either be a form of written translation of a dialog in a foreign language, or a written rendering of the dialog in the same language, with or without added...

  • Subtitle editor
    Subtitle editor
    A Subtitle editor is a type of software used to create and edit subtitles to be superimposed over, and synchronized with, video. Such editors usually provide video preview, easy entering/editing of text, start, and end times, and control over text formatting and positioning...


Further reading

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK