Stream Packaging & Relay Services (SPRS)

Introduction

The SPRS Services supports the experimenter for the whole chain including content acquisition, packaging and streaming, adapted for the different terminals, and distributed to consumer applications. The consumer application or Players are expected to be provided by the experimenter. However, there is a generic player available at the project software repository in Flex technology as a reference, which should not limit the experimenters to Adobe technologies as the service support all major industry technologies.

Each experiment service will be described by the experiment, and manually configured. The configuration will setup the composed services and the integration with the ECC experiment support and metrics collection in such manner that the experiment service will be activated when an experiment session is activated.

The service is composed of several components, which work in a collaborative way to provide a set of services such as content acquisition, packaging and streaming of the content to different platforms. Furthermore, this component is able to synchronize data and metadata before distribution, which is scalable since it can connected to CDNs.

Functionality

Live streaming publishing
This service allows a producer to publish a live stream to the consumers.
Live recording
This service allows the published stream to be stored in order to provide a later VoD service.
Live metadata
This service allows a producer to publish a live stream but the published stream is fed to the component along with a synchronized metadata set that has to be provided separately by means on a XML file.
Video on-Demand
A consumer interacts with the service to retrieve previously stored media content.
Live streaming delivery
This is service is for playing live content with multiplatform support. Either a producer is publishing live media content or a stored playlist is used.
Adaptive live streaming
The service allows a producer to publish several renditions of the same live stream using different qualities so that users receive the rendition which fit best with its capabilities.
Live time-shifting
It allows the consumer to move backwards and forwards in the time line of a live event obviously until no further than the real time.

Use Cases

Stream Packaging & Relay Services was deployed at the first run for several experimental applications:

Live Synchro Swimming, Next Gen Digital Domes, CONFetti, REENACT and Carviren.

Encoding Requirements & Setup

Requirements

In order to publish live content to our platform you need the experimenter need to generate an encoded stream. which is able to push a RTMP stream, like Adobe Flash Media Live Encoder (FMLE). Additionally, the service could be setup to relay an existing RTSP or SHOUTcast stream.

The Live AV Transcoding Services (LAVTS) could be used to generate multiple renditions on different qualities, or to change the encoding quality of the live stream. If you do it locally, make sure you have enough upload bandwidth to upload all qualities at once.

Using Flash Media Live Encoder

  1. Make sure you have the most recent version (http://www.adobe.com/products/flash-media-encoder.html).

  2. Select the following Encoding Options:
    2.1. Video:
    • Device: Select your Camera/Capture device from the drop down menu.

    • Format: H.264

    • Frame Rate: 25 or 30 FPS

    • Input Size: Choose the desired capture resolution.
      • For 16:9 content, we recommend: 1280x720, 1024x576, 854x480, 640x360.
      • For 4:3 content, we recommend: 1024x768, 960x720, 800x600, 768x576, 640x480, 480x360.
    • Bit Rate: 300-5000 kbit/s depending on resolution.

    • Output size: Choose the desired streaming resolution. Best if equal to Input size.

    2.2. Audio:
    • Device: Select your external microphone to capture your voice
    • Format: MP3 (For HLS/HDS streaming you will need AAC using MainConcept’s AAC plug-in)
    • Channels: Mono/Stereo
    • Sample Rate: 44100 Hz
    • Bit Rate: 64-192 Kbps
    2.3. Stream to Flash Media Server:
    • FMS Url: Use the service URL provided.
    • Stream: Use the stream name(s) provided.
    • User: User the user provided.
    • Password: Use the password provided.
  3. Click on Start button.

Using other encoder

Set up your encoder with similar parameter as used on FLME. Make sure you set-up the following advanced properties:

  • Keyframe frecuency: 2 seconds
  • Pixel aspect ratio: Square
  • Frame types: Progressive Scan, 2 B-Frames, 1 Reference Frame
  • Entropy coding: CABAC

API

Live Recording

For using the Live Recording functionality, the service could be configured in two different ways:

  • Automatic recording: Every time a content is published is automatically recorded.

  • Manual recording: The following API is provided to start/stop the recording, or to split the recording in a different file:

    • To START: http://<recordingManagerURL>&streamname=<stream>&action=startRecording
    • To STOP: http://<recordingManagerURL>&streamname=<stream>&action=stopRecording
    • To SPLIT: http://<recordingManagerURL>&streamname=<stream>&action=splitRecordingNow
    In addition the following parameters are available when starting a recording:
    • option: {version | append | overwrite}
      • version: A new file version is created (default)
      • append: Append the recording to the last recording
      • overwrite: Delete the last recording and create it again.
    • outputFile: name of the output file.

    • format: 1 = FLV and 2 = MP4. Default value is 2.

    • segmentSize/segmentDuration: Maximum amount of data to store on a single file.

Live Metadata

For using the Live Metadata injesting functionality, an API is availble that should be called in the instant a data is wanted to be inserted.

  • http://<liveMetadataURL>&channel=<stream>&type=<type>&mess=<mess>

Where <type> should be a 4 characteres code (although any string is allowed) and <mess> the text which payload of the message. The parameter <channel> will be provided by the service owners.

Content playback

To play a MP4 encapsulated live content, the following URLs should be used depending on the protocol:

  • RTMP: rtmp://<streamingURL>/mp4:<stream>
  • RTSP: rtsp://<streamingURL>/<stream>
  • HDS: http://<streamingURL>/<stream>/manifest.f4m
  • HLS: http://<streamingURL>/<stream>/playlist.m3u8

To play a MP4 encapsulated On Demand content, the following URLs should be used depending on the protocol:

  • RTMP: rtmp://<streamingURL>/mp4:<filePath>
  • RTSP: rtsp://<streamingURL>/<filePath>
  • HDS: http://<streamingURL>/<filePath>/manifest.f4m
  • HLS: http://<streamingURL>/<filePath>/playlist.m3u8

For adaptative streaming, a specific stream name of file path will be provided which comprises all renditions. For secure streaming, the service could be setup to work over SSL using HTTPS/RTMPS. If time-shifting is enabled, the ”?DVR” parameter should be added to activate it.

Reference player

A reference player could be downloaded from here:

Atos Reference Player for SPRS

Contact & Support Information

Contact

Antonio Gómez Muriana
Media Lab, Atos
David Salama Osborne
Media Lab, Atos

Support

See Contact.

Licensing

Copyright (c) 2012-2014 Atos Spain, S.A.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub-license, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.