1 Star 0 Fork 0

boysic / ffserver

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Readme.md 2.05 KB
一键复制 编辑 原始数据 按行查看 历史

FFserver


This project aims to replace the hard to configure and maintain old FFserver component of the FFmpeg project.

Core goals include only using the public API of the FFmpeg-libraries to ease maintainability and use an easy to understand configuration file format.

Building

To build the project a Makefile is supplied. No additional configuration system is in place (yet).

Dependencies

To successfully build the project the development files of the following projects must be present:

  • ffmpeg (libav*)
  • lua
  • libmicrohttpd

The versions building was tested on are:

  • ffmpeg 4.0 or newer
  • lua 5.3
  • libmicrohttpd 0.9.51

After successfully building the project with make it can be used with a configuration file.

Configuration

A configuration file is a lua file that is evaluated and the resulting object is used to configure servers. A single instance can start multiple servers. An example configuration file containing only one server and one stream could look like this:

settings = {
    default_server = {
        bind_address = "0.0.0.0",
        port = 8080,
        default_stream = {
            input = "default.mkv",
            formats = { "mkv", "hls", "dash" }
        }
}

Note that multiple streams can be configured for a single server and multiple servers can be defined in a single configuration file.

A sample configuration configuring multiple streams and servers is present as sample_config.lua.

Accessing a stream

Accessing a stream is done with an HTTP client. To receive a stream, request the server name, the stream name and the format in an HTTP GET request. To receive the above stream as matroska the request would read:

GET /default_server/default_stream/mkv

or for HLS:

GET /default_server/default_stream/hls

Limitations/known issues

  • Input files are not validated for muxability (mostly an issue for HLS and DASH)
  • Client side "unclean" disconnect causes memory leak

Technical Details

More technical details about the implementation can be found in Technical.txt.

1
https://gitee.com/boysic/ffserver.git
git@gitee.com:boysic/ffserver.git
boysic
ffserver
ffserver
master

搜索帮助