• Stars
    star
    187
  • Rank 206,464 (Top 5 %)
  • Language
    C++
  • License
    MIT License
  • Created almost 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

OpenCV FFMpeg Live Video Stream over RTMP protocol.

OpenCV FFMpeg RTMP Stream

Example of live video streaming over RTMP protocol using OpenCV and FFMpeg.

For streaming without using OpenCV check ffmpeg-webcam-rtmp-stream repository.

Installation Guide

Install FFMpeg

On MacOS.

brew install ffmpeg

On Ubuntu Linux.

sudo apt-get install ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev libavdevice-dev -y

Install OpenCV

For installing OpenCV there's a script inside scripts/ folder:

./scripts/install-opencv.sh

Run RTMP Server Docker image

docker run -it -p 1935:1935 -p 8080:8080 --name rtmp-server jkuri/urtmp

Then open your browser at http://localhost:8080 where you can watch your published streams.

uRTMP live stream

Compile & run

To compile source code just run:

mkdir -p build && cd build
cmake .. && make

Run the program to start streaming:

./build/rtmp-stream

To set up different options for stream, here is ./rtmp-stream -h output

SYNOPSIS
        ./rtmp-stream [-c <camera>] [-o <output>] [-f <fps>] [-w <width>] [-h <height>] [-b <bitrate>] [-p <profile>] [-l <log>]

OPTIONS
        -c, --camera <camera>
                    camera ID (default: 0)

        -o, --output <output>
                    output RTMP server (default: rtmp://localhost/live/stream)

        -f, --fps <fps>
                    frames-per-second (default: 30)

        -w, --width <width>
                    video width (default: 800)

        -h, --height <height>
                    video height (default: 640)

        -b, --bitrate <bitrate>
                    stream bitrate in kb/s (default: 300000)

        -p, --profile <profile>
                    H264 codec profile (baseline | high | high10 | high422 | high444 | main) (default: high444)

        -l, --log <log>
                    print debug output (default: false)

Use VLC or ffplay to connect to live video stream:

ffplay -sync ext rtmp://localhost/live/stream

LICENCE

MIT

More Repositories

1

ngx-slimscroll

Customizable Scrollbar Directive for Angular
TypeScript
124
star
2

ng-daterangepicker

Angular Date Range Picker inspired by PayPal's one
TypeScript
68
star
3

macstats

Mac OS X Statistics - Battery, Fans, CPU
C++
59
star
4

rollup-plugin-progress

rollup plugin for current build status
JavaScript
48
star
5

ionic2-rxjs-socketio-chat

Ionic2 RxJS Socket.io Chat Sample App
TypeScript
44
star
6

ngSlimscroll

AngularJS implementation of slimScroll
JavaScript
41
star
7

ffmpeg-webcam-rtmp-stream

Webcam capture streaming via RTMP or saving into video file. Cross-platform with static builds.
C
41
star
8

d3-car-dashboard

Car Dashboard in the browser built with D3 and Angular.
TypeScript
36
star
9

angular-rollup-starter

Angular2 & Rollup.js including AoT and Universal Prerendering
TypeScript
32
star
10

bore

Reverse HTTP/TCP proxy to help you expose a local server behind a NAT or firewall to the internet via secure SSH tunnels.
Go
32
star
11

ngDatepicker

AngularJS Simple Datepicker with locale supported
JavaScript
24
star
12

alpine-xfce4

alpine Linux with Xfce4 and VNC Server
Dockerfile
20
star
13

ngTimepicker

AngularJS Timepicker
JavaScript
19
star
14

angular-electron-starter

Electron, Angular2 & TypeScript Starter for building awesome desktop applications.
JavaScript
17
star
15

docker-ubuntu-vnc

Ubuntu Bionic Docker image running Xvfb, SSH daemon and VNC server
Dockerfile
17
star
16

ng2-file-manager

Angular2 File Manager
TypeScript
15
star
17

spinners

Spinners is a header-only C++ library providing elegant terminal spinners for C++11 onwards.
C++
10
star
18

urtmp

μRTMP is a simple low-overhead minimal RTMP server with embedded UI to watch your live streams.
TypeScript
9
star
19

party-face-detection

Experiment of face detection algorithm MTCNN ported to Golang on party people highly on drugs.
Go
6
star
20

ng2-cli

Angular2 CLI based on Vorpal and Webpack
TypeScript
5
star
21

rpia.io

A modern CSS front-end framework for developing powerful web interfaces
CSS
4
star
22

ngx-graph

Angular Beautiful and Customizable SVG Charts, Line & Area Chart, Realtime Chart, Pie Chart
TypeScript
3
star
23

hapi-rxjs-api

Fake API Server built on Hapi and RxJS
JavaScript
3
star
24

go-ngtron

A Boilerplate for cross-platform desktop applications using Golang, Angular and Electron.
TypeScript
3
star
25

http-rtmp-multiplex-server

Run HTTP and RTMP server on same port using connection multiplexer.
Go
2
star
26

jankuri.me

Personal Homepage
TypeScript
2
star
27

ng-facebook

Facebook redesign done with Angular
TypeScript
2
star
28

rx-tween

RxJS based Tween engine for easy animations
TypeScript
2
star
29

rxjs-pause-resume

demonstration of pausing and resuming observable stream
TypeScript
1
star
30

ngx-airbnb-calendar

Angular Airbnb Like Date Range Calendar Picker
TypeScript
1
star
31

yugoslaviabasketball.com

Yugoslavia Basketball Team
TypeScript
1
star
32

windows98

Windows 98 nostalgic OS from my childhood wrapped in web application
TypeScript
1
star
33

ng2-platform-node

TypeScript
1
star
34

ngx-slider

Angular customizable range slider
TypeScript
1
star
35

webterminal

xterm-compatible terminal for the web
JavaScript
1
star
36

go-spa

Go (Golang) SPA (Single Page Application) Template/Boilerplate for generating single executable from your HTML5 SPA application.
Go
1
star
37

angular-universal-d3-bug

TypeScript
1
star
38

svelte-d3-line-chart

Example usage of D3 in Svelte apps with line chart
Svelte
1
star