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.)
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).
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:
- Convert the video in TS format. I strongly suggest to use
ffmpeg
. - Use
mpeg-segmenter
to prepare the TS segments and M3U8 files. - Copy the output files (
.ts
and.m3u8
files) generated bympeg-segmenter
in your preferred web server and make them available for download. - Open Safari from your iOS and open the web location of main M3U8 file.
- Watch your VIDEO!
A typical flow involves these different actors which act in the following way:
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).
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
TBD
TBD
Copyright (C) 2012 by Guido D'Albore. Licensed under the Apache License, Version 2.0