Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Command line tools for HLS to MPEG DASH repackaging

Project Description

Description

This is an open source video streaming packager and toolkit to rewrap live HLS streams to live MPEG DASH streams.

Features

  • Generate single period MPEG DASH for live based on an HLS live stream
  • Generate multi period MPEG DASH for live based on an HLS live stream with SCTE35 splicing
  • Rewrap MPEG2 TS segment to fragmented MP4

Usage

Install

Installation from Python package index:

pip install hls2dash

Installation from source:

python setup.py install

Running

Generate Single period MPEG DASH:

hls-to-dash http://example.com/master.m3u8 > stream.mpd

Generate Multi period MPEG DASH:

hls-to-dash http://example.com/master.m3u8 --multi > stream.mpd

Rewrap MPEG2 TS segment to fragmented MP4

ts-to-fmp4 master2500_19274.ts 2500_19274.dash

or when TS segment is on a remote server

ts-to-fmp4 http://example.com/master2500_19274.ts 2500_19274.dash

Help

hls-to-dash

usage: hls-to-dash [-h] [--multi] [--ctx CTX] [--ctxdir CTXDIR] [--debug]
                   PLAYLIST

Generate single and multi period MPEG DASH manifest from a live HLS source.
Writes MPEG DASH manifest to stdout.

Currently assumes that HLS variant is named as 'master[PROFILE].m3u8'
  master2500.m3u8, master1500.m3u8
and that the segments are named as 'master[PROFILE]_[SEGNO].ts'
  master2500_34202.ts, master1500_34202.ts

positional arguments:
  PLAYLIST         Path to HLS playlist file. Can be a URI or local file.

optional arguments:
  -h, --help       show this help message and exit
  --multi          Generate multi period MPEG DASH on EXT-X-CUE markers in HLS
  --ctx CTX        Name of DASH session file
  --ctxdir CTXDIR  Where to store DASH session file. Defaults to /tmp/
  --debug          Write debug info to stderr

ts-to-fmp4

usage: ts-to-fmp4 [-h] [--outdir OUTDIR] [--debug] TSFILE OUTPUT

Rewrap a MPEG2 TS segment to a fragmented MP4

positional arguments:
  TSFILE           Path to TS file. Can be a URI or local file.
  OUTPUT           Output file name

optional arguments:
  -h, --help       show this help message and exit
  --outdir OUTDIR  Directory where the fragmented MP4 will be stored. Default is current directory
  --debug          Write debug info to stderr
Release History

Release History

This version
History Node

0.2.1

History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
hls2dash-0.2.1-py2-none-any.whl (15.6 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Aug 15, 2016
hls2dash-0.2.1.tar.gz (9.8 kB) Copy SHA256 Checksum SHA256 Source Aug 15, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting