All Projects → i4tv → Gstreamill

i4tv / Gstreamill

Licence: gpl-3.0
encoder with hls output based on gstreamer.

Programming Languages

c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to Gstreamill

Bbwebimage
A high performance Swift library for downloading, caching and editing web images asynchronously.
Stars: ✭ 128 (-42.08%)
Mutual labels:  encoder
Embedding As Service
One-Stop Solution to encode sentence to fixed length vectors from various embedding techniques
Stars: ✭ 151 (-31.67%)
Mutual labels:  encoder
Ks265codec
ks cloud hevc(h265) encoder decoder test and description
Stars: ✭ 192 (-13.12%)
Mutual labels:  encoder
X264 Go
Go bindings for x264
Stars: ✭ 132 (-40.27%)
Mutual labels:  encoder
Cityengine Sdk
CityEngine is a 3D city modeling software for urban design, visual effects, and VR/AR production. With its C++ SDK you can create plugins and standalone apps capable to execute CityEngine CGA procedural modeling rules.
Stars: ✭ 137 (-38.01%)
Mutual labels:  encoder
Vvenc
Fraunhofer Versatile Video Encoder (VVenC)
Stars: ✭ 157 (-28.96%)
Mutual labels:  encoder
Avideo Encoder
Encoder Server for AVideo Platform Open-Source
Stars: ✭ 116 (-47.51%)
Mutual labels:  encoder
Codable Diy Kit
A template for creating your own Swift Codable encoders and decoders
Stars: ✭ 207 (-6.33%)
Mutual labels:  encoder
Base62
Base62 encoder and decoder for arbitrary data
Stars: ✭ 141 (-36.2%)
Mutual labels:  encoder
Gojay
fastest JSON encoder/decoder with powerful stream API for Golang
Stars: ✭ 2,009 (+809.05%)
Mutual labels:  encoder
Silk V3 Decoder
kn007's blog
Stars: ✭ 1,832 (+728.96%)
Mutual labels:  encoder
Wav
Battle tested Wav decoder/encoder
Stars: ✭ 139 (-37.1%)
Mutual labels:  encoder
Ffmediatoolkit
FFMediaToolkit is a cross-platform video decoder/encoder library for .NET that uses FFmpeg native libraries. It supports video frames extraction, reading stream metadata and creating videos from bitmaps in any format supported by FFmpeg.
Stars: ✭ 156 (-29.41%)
Mutual labels:  encoder
Swift Html Entities
HTML5 spec-compliant character encoder/decoder for Swift
Stars: ✭ 130 (-41.18%)
Mutual labels:  encoder
Pixelsdk
The modern photo and video editor for your iPhone / iPad app. A fully customizable image & video editing iOS Swift framework.
Stars: ✭ 192 (-13.12%)
Mutual labels:  encoder
Pheromone keyboard
Stars: ✭ 128 (-42.08%)
Mutual labels:  encoder
Salsanext
Uncertainty-aware Semantic Segmentation of LiDAR Point Clouds for Autonomous Driving
Stars: ✭ 153 (-30.77%)
Mutual labels:  encoder
Codablecsv
Read and write CSV files row-by-row or through Swift's Codable interface.
Stars: ✭ 214 (-3.17%)
Mutual labels:  encoder
Xmlschema
XML Schema validator and data conversion library for Python
Stars: ✭ 201 (-9.05%)
Mutual labels:  encoder
Gifenc
small C GIF encoder
Stars: ✭ 164 (-25.79%)
Mutual labels:  encoder

