• Stars
    star
    604
  • Rank 74,189 (Top 2 %)
  • Language
    Ruby
  • Created over 15 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Segments live video streams based on the Apple HTTP Live Streaming protocol and pushes the resulting files to various locations.

iPhone HTTP Streaming Server

For a detailed overview see the http live video segmenter page.

DESCRIPTION

This project is an attempt to make it easier to set up a live streaming server using Apple's HTTP streaming protocol.

The project includes a ruby script and a C program that use FFMpeg to encode and segment an input video stream in the correct format for use with the HTTP streaming protocol.

FEATURES

  • Creates both single and variable bitrate outputs
  • Transfer encoded segments via copy, FTP, SCP or transfer to AWS S3
  • Sending the INT signal to the segmenter process will cause it to terminate gracefully

REQUIREMENTS

FFMpeg is the primary external requirement for the ruby script. The segmenter needs libavformat to compile and that can be obtained by installing FFMpeg. The script also needs the following gems installed if you want to be able to use SCP or S3 as transfer options:

INSTALL

You will need to compile the segmenter first. Assuming that you have all the needed libraries installed this is as easy as doing a make in the root directory.

You may copy the script and the segmenter binary to any location you want. You will need to let the script know where to find the segmenter binary in the configuration file.

CONFIGURATION

A quick overview of the configuration options:

  • temp_dir Where the script will put segments before they are transfered to their final destination
  • segment_prefix The prefix added to each stream segment
  • index_prefix The prefix added to the index
  • log_type The logging type to use. Options are: STDOUT, FILE
  • log_file If using the FILE logging type where to put the log file
  • log_level The level of logging to output. Options are: DEBUG, INFO, WARN, ERROR
  • input_location Where the origin video is coming from. This can be a file, a pipe, a device or any other media that is consumable by FFMpeg or the given source consumer. See the source_command option as well.
  • segment_length The video segment length in seconds
  • url_prefix This is the URL where the stream (ts) files will end up
  • index_segment_count How many segments to keep in the index
  • source_command The command used to push video the encoders
  • segmenter_binary The location of the segmenter
  • encoding_profile Specifies what encoding profile to use. It can be either a single entry, 'ep_128k', or an array, [ 'ep_128k', 'ep_386k', 'ep_512k' ], for multi-bitrate outputs.
  • transfer_profile The transfer profile to use after each segment is produced

Encoding profiles are given a name and have two options following that name:

  • ffmpeg_command The command to use for this encoding profile
  • bandwidth The amount of bandwidth required to transfer this encoding

Transfer profiles are given a name in the same way encoding profiles are and have various options following their name.

For S3 based transfers:

  • transfer_type Must be set to 's3'
  • bucket_name The S3 bucket to put the segments in
  • key_prefix A prefix to attach to the start of each segment stream0001
  • aws_api_key The AWS api key for S3
  • aws_api_secret The AWS api secret for S3

For FTP based transfers:

  • transfer_type Must be set to 'ftp'
  • remote_host The remote host to ftp the segments to
  • user_name The user to use to log into the ftp site
  • password The password to use to log into the ftp site
  • directory The directory to change to before starting the ftp upload

For SCP based transfers:

  • transfer_type Must be set to 'scp'
  • remote_host The host to scp to
  • user_name The user to use in the scp
  • password The password to use for scp. This is optional, if it isn't provided the scp will be done using a previously generated private key.
  • directory The directory to change to before uploading the segment

For copy based transfers:

  • transfer_type Must be set to 'copy'
  • directory The destination directory to copy the segment to

For Cloudfile based transfers:

  • transfer_type Must be set to 'cf'
  • username The username for Cloudfile
  • api_key The api key for Cloudfile
  • container The container to put the results in
  • key_prefix A prefix to attach to the start of each segment stream0001

LICENSE

Copyright (c) 2009-2013 Carson McDonald

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

More Repositories

1

WebP-iOS-example

Script to build libwebp for iOS + example of use
Objective-C
428
star
2

PushBackAnimation

Example animation for iOS that sends one view into the background as another view slides up
Objective-C
225
star
3

iOSVideoCameraMultiStitchExample

