Giter VIP home page Giter VIP logo

srt_encoder's Introduction

English | 中文

SRT Encoder

An adaptive encoder based on SRT.
The encoder estimate the output bitrate based on rtt, maxBw, inflight to implement the adaptive bitrate encoder.

  • ffmpeg commnand
    It only need to replace ffmpeg.c and add srt_header.h in fftools fold. Then compile the ffmpeg which supports the adaptive encoder.
  • based on srt protocol
    srt is a simple, low latency, high efficient transport protocol.
  • based on bbr congestion algorithem
    It estimates the bitrate by bbr.

1. introduction

The encoder estimate the output bitrate based on rtt, maxBw, inflight and use the bbr algorithem to implement the adaptive bitrate encoder.

2. how to compile

The ffmpeg depends on libsrt, libx264, libfdk_aac.

2.1 replace ffmpeg.c

The adaptive encoder is developed based on ffmpeg4.1. It need to replace ffmpeg.c and add srt_header.h in fftools fold.
ffmpeg4.1 official download: ffmpeg-4.1.tar.xz

2.2 compile ffmpeg

go to wiki:How to compile

3. how to use it

3.1 srt in srs

srs is live server which supports rtmp/hls/rtp live service.
Now it supports srt live service in "develop" branch.
srs github:https://github.com/ossrs/srs

How to use srt service in srs,go to wiki:v4_CN_SRTWiki

3.2 srt encoder

run command:
ffmpeg -re -i source.mp4 -c:v libx264 -s 640x360 -b:v 700k -c:a libfdk_aac -ab 64k -ar 44100 -ac 2 -f mpegts 'srt://127.0.0.1:10080?streamid=#!::h=live/livestream,m=publish'

Note:

  • can't configure -crf
    crf can't be configured because crf mode conflict with the adaptive bitrate mode in ffmpeg.
  • can't configure -qp
    qp can't be configured because qp mode conflict with the adaptive bitrate mode in ffmpeg.
  • the media format must be mpegts in srt

srt_encoder's People

Contributors

runner365 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.