Media objects

From open-smil
Jump to: navigation, search

Multimedia files will be used as "object" in SMIL and they can be loaded from different source locations: the Internet (by using URL), local drives or mixed (use contents from the Internet and local drives in the same presentation).

Supported Media object types

Media object Description Supported media types Protocol
img Still Image JPEG
GIF
PNG
BMP
http
https
video Video clip AVC (h.264)
HEVC (h.265) 60 FPS
MPEG-4
SORENSON SPARK
MPEG-1
MPEG-2
VP8 (Google Webm)
VC-1
DIVX
http
https
audio Audio clip AAC
MP3
FLAC
VORBIS (OGG)
http
https
ref Generic media reference html
wgt (local html package)
RTSP video
camera or HDMI input
http
https
RTSP (video only)
camera://HDMI (HDMI or camera input only)

Still Image (img)

The dur attribute specifies duration of the still image during playback.

  • Image sample:
<img src="img/sceenshot.jpg" dur="30s"/>

Video (video)

A video played for its entire duration.

  • Video sample:
<video src="media/video.mp4"/>

RTSP IPTV Streaming

RTSP multi-cast streams containing H.264 video can also be specified in the following code:

  • Reference sample for remote RTSP video or audio play:
<ref src="rtsp://{ip}/{endpoint}"/>

Audio (audio)

Playing music in the background.

  • Audio sample:
<audio src="audio.mp3"/>

Sound Volume Control

For video and audio objects, you can specify the "soundLevel" attribute to control output audio volume.

  • Sound level control sample:
<video src="media/video.mp4" soundLevel="50%" />

HTML Page

A HTML page is represented by an URL to the HTML document.

  • Reference sample for remote web page:
<ref src="http://www.open-smil.org" dur="indefinite"/>

Video Input

  • Reference sample for local HDMI or camera input:
<ref src="camera://hdmi"/>

Widget (HTML Widget)

An HTML Widget is a zipped HTML file system tree containing at the top level start file which can refer to other files using relative URLs within the zipped tree. A widget is loaded into a player as a self-contained media file, and is cached in the player's storage for offline playback. It can be accessed using the following code:

<ref src="media/clock.wgt" region="regionA">

Simple SMIL sample

  • SMIL example for displaying a 1920x600 pixels image on 1920x1080 pixels screen:
<?xml version="1.0"?>
<smil xmlns="http://www.w3.org/ns/SMIL" version="3.0" baseProfile="Language">
  <body>
    <img src="pic2.jpg" dur="indefinite"/>
  </body>
</smil>


MediaObject small.jpg

Related