Sanix-Darker / rtmp-streamer

A C++ RTMP-STREAMER

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RTMP-STREAMER

A C++ implementation of a RTMP/HTTP-FLV server.

How to start

Nothing have to build, if we are in an C/C++ environment environment, just hit :

sh ./shells/build.sh

To Start RTMP-STREAMER, just hit this command :

sh ./shells/start.sh

But if you want to build and start at the same time, just hit :

sh ./shells/build_and_start.sh

RTMP-STREAMER is composed in 2 main server, the rtmp server for the streaming and the HTTP-FLV server, available on:

To test streams with ffmpeg manually

  • Run the camera stream :
ffmpeg -i /dev/video0 -framerate 1 -video_size 720x404 -vcodec libx264 -maxrate 768k -bufsize 8080k -vf "format=yuv420p" -g 60 -f flv rtmp://127.0.0.1:1935/live/boumboum
  • Run the audio stream :
ffmpeg -ar 8000 -f alsa -i hw:0 -acodec mp3 -b:a 128k -f rtp rtp://127.0.0.1:1935/live/boumboum:audio
  • To stream a complete media file:
ffmpeg -re -i ~/INPUT_FILE -vcodec libx264 -profile:v main -preset:v medium -r 30 -g 60 -keyint_min 60 -sc_threshold 0 -b:v 2500k -maxrate 2500k -bufsize 2500k -filter:v scale="trunc(oha/2)2:720" -sws_flags lanczos+accurate_rnd -acodec libfdk_aac -b:a 96k -ar 48000 -ac 2 -f flv rtmp://live.twitch.tv/app/STREAM_KEY

Author

  • Sanix-darker

About

A C++ RTMP-STREAMER


Languages

Language:C++ 96.1%Language:Python 2.8%Language:Makefile 0.7%Language:Shell 0.4%