/mpeg-segmenter

MPEG-TS Segmenter for HTTP Live Streaming (iOS)

Primary LanguageRubyOtherNOASSERTION

mpeg-segmenter

Starting from a MPEG-TS file, it segments the stream and prepares the M3U8 in according to HTTP Live Streaming for iOS.

mpeg-segmenter allows you to generate a fully compliant HTTP Live Streaming video from a standard video file (AVI, MP4, MKV, etc.)

Synopsis

Apple recently defined a new standard for video streaming, currently as draft at IETF, called HTTP Live Streaming.

HTTP Live Streaming is the only protocol allowed for delivering video to iOS devices (i.e. iPhone, iPad and iPod). It is based on top the HTTP protocol and leverages on MPEG TS format defined in the MPEG part 1 specification (ISO 13818-1).

General procedure

Let's suppose we want to deliver a video for iOS devices and we have a file AVI, MP4, MKV or similar video clip. All we need to do is:

  1. Convert the video in TS format. I strongly suggest to use ffmpeg.
  2. Use mpeg-segmenter to prepare the TS segments and M3U8 files.
  3. Copy the output files (.ts and .m3u8 files) generated by mpeg-segmenter in your preferred web server and make them available for download.
  4. Open Safari from your iOS and open the web location of main M3U8 file.
  5. Watch your VIDEO!

A typical flow involves these different actors which act in the following way:

Installation

A 1.9.x Ruby platform is required.

gem install pkg/mpeg-segmenter-0.3.0.gem

After installation, you can decide to use `mpeg-segmenter' as Ruby library or use its command line interface composed by the following executables:

  • mpeg-segmenter. It segments a TS file in multiple files time aligned.

  • m3u8-playlist-generator. It generates the variant playlist (main m3u8 file).

Encoding

We strongly suggest to use last version of FFmpeg.

FFmpeg is a powerful encoder let you to generate .TS files from your preferred video format (.AVI, .MP4, etc.).

TBC

Usage

TBD

Known Limitations

TBD

License

Copyright (C) 2012 by Guido D'Albore. Licensed under the Apache License, Version 2.0