## SAMI (CC) Parser

The SAMI Closed-Caption Parser filter parses closed captioning information from SAMI-formatted files. Also see Lyric Parser.

The SAMI (Synchronized Accessible Media Interchange) interchange format is based on SGML/HTML. Every SAMI document should start with a <SAMI> tag and end with a </SAMI>tag. The document's class name is "Synchronized Accessible Media Interchange" and its file extension is .smi or .sami. At its most basic level, SAMI can be used as an intermediate interchange format for encoding closed captions in the Line-21 for NTSC, MPEG for DVDs, and IFE-ITV formats, and other similar formats.

The following is a sample SAMI document:

    <SAMI>
    <HEAD>
    	<Title>President John F. Kennedy Speech</Title>
    	<SAMIParam><!--
    		Copyright="(C)Copyright 1997, Microsoft Corporation"
    		Media="JF Kennedy.wav", none
    		Length=73000
    		CaptionMetrics=scaleable
    		CaptionLineLength=180
    		CaptionFontSize=12
    		CaptionTextLines=3-->
          </SAMIParam>

    	<STYLE TYPE="text/css"><!--
    		P {margin-left: 29pt; margin-right: 29pt; font-size: 12pt;
    		text-align: left; font-family: tahoma, arial, sans-serif;
    		font-weight: normal; color: white; background-color: black;}

    		TABLE {Width: "248pt" ;}

    		.ENUSCC {Name: "English Captions"; lang: en-US-CC;}

    		#Source {margin-bottom: -15pt; background-color: silver;
    			color: black; vertical-align: normal; font-size: 12pt;
    			font-family: tahoma, arial, sans-serif;
    			font-weight: normal;}

    		#Youth {color: greenyellow; font-size: 18pt;}

    		#BigPrint-1 {color: yellow; font-size: 24pt;}-->
    	</STYLE>
    </HEAD>

    <BODY><TABLE>

    	<SYNC Start=0>
    		<P Class=ENUSCC ID=Source>Pres. John F. Kennedy
    	<SYNC Start=10>
    		<P Class=ENUSCC>Let the word go forth,
    			from this time and place to friend and foe
    			alike that the torch
    	<SYNC Start=8800>
    		<P Class=ENUSCC>has been passed to a new generations of Americans,
    			born in this century, tempered by war,
    	<SYNC Start=19500>
    		<P Class=ENUSCC>disciplined by a hard and bitter peace,
    			proud of our ancient heritage, and unwilling to witness
    	<SYNC Start=28000>
    		<P Class=ENUSCC>or permit the slow undoing of those human rights
    			 to which this nation has always
    	<SYNC Start=38000>
    		<P Class=ENUSCC>been committed and to which we are
    			committed today at home and around the world.
    	<SYNC Start=46000>
    		<P Class=ENUSCC>Let every nation know,
    			whether it wishes us well or ill,
    			that we shall pay any price, bare any burden,
    	<SYNC Start=61000>
    		<P Class=ENUSCC>meet any hardship, support any friend,
    			oppose any foe, to ensure the survival and
    			success of liberty.
    	<SYNC Start=73000>
    		<P Class=ENUSCC ID=Source>End of:
    		<P Class=ENUSCC>President John F. Kennedy Speech
    </TABLE></BODY>
    </SAMI>

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.