Table of Contents

  • [INTRODUCTION] (#introduction)
    • [Overview] (#overview)
    • [Highlight] (#highlight)
    • [Application] (#application)
  • [INSTALL] (#install)
    • [Prerequisites] (#prerequisites)
    • [Compile and install] (#compile-and-install)
  • [USING GSTREAMILL] (#using-gstreamill)
    • [Prerequisites] (#prerequisites)
    • [B/S Management URL] (#b/s-management-url)
    • [Command line] (#command-line)
    • [Management interface] (#management-interface)
    • [Output] (#output)
  • [JOB DESCRIPTION] (#job-description)

INTRODUCTION

Overview

gstreamill is an open source, based on gstreamer-1.0 with dvr support and hls output.

Highlight

  • hls, http progressive streaminig, udp output.
  • Multi-Rate with GOP Alignment.
  • RESTful management interface, allowing easy integration into operator environment.
  • Job is descript in json.
  • Job run in subprocess, and auto restart on error.
  • Base on gstreamer and easy to extend.
  • B/S Management.
  • Time Shift and Catchup.

Application

IP >-----+ 
         |   +------------+   +----> UDP
CVBS >---+   | gstreamill |   |                 +-- live
         +---+  with dvr  +---+---> M3U8(HLS) --+-- time shift (?timeshift=nnnn)
SDI >----+   +------+-----+   |                 +-- catch up (?start=yyyymmddhhmmss&end=yyyymmddhhmmss)
         |          |         +---> HTTP
LIVE >---+          |
                    |
     REST interface (json over http post)

Third-party Applications

  • Parson
  • JQuery
  • BootStrap
  • BootBox
  • i18next
  • Resumable

INSTALL

gstreamill have been tested in ubuntu 16.04.2.

get source

git clone https://github.com/i4tv/gstreamill.git

install prerequisites

sudo apt-get install autoconf automake libtool libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev libaugeas-dev

Compile and install

./autogen.sh
./configure (--help)
make
make install

dist package

./make dist

USING GSTREAMILL

install prerequisites

sudo apt-get install gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-base

B/S Management URL

http://gstreamill.ip:20118/admin/

Command line

  • help

    gstreamill -h

      Usage:
        gstreamill [OPTION...]
    
        Help Options:
          -h, --help                        Show help options
          --help-all                        Show all help options
          --help-gst                        Show GStreamer Options
    
        Application Options:
          -j, --job                         -j /full/path/to/job.file: Specify a job file, full path is must.
          -l, --log                         -l /full/path/to/log: Specify log path, full path is must.
          -m, --httpmgmt                    -m http managment service address.
          -a, --httpstreaming               -a http streaming service address.
          -s, --stop                        Stop gstreamill.
          -v, --version                     display version information and exit.
    
  • start gstreamill

    service gstreamill start

  • stop gstreamill

    service gstreamill stop

  • invoke a job

default management port is 20118, use curl to invoke test job via management interface for example:

    curl -H "Content-Type: application/json" --data @examples/test.job http://localhost:20118/admin/start
  • invoke a job in foreground, the debug mode:

      gstreamill -j job_descript_file
    
  • access output via http progressive download:

      http://host.name.or.ip:20119/test/encoder/0
    
  • access output use via m3u8:

      http://host.name.or.ip:20119/test/playlist.m3u8 (live)
      http://host.name.or.ip:20119/test/playlist.m3u8?timeshift=3600 (time shift)
      http://host.name.or.ip:20119/test/playlist.m3u8?position=1486556428 (time shift Wed Feb  8 20:20:28 CST 2017)
      http://host.name.or.ip:20119/test/playlist.m3u8?start=201506060606&end=20150606070600 (callback)
    

Management interface

  • start a job over http

      curl -H "Content-Type: application/json" --data @examples/test.job http://localhost:20118/admin/start
    
      or
    
      http http://localhost:20118/admin/start < tssegment.job
    

test.job is job description in json, can be found in examples directory.

  • stop a job

      curl http://host.name.or.ip:20118/admin/stop/job_name
    

job_name is value of the "name" field in job description.

  • query gstreamill stat:

      curl http://host.name.or.ip:20118/stat/gstreamill
      curl http://host.name.or.ip:20118/stat/gstreamill/job/test
    
  • query gstreamer information:

      curl http://host.name.or.ip:20118/stat/gstreamer[/plugin]
    

Output

job name is the value of name of job description.

  • http progressive streaming

      http://host.name.or.ip:20119/job name/encoder/encoder_index
    
  • hls

      http://host.name.or.ip:20119/job name/playlist.m3u8
      http://host.name.or.ip:20119/job name/encoder/encoder_index/playlist.m3u8
    
  • udp

      udp://@ip:port
    

JOB DESCRIPTION

Job example:

/*
 * test job, videotestsrc and audiotestsrc
 */
{
    "name" : "test",
    "debug" : "gstreamill:3",
    "source" : {
        "elements" : {
            "videotestsrc" : {
                "caps" : "video/x-raw,width=720,height=576,framerate=25/1"
            },
            "audiotestsrc" : {
                "property" : {
                    "wave" : 8
                }
            }
        },
        "bins" : [
            "videotestsrc ! appsink name=video",
            "audiotestsrc ! appsink name=audio"
        ]
    },
    "encoders" : [
        {
            "elements": {
                "appsrc" : {
                    "property" : {
                        "format" : 3,
                        "is-live" : true
                    }
                },
                "x264enc" : {
                    "property" : {
                        "bitrate" : 1000,
                        "byte-stream" : true,
                        "threads" : 4,
                        "bframes" : 3
                    }
                },
                "faac" : {
                    "property" : {
                        "name" : "faac",
                        "outputformat" : 1
                    }
                },
                "appsink" : {
                    "property" : {
                        "sync" : false
                    }
                }
            },
            "bins" : [
                "appsrc name=video ! queue ! timeoverlay ! queue ! x264enc ! queue ! muxer.",
                "appsrc name=audio ! audioconvert ! audioresample ! voaacenc ! muxer.",
                "mpegtsmux name=muxer ! queue ! appsink"
            ]
        }
    ],
    "m3u8streaming" : {
        "version" : 3,
        "window-size" : 10,
        "segment-duration" : 3.00
    },
    "dvr_duration": 86400
}

JOB file structure:

{
    'name' : 'cctv2',
    'debug' : '3',
    'is-live' : false,
    'log-path' : '/home/zhangping/tmp/cctv2',
    'source' : {
        ...
    },
    'encoders' : [
        ...
    ],
    'm3u8streaming' : {
        ...
    },
    "dvr_duration": 86400
}

name : job name

debug : debug option, reference gst-launch gst-debug, optional.

is-live : true for live source, false otherwise, for example transcode, default is true.

log-path : dont log to default log direcotry for non-live source, log to log-path if it is presented.

source : source of encoders.

encoders : encoders.

m3u8streaming : m3u8 streaming

dvr_duration : dvr duration, seconds, it's optional.

structure of source:

"source" : {
    "elements" : {
        ...
    },
    "bins" : [
        ...
    ]
}

structure of elements:

"elements" : {
    "element" : {
        "property" : {
            ...
        },
        "caps" : "..."
    },
    ...
}

structure of bins:

"bins" : [
    bin,
    bin,
    ...
]

bins is an array of bin, syntax of bin is like gst-launch, for example:

[
    "udpsrc ! queue ! tsdemux name=demuxer",
    "demuxer.video ! queue ! mpeg2dec ! queue ! appsink name = video",
    "demuxer.audio ! mpegaudioparse ! queue ! mad ! queue ! appsink name = audio" 
]

in this example, first bin with tsdemux has sometimes pads, second and third bin link with first bin: demuxer.video and demuxer.audio. second bin with appsink named video and third bin with appsink named audio. source bins must have bin with appsink that is corespond endoders' source.

structure of encoders:

"encoders" : [
    encoder,
    ...
]

encoders is an array of encoder, encoder is an object, every encoder correspneds an encode output, that means gstreamill support mutilty bitrate output.

structure of encoder:

{
    "elements" : {
        ...
    },
    "bins" : [
        ...
    ],
    "udpstreaming" : "uri"
}

elements and bins is just the same as source structure in syntax, the differnce is encoder bins must have bins with appsrc element, appsrc must have name property, the value of name is the same as appsink name value in source bins. udpstreaming uri is udp streaming output uri, it's optional.

m3u8streaming is hls output, it's optional:

"m3u8streaming" : {
    "version" : 3,
    "window-size" : 10,
    "segment-duration" : 3.00,
}

There are examples in examples directory of source.

Talk about gstreamill on gstreamill or report a bug on issues page.

License

gstreamill is available under GPL v3. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].