.smil

From LinuxReviews
Jump to navigationJump to search

.smil is a filetype with a tagget structure which apparently describes a media player layout.

Usage[edit | edit source]

The website marketplace.publicradio.org has "Listen to this story" links. You're supposed to be able to listen to their .. information.

But you click that link and you get a .ram file. This file contains nothing but a long link to a .smil file.

This ".smil" file contains a markup-langage without a header spec.

.smil is -- apparently -- a media player layout description.

Format[edit | edit source]

Example from marketplace.publicradio.org:

 <smil>
   <head>
     <layout>
       <root-layout width="320" height="100"/>
       <region id="content" fit="hidden" z-index="1"/>
       <region id="bugs" fit="hidden" z-index="2"/>
       <regPoint id="dead_center" left="50%" top="50%" regAlign="center" />
     </layout>
   </head>
   <body>
     <seq>
       <par>
         <img src="http://www.public...ismap=" region="content" regPoint="dead_center" dur="1s" fill="freeze" />
         <audio src="rtsp://archive...tplace_promo_200508.rm"/>
         <img src="http://www.publ...3bbb8fc" region="bugs"  regPoint="dead_center" dur="1s" fill="freeze" />
       </par>
       <par>
         <audio src="rtsp://ar...port/2007/01/23_mktmorn0550.rm?start=00:00:00:01.0" />
         <img src="http://www.publ...smap=" region="content"  regPoint="dead_center" dur="1s" fill="freeze" />
       </par>
     </seq>
   </body>
 </smil>

HOWTO play .smil files in GNU/Linux[edit | edit source]

  1. Wget the "Listen to this story" link (or similar) on the site with the media you want to hear.
  2. cat this file and you sometimes, as in this example, see a .smil file.
  3. grep audio filename.smil and you get a list off all the rtsp (or other) audio references in it.
  4. Open it. xine rtsp://archive...o_200508.rm or mplayer rtsp://archive...o_200508.rm

The .smil file used in this example has two file-links: "marketplace_promo_200508.rm" and "23_mktmorn0550.rm?start=00:00:00:01.0".

What ever application .smil is for much likely reads the .smil file, presents the <par></par> tags as sections of the "player" view generated and probably uses the <img> (as in xhtml) tags for images who represent the audio. It should be apparent that the URL ending with "23_mktmorn0550.rm?start=00:00:00:01.0" is the one you want to play, where is "marketplace_promo_200508.rm" is likely just some lame self-advertisement.