{"id":13438322,"url":"https://github.com/jkuri/opencv-ffmpeg-rtmp-stream","last_synced_at":"2025-05-07T17:48:10.948Z","repository":{"id":41579719,"uuid":"119456029","full_name":"jkuri/opencv-ffmpeg-rtmp-stream","owner":"jkuri","description":"OpenCV FFMpeg Live Video Stream over RTMP protocol.","archived":false,"fork":false,"pushed_at":"2022-10-18T09:44:37.000Z","size":52,"stargazers_count":215,"open_issues_count":9,"forks_count":59,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-31T12:38:45.645Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkuri.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-29T23:37:35.000Z","updated_at":"2025-03-23T12:46:17.000Z","dependencies_parsed_at":"2023-01-20T01:48:22.999Z","dependency_job_id":null,"html_url":"https://github.com/jkuri/opencv-ffmpeg-rtmp-stream","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fopencv-ffmpeg-rtmp-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fopencv-ffmpeg-rtmp-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fopencv-ffmpeg-rtmp-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkuri%2Fopencv-ffmpeg-rtmp-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkuri","download_url":"https://codeload.github.com/jkuri/opencv-ffmpeg-rtmp-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252930659,"owners_count":21827095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T03:01:04.530Z","updated_at":"2025-05-07T17:48:10.928Z","avatar_url":"https://github.com/jkuri.png","language":"C++","funding_links":[],"categories":["C++","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# OpenCV FFMpeg RTMP Stream\n\nExample of live video streaming over RTMP protocol using OpenCV and FFMpeg.\n\nFor streaming without using OpenCV check [ffmpeg-webcam-rtmp-stream](https://github.com/jkuri/ffmpeg-webcam-rtmp-stream) repository.\n\n### Installation Guide\n\n#### Install FFMpeg\n\nOn MacOS.\n\n```sh\nbrew install ffmpeg\n```\n\nOn Ubuntu Linux.\n\n```sh\nsudo apt-get install ffmpeg libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev libavdevice-dev -y\n```\n\n#### Install OpenCV\n\nFor installing OpenCV there's a script inside `scripts/` folder:\n\n```sh\n./scripts/install-opencv.sh\n```\n\n#### Run RTMP Server Docker image\n\n```sh\ndocker run -it -p 1935:1935 -p 8080:8080 --name rtmp-server jkuri/urtmp\n```\n\nThen open your browser at `http://localhost:8080` where you can watch your published streams.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/1796022/126041179-b1cd220d-b4ed-4b6d-80ee-214067bf6ae0.png\" alt=\"uRTMP live stream\"\u003e\n\u003c/p\u003e\n\n### Compile \u0026 run\n\nTo compile source code just run:\n\n```sh\nmkdir -p build \u0026\u0026 cd build\ncmake .. \u0026\u0026 make\n```\n\nRun the program to start streaming:\n\n```sh\n./build/rtmp-stream\n```\n\nTo set up different options for stream, here is `./rtmp-stream -h` output\n\n```sh\nSYNOPSIS\n        ./rtmp-stream [-c \u003ccamera\u003e] [-o \u003coutput\u003e] [-f \u003cfps\u003e] [-w \u003cwidth\u003e] [-h \u003cheight\u003e] [-b \u003cbitrate\u003e] [-p \u003cprofile\u003e] [-l \u003clog\u003e]\n\nOPTIONS\n        -c, --camera \u003ccamera\u003e\n                    camera ID (default: 0)\n\n        -o, --output \u003coutput\u003e\n                    output RTMP server (default: rtmp://localhost/live/stream)\n\n        -f, --fps \u003cfps\u003e\n                    frames-per-second (default: 30)\n\n        -w, --width \u003cwidth\u003e\n                    video width (default: 800)\n\n        -h, --height \u003cheight\u003e\n                    video height (default: 640)\n\n        -b, --bitrate \u003cbitrate\u003e\n                    stream bitrate in kb/s (default: 300000)\n\n        -p, --profile \u003cprofile\u003e\n                    H264 codec profile (baseline | high | high10 | high422 | high444 | main) (default: high444)\n\n        -l, --log \u003clog\u003e\n                    print debug output (default: false)\n```\n\nUse VLC or `ffplay` to connect to live video stream:\n\n```sh\nffplay -sync ext rtmp://localhost/live/stream\n```\n\n### LICENCE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkuri%2Fopencv-ffmpeg-rtmp-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkuri%2Fopencv-ffmpeg-rtmp-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkuri%2Fopencv-ffmpeg-rtmp-stream/lists"}