Accessing Media from Templates

You can access the transcoded versions of a video/audio clip from your JSP templates using JSTL as follows (in all the examples video-field-name is the name of the video field in your content type and audio-field-name is the name of the audio field in your content type and index is the index of the transcoded version you want).

Note that if a video's transcoded outputs include an HLS stream, then the number of transcoded versions will not match the number of presets in the selected preset group, since all HLS presets are merged and result in only one HLS stream. For further information about this, see Using HLS Video Presets.

  • To access the URI of a transcoded video:

  • To access the video's MIME type:


    HLS streams generated by Elastic Transcoder are given the MIME type application/x-mpegURL.

  • To access the video's height:

  • To access the video's width:

  • To access the video's duration:

  • To access the video's timeline information:

  • To access the video's key frames:


    If a poster frame is selected than the first key frame will be the poster frame.