All Projects → klaxa → Mkvserver_mk2

klaxa / Mkvserver_mk2

Licence: gpl-3.0
The streaming solution to end all streaming problems

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Mkvserver mk2

Node Tcp Streaming Server
Experimental TCP video streaming server written in node.js. Streaming over TCP and redistributing using WebSockets.
Stars: ✭ 100 (-74.68%)
Mutual labels:  ffmpeg, video-streaming
Screen Recorder Ffmpeg Cpp
*Multimedia project* A screen recording application to capture your desktop and store in a video format. Click here to watch the demo
Stars: ✭ 98 (-75.19%)
Mutual labels:  ffmpeg, video-streaming
Awesome Video
A curated list of awesome streaming video tools, frameworks, libraries, and learning resources.
Stars: ✭ 397 (+0.51%)
Mutual labels:  ffmpeg, video-streaming
serverless-media-portal
Ready-to-deploy webapp for sharing home videos: a React frontend with a AWS Lambda backend using FFmpeg to process videos. Created using Serverless Framework.
Stars: ✭ 90 (-77.22%)
Mutual labels:  ffmpeg, video-streaming
Php Ffmpeg Video Streaming
📼 Package media content for online streaming(DASH and HLS) using FFmpeg
Stars: ✭ 246 (-37.72%)
Mutual labels:  ffmpeg, video-streaming
Vidgear
A High-performance cross-platform Video Processing Python framework powerpacked with unique trailblazing features 🔥
Stars: ✭ 2,048 (+418.48%)
Mutual labels:  ffmpeg, video-streaming
Ydls
youtube-dl HTTP download and transcode service
Stars: ✭ 68 (-82.78%)
Mutual labels:  ffmpeg, http-server
Wallop
📺 A transcoding server for your HDHomeRun Prime
Stars: ✭ 165 (-58.23%)
Mutual labels:  ffmpeg, video-streaming
stream video server
demonstrates how to create video streaming server with the help of aiohttp and opencv
Stars: ✭ 15 (-96.2%)
Mutual labels:  http-server, video-streaming
Python Ffmpeg Video Streaming
📼 Package media content for online streaming(DASH and HLS) using FFmpeg
Stars: ✭ 269 (-31.9%)
Mutual labels:  ffmpeg, video-streaming
Php Practice
🌹 一天一点点,积少成多...
Stars: ✭ 351 (-11.14%)
Mutual labels:  ffmpeg
Rtsp Stream
Out of box solution for RTSP - HLS live stream transcoding. Makes RTSP easy to play in browsers.
Stars: ✭ 349 (-11.65%)
Mutual labels:  video-streaming
Ffmpeg.wasm
FFmpeg for browser and node, powered by WebAssembly
Stars: ✭ 6,566 (+1562.28%)
Mutual labels:  ffmpeg
Movienight
Single instance video streaming server with integrated chat.
Stars: ✭ 387 (-2.03%)
Mutual labels:  video-streaming
Mpv thumbnail script
A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies
Stars: ✭ 350 (-11.39%)
Mutual labels:  ffmpeg
Uvicorn
The lightning-fast ASGI server. 🦄
Stars: ✭ 4,676 (+1083.8%)
Mutual labels:  http-server
Coderyi.github.io
Don't fork! coderyi's blog,about iOS ,CS and my code life.
Stars: ✭ 349 (-11.65%)
Mutual labels:  ffmpeg
Cppwebframework
​The C++ Web Framework (CWF) is a MVC web framework, Open Source, under MIT License, using C++ with Qt to be used in the development of web applications.
Stars: ✭ 348 (-11.9%)
Mutual labels:  http-server
Dms
A UPnP DLNA Digital Media Server that includes basic video transcoding. Tested on a Panasonic Viera television, several Android UPnP apps, and Chromecast.
Stars: ✭ 347 (-12.15%)
Mutual labels:  ffmpeg
Ffmpegcommand
FFmpegCommand适用于Android的FFmpeg命令库,实现了对音视频相关的处理,能够快速的处理音视频,大概功能包括:音视频剪切,音视频转码,音视频解码原始数据,音视频编码,视频转图片或gif,视频添加水印,多画面拼接,音频混音,视频亮度和对比度,音频淡入和淡出效果等
Stars: ✭ 394 (-0.25%)
Mutual labels:  ffmpeg

Matroska Server Mk2

This project is the result of years of thinking, trying and finally succeeding.

This software makes it possible to stream (almost) anything remuxed as matroska live in real-time over http to multiple clients.

This is probably also one of the first real world usages of FFmpeg's http server component (which I wrote as part of GSoC 2015).

The second sentence basically said everything already, so let's dive into some usage examples:

First of all, clone the repo and try to build the project:

[email protected]~$ make

If successful you will have built the server binary. Let's get some files to stream!

[email protected]~$ ./server somevideo.mkv

This will serve the file somevideo.mkv on all interfaces on port 8080 (so far only configurable in server2.c) in real-time.

You can also use stdin from a live feed for example:

[email protected]~$ wget http://example.org/livestream -O - | ./server

Or just read it directly as an http served file:

[email protected]~$ ./server http://example.org/livestream

Or you can have an easy screencasting setup:

On a server:

[email protected]~$ nc -l -p 12345 | ./server

On a client:

[email protected]~$ ffmpeg -f x11grab -framerate 15 -s 1920x1080 -i :0.0 -c:v libx264 -f matroska tcp://remote:12345

You will see the server writing some information, as it is still quite verbose (it was even more verbose in earlier versions for obvious reasons ;) ).

Architecture

With the latest iteration more sophisticated data structures have been used. The following structs make up the architecture:

Segment

Contains a segment of data. A segment is always exactly one GOP, that implies segments always start at a keyframe. Segments are refcounted.

BufferContext

Circular buffer that manages segments and takes care of refcounting them.

PublisherContext

Holds a BufferContext for new segments and a BufferContext for old segments that should still be sent to new clients. This makes streams on clients start faster and stutter less.

Also holds a list of Clients, which in turn have a BufferContext of segments that still have to be sent to the client.

When the server receives a file (through stdin or by specifying a file), the Publisher receives them as Segments. That means the Segment has to be read completely before it can be served to clients. Once it is in the Publisher's Buffer, it will be sent to clients. Additionally the Publisher keeps a number of Segments (publisher.h:BUFFER_SEGMENTS) that will be sent to any client that connects. These Segments are the last Segments received. This was added to prevent players from hanging if the video being streamed has very different GOP sizes. To fill this Buffer, the server reads the first BUFFER_SECS (server2.c) of the file regardless of timestamp information in the file.

Effectively this means that if BUFFER_SEGMENTS is set to 0, there will still be at least a delay of one GOP. This constraint made implementation a lot safer as Segments are never written and read at the same time. Therefore in order to reduce latency, this constant should be defined to 0 and the keyframe-interval of the file should be short.

Dependencies

  • recent ffmpeg libraries

(optional) git-format patches are in the "patches/" directory.

Todo

  • Argument parsing
  • Configuration
  • Documentation
  • Management interface
  • Low-latency mode?

Known issues

  • still leaks very small amounts of memory (valgrind reports a few thousand bytes)

Thanks

  • Clément Bœsch <ubitux> for kind of "triggering" this project with a bugreport
  • Nicolas George for mentoring me during GSoC. I would never be familiar enough with the codebase without him and the project.
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].