Example of recording then stitching together multiple video segments taken from the camera of an iOS device.
Objective-C
188
star
4

bluez-ibeacon

Complete example of using Bluez as an iBeacon
Objective-C
140
star
5

AP4J-Player

A Java based AirPlay player
JavaScript
102
star
6

bluez-experiments

Experimenting with Bluez
C
91
star
7

ios-ruby-embedded

Builds mruby into a XCode framework that can be used to embed ruby in your iOS app.
Ruby
79
star
8

esp32-aws-iot

ESP32 template for connecting to the AWS IoT platform
C
60
star
9

direct-browser-s3-upload-example

Direct Browser to S3 Upload Example
JavaScript
57
star
10

iap-validator

In app purchase receipt validator.
Ruby
38
star
11

MRubyiOSExample

Example of using MRuby embedded in iOS to call Objective C from Ruby and Ruby from Objective C
C
36
star
12

tmux-wifi-os-x

Utility script to display WIFI info in a tmux window
Shell
32
star
13

AVSExample-Swift

Alexa Voice Service example using Swift
Swift
31
star
14

Python-Flask-neo4j-Heroku-Example

Example of using Python, Flask and neo4j on Heroku
JavaScript
28
star
15

ServerSideResponsiveImageExample

An example of server side responsive images based on device detection.
Java
25
star
16

mruby-c-example

Simple example of mruby embedded in a C application
C
19
star
17

ExampleSphinxSearchWithFacets

An example of how to do faceted searching with Sphinx.
PHP
14
star
18

OSMMapKitExample

Example of using OpenStreetMap with iOS 7+ MapKit
Objective-C
11
star
19

Stack-Apps-Java-Library

A wrapper library for the sites supported by the stack apps api.
Java
11
star
20

HealthkitFBSync

Sync weight data from FitBit to Healthkit
Swift
10
star
21

python-ebird-wrapper

Simple wrapper for the EBird API
Python
9
star
22

TinyPNGForMac

A TinyPNG Mac app
Swift
7
star
23

itc-autoingest-gem

iTunes connect autoingest gem
Ruby
7
star
24

mruby-markdown

Markdown for mruby
C
6
star
25

AppIconOverlay

Create an overlay on top of your app icon
Objective-C
5
star
26

PinballMaze

Pinball Maze GameJS + Box2D + HTML5 Device Orientation Example
JavaScript
4
star
27

mruby-teensy

mruby running on the Teensy 3.6
Ruby
4
star
28

MRubyOSXExample

Example of embedding MRuby in an OS X application
C
3
star
29

SpriteKit-mruby-experiments

Experiments with SpriteKit driven with mruby
C
3
star
30

AFNetworkingSignedS3Example

Example of using AFNetworking to upload a file to S3 using a signed URL
Objective-C
3
star
31

mruby-qrdecode

QR decoder for mruby
C
3
star
32

Swatch

Swatch is a browser plugin that lets you monitor Stack Exchange sites.
JavaScript
2
star
33

ruby-ebird-wrapper

eBird API wrapper
Ruby
2
star
34

node-zlibstream

ZLib streaming for Node.js
C++
2
star
35

node-easy-webthumb

EasyThumb Bluga.net WebThumb API wrapper for node.js
JavaScript
2
star
36

node-put

Pack multibyte binary values into buffers in node.js
JavaScript
2
star
37

glacier-cmd

AWS Glacier command line client
Python
1
star
38

FILiveHerokuTweetScrape

A tweet scraper example for FILive that is set up to run on Heroku.
Ruby
1
star
39

mruby-jpeg

JPEG support for mruby using libjpeg
C
1
star
40

www-pagespeed

Perl module for the Google PageSpeed online API
Perl
1
star
41

PlaygroundExplorer

Swift playground explorer
C
1
star
42

WOA

Stack Exchange Widget Of Awesomeness
JavaScript
1
star
43

FILiveHerokuTweetDisplay

An example for FILive that uses node.js + socket.io to display tweets using Heroku.
JavaScript
1
star
44

Redbox-Browser-Notification-Extension

A chrome browser extension that notifies you when Redbox movies are available at a location
CoffeeScript
1
star