Tutorial: Media content formats

Media content formats

This tutorial describes the types of the content played back and their use.
Playback can be started by these functions: gSTB.Play, gSTB.PlaySolution and stbPlayer.play.
All these functions use solution option. It's the type of media content, which determines the content format, for example media container type and/or the method of broadcasting.
Some devices can determine and change codecs during a playback, for example, when audio tracks compressed by different codecs are present.

Available solutions

auto

Automatic detection of the type of content, container, codec by the given URL. Has the same effect as empty solution.
Correctly accepts the URLs beginning with rtp://, udp://, rtsp://.

rtp

Play the string in the format MPEG2TS.
If URL begins with rtp:// the RTP stream shall be played, if it begins with udp:// the UDP stream shall be played.
Set required codecs if additional information of stream is present, for example, H.264, AC-3 and so on.

rtsp

Play the content from RTSP-server.
Set required codecs if additional information on the stream is present, for example, H.264, AC-3 and so on.

rtpac3

Play the stream in the format MPEG2TS using decoders MPEG2 Video and AC-3 Audio.

rtsp_ac3

Play content from RTSP-server using decoders MPEG2 Video and AC-3 Audio.

mpegts

Play the file in the format MPEG2TS.
Set required codecs if additional information on the stream is present, for example H.264, AC-3 and so on.

mpegps

Play file in the format MPEG2 Program Stream.
Set required codecs if additional information on the stream is present, for example, AC-3 and so on.

file

Play file at the URL set with automatic determining content type, container and codec.

fm

Play audio from MPEG-TS of the (udp://, rtp://).

ffmpeg

Allows playing files in various formats: avi, mkv, mpg, mp4, mov, wmv, AC-3, mp3.

ffrt

Play MPEG-TS realtime stream via http://.

ffrt2

Play real-time stream (not only MPEG-TS) via http://, rtmp:// ...
For this solution looping is always enabled.

ffrt3

Play non real-time internet video such as YouTube video.

jpeg

Process given URL as a picture instead of as video content. Uses not only for JPG images.

Parameters

URL

There are different approaches to specify where the content is stored:

/path - Local address of the file in the root file system (for example /media/1.mp3).
rtp://addr:port - RTP-stream received from multicast or unicast address addr and the port port.
udp://addr:port - UDP-stream received from multicast or unicast address addr and the port port.
rtsp://addr:port/path - The content stored in the RTSP-server at the address addr and port port with the relative route path.

atrack/vtrack/strack

Optional parameters to set audio/video/subtitle tracks (PID-s for MPEG2TS) of the content to be played.

position

Optional parameter to set time in seconds, from which the content is to be played.

Examples

mpegps /media/1.mpg
Plays /media/1.mpg which is Mpeg2 Program Stream file.

mpegts /media/1.mpg
Plays /media/1.mpg which is Mpeg2 Transport Stream file.

mp4 /media/1.mp4
Plays the file /media/1.mp4 in the format MP4.

rtp 224.10.0.30:5004
Plays Mpeg2 in the format Transport Stream from the preset multicast address (224.10.0.30) and port (5004) using IGMP protocol for multicast broadcast.

auto /media/file1
An attempt to automatically determine the file format and play it.

rtpmpeg4 224.10.0.31:5004
Plays Mpeg4 in the format Transport Stream from the preset multicast address (224.10.0.31) and port (5004) with Mpeg2 Audio using IGMP protocol for multicast broadcast.

rtpmpeg4_aac 224.10.0.32:5004 atrack:930 vtrack:920
Plays Mpeg4 video in the format Transport Stream from the preset multicast address (224.10.0.32) and port (5004) with AAC audio using IGMP protocol for multicast broadcast.
In this situation the stream with PID=920 is automatically selected as the video track and the stream with PID=930 – as the audio track, irrespective of the presence of information on the tracks in the stream.

rtsp rtsp://192.168.1.32:554/video/media003.mpg
Plays the content /video/media003.mpg, located on RTSP-server with the address 192.168.1.32 and port 554.

jpeg /media/1.jpg
Displays the picture /media/1.jpg which is JPG image file.