Skip to content

Conversation

@birme
Copy link
Contributor

@birme birme commented Jul 16, 2016

Created a Python script for ingest of live HLS and remux to fragmented MP4 and associated MPEG DASH live manifest. In addition to Bento4 applications this script has a dependency to ffmpeg and the python libs (pycurl, ffprobe and m3u8)

usage: hls-dash.py [-h] [--remux] [--remux-output <ouput_dir>] [--verbose]
                   [--debug] [--tmpdir <tmp_dir>] [--exec-dir <exec_dir>]
                   [--ffmpeg_exec-dir <exec_dir>]
                   PLAYLIST

Generate an MPEG DASH manifest from a live HLS source including the option to
download and rewrap TS segments to MP4 fragments. Writes MPEG DASH manifest to
stdout

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
  --remux               download and remux TS segments to MP4 fragments
  --remux-output <ouput_dir>
                        Where remuxed fragments and MPD will be stored
  --verbose             Be verbose
  --debug               Be extremely verbose
  --tmpdir <tmp_dir>    Where to store all temporary files
  --exec-dir <exec_dir>
                        Where Bento4 applications are found
  --ffmpeg_exec-dir <exec_dir>
                        Where ffmpeg is found

Example (no remux): 
   hls2mp4dash http://example.com/live/event/master.m3u8
Example (remux): 
   hls2mp4dash --remux --remux-output=/media/event --tmpdir=/media/tscache http://example.com/live/event/master.m3u8

Hope it can find its place in the Bento4 tool package

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant