Coder Social home page Coder Social logo

housemaister / hls-stream-creator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bentasker/hls-stream-creator

0.0 1.0 0.0 139 KB

Simple Bash Script to take a media file, segment it and create an M3U8 playlist for serving using HLS

License: BSD 3-Clause "New" or "Revised" License

hls-stream-creator's Introduction

HLS-Stream-Creator

Introduction

HLS-Stream-Creator is a simple BASH Script designed to take a media file, segment it and create an M3U8 playlist for serving using HLS. There are numerous tools out there which are far better suited to the task, and offer many more options. This project only exists because I was asked to look into HTTP Live Streaming in depth, so after reading the IETF Draft I figured I'd start with the basics by creating a script to encode arbitrary video into a VOD style HLS feed.

Usage

Usage is incredibly simple

./HLS-Stream-Creator.sh inputfile segmentlength(seconds)

So to split a video file called example.avi into segments of 10 seconds, we'd run

./HLS-Stream-Creator.sh example.avi 10

Output

As of version 1, the HLS resources will be output to the directory output. These will consist of video segments encoded in H.264 with MP3 audio (should be AAC really, but I'd compiled ffmpeg without) and an m3u8 file in the format

#EXTM3U
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXTINF:10, no desc
example_001.ts
#EXTINF:10, no desc
example_002.ts
#EXTINF:10, no desc
example_003.ts
#EXTINF:5, no desc
example_004.ts
#EXT-X-ENDLIST

Using a Specific FFMPEG binary

There may be occasions where you don't want to use the ffmpeg that appears in PATH. At the top of the script, the ffmpeg command is defined, so change this to suit your needs

FFMPEG='/path/to/different/ffmpeg'

License

HLS-Stream-Creator is licensed under the BSD 3 Clause License and is Copyright (C) 2013 Ben Tasker

hls-stream-creator's People

Contributors

bentasker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.