ECN>> sps>> 返回
项目作者: byrcoder

项目描述 :
streaming proxy server
高级语言: C++
项目地址: git://github.com/byrcoder/sps.git
创建时间: 2021-05-22T03:02:00Z
项目社区:https://github.com/byrcoder/sps

开源协议:MIT License

下载




SPS

[![Build Status Linux and macOS]

Introduction

Streaming proxy server(SPS) is a proprietary server for multimedia content.
SPS supports multiple transport protocols, such as SRT /
HTTPS / HTTP / RTMP.

What can SPS do?

SPS can work as nginx-rtmp and SRS for push media over rtmp, and
also if ffmpeg configure is enabled, SPS support flv/ts/mp4/acc/h264-streaming over HTTP/HTTPS/SRT push to the server.
And the clients can play with different the no-seek media container, such as flv/ts/hls over HTTPS/SRT.

Requirements

  • cmake (as build system)
  • gtest
  • http-parser
  • state-thread
  • srt option
  • ffmpeg option
  • openssl option

Configure Options

  • srt —with(out)-srt enabled(disable) srt
  • https —with(out)-openssl enabled https. May use -openssl_include and -openssl_lib specify details for openssl
  • ffmpeg —with(out)-ffmpeg enabled ffmpeg. It is better to make ffmpeg enabled and more Media containers will supports. May use
    -ffmpeg_include and -ffmpeg_lib specify details for ffmpeg

Build example

  1. git clone https://github.com/byrcoder/sps.git
  2. cd sps
  3. git submodule init
  4. git pull --recurse-submodules
  5. ./configure --with-ffmpeg -ffmpeg_include=ffmpeg/include -ffmpeg_lib=ffmpeg/lib --without-srt --without-openssl
  6. cd build && make sps

Run

  • Run as Live Server

    1. cd build
    2. ./sps ../conf/sps.conf
  • Push RTMP or FLV/TS/MP4 to the server

    1. ext="ts"
    2. output="output"
    3. ffmpeg -i xx.flv -f flv "rtmp://127.0.0.1/live/test"
    4. ffmpeg -i yy.flv -f flv "http(s)://127.0.0.1/live/${output}.${ext}"
  • Pull over RTMP/FLV/TS

    1. ext="flv"
    2. output="output"
    3. ffplay "rtmp://127.0.0.1/live/${output}"
    4. ffplay "http(s)://127.0.0.1/live/${output}.${ext}"
  • SRT

    1. ffmpeg -re -i xx.ts -c:v copy -c:a copy -f mpegts 'srt://127.0.0.1:6000?streamid=#!::h=127.0.0.1/live/test,&mode=caller'
    2. ffplay 'srt://127.0.0.1:6000?streamid=#!::h=127.0.0.1/live/test,m=request,&mode=caller'