{"id":13439580,"url":"https://github.com/charming-byte/openresty-rtmp-ffmpeg-api","last_synced_at":"2025-04-12T00:17:03.464Z","repository":{"id":217394199,"uuid":"156034866","full_name":"charming-byte/openresty-rtmp-ffmpeg-api","owner":"charming-byte","description":"Example implementation of a dockerized Media Streaming Server powered by nginx-rtmp, ffmpeg and a Go API","archived":false,"fork":false,"pushed_at":"2018-11-04T01:37:16.000Z","size":19,"stargazers_count":29,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T00:16:55.887Z","etag":null,"topics":["ffmpeg","gin-gonic","golang","nginx","nginx-rtmp","nginx-rtmp-sample","openresty","videojs"],"latest_commit_sha":null,"homepage":"","language":"Dockerfile","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/charming-byte.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-04T00:11:24.000Z","updated_at":"2025-02-24T21:17:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"95a6a584-30a8-40a5-9d23-6e0ac6b0e5d7","html_url":"https://github.com/charming-byte/openresty-rtmp-ffmpeg-api","commit_stats":null,"previous_names":["all-in-simplicity/openresty-rtmp-ffmpeg-api","thiago-dev/openresty-rtmp-ffmpeg-api","charming-byte/openresty-rtmp-ffmpeg-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charming-byte%2Fopenresty-rtmp-ffmpeg-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charming-byte%2Fopenresty-rtmp-ffmpeg-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charming-byte%2Fopenresty-rtmp-ffmpeg-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/charming-byte%2Fopenresty-rtmp-ffmpeg-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/charming-byte","download_url":"https://codeload.github.com/charming-byte/openresty-rtmp-ffmpeg-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248497817,"owners_count":21113984,"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":["ffmpeg","gin-gonic","golang","nginx","nginx-rtmp","nginx-rtmp-sample","openresty","videojs"],"created_at":"2024-07-31T03:01:15.294Z","updated_at":"2025-04-12T00:17:03.430Z","avatar_url":"https://github.com/charming-byte.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile"],"sub_categories":[],"readme":"![GitHub](https://img.shields.io/github/license/thiago-dev/openresty-rtmp-ffmpeg-api.svg?style=popout-square) [![Docker Build Status](https://img.shields.io/docker/build/thiagodev/openresty-rtmp-ffmpeg-api.svg?style=popout-square)](https://hub.docker.com/r/thiagodev/openresty-rtmp-ffmpeg-api) [![MicroBadger Size](https://img.shields.io/microbadger/image-size/thiagodev/openresty-rtmp-ffmpeg-api.svg?style=popout-square)](https://hub.docker.com/r/thiagodev/openresty-rtmp-ffmpeg-api) [![HitCount](http://hits.dwyl.io/thiago-dev/openresty-rtmp-ffmpeg-api.svg)](http://hits.dwyl.io/thiago-dev/openresty-rtmp-ffmpeg-api) \n# Example of a Docker based Media Streaming Server powered by nginx-rtmp and a Go API\n\n\u003cimg src=\"https://thiago-dev.github.io/nginx-streaming-example.gif\"\u003e\u003c/img\u003e\n## Table of Contents\n- [Overview](#overview)\n- [Prerequisites](#prerequisites)\n- [Usage](#usage)\n\t* [Configure OBS](#configure-obs)\n\t* [Docker Compose](#docker-compose)\n\t* [Customize nginx configuration](#customize-nginx-configuration)\n- [FFmpeg Compile Options](#ffmpeg-compile-options)\n- [Built With](#built-with)\n- [License](#license)\n\n## Overview\nThis Repository contains a sample implementation of a Docker based Media Streaming Server which is powered by **OpenResty** with the **nginx-rtmp module**, **ffmpeg**, a very simple **Go API** and an example HTML page using **video.js** for playback.\n\nTarget audience are mainly beginners, who want to get an impression on how nginx-rtmp powered by Docker can be combined with an API in Go as a simple authentication layer.\n\n\nnginx-rtmp is configured to transcode for adaptive streaming and create 4 different streams with different bitrates and quality once receiving stream.\n\n## Prerequisites\n-  [Docker](https://docs.docker.com/install/linux/docker-ce/ubuntu/)\n-  [OBS Studio (optional)](https://obsproject.com/)\n\n## Usage\nTo run the image:\n```bash\n$ docker run -d -p 80:80 -p 1935:1935 -e STREAM_KEY=yourKey thiagodev/openresty-rtmp-ffmpeg-api\n```\n_Note: If you dont set the environment variable **STREAM_KEY**, the API will always return 200, thus disabling the check functionality._\n### Configure OBS\n```\nURL.......:    rtmp://localhost/live?key=yourKey\nStream Key:    test\n```\nThe Setting **\"Stream Key\"** is what later gets the stream's name.\nEg. If _Stream Key_ is **_test_**, a **_test.m3u8_** will be generated.\n\n_Note: If you change this don't forget to point video.js to the new location_\n```html\n# index.html\n\u003cscript\u003e\n\tvar player = videojs('example-video');\n\tplayer.src({\n  \t\tsrc: 'http://localhost:80/hls/test.m3u8',\n  \t\ttype: 'application/x-mpegURL'\n\t});\n\u003c/script\u003e\n```\n### Docker Compose\n```yaml\nversion: '2'\nservices:\n  rtmp:\n    image: thiagodev/openresty-rtmp-ffmpeg-api\n    ports:\n      - \"80:80\"\n      - \"1935:1935\"\n    environment:\n      - STREAM_KEY=yourKey\n```\n## Customize nginx configuration\n_See [nginx.conf](etc/nginx/nginx.conf) for an example config._\nTo provide your own config start the container with a volume.\n```bash\n$ docker run -d -p 80:80 -p 1935:1935 -e STREAM_KEY=yourKey -v /path/to/your/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf:ro thiagodev/openresty-rtmp-ffmpeg-api\n```\n## FFmpeg Compile Options\n```\nffmpeg version 4.0.2 Copyright (c) 2000-2018 the FFmpeg developers\n  built with gcc 6.4.0 (Alpine 6.4.0)\n  configuration:\n  \t--bindir=/usr/bin\n  \t--disable-debug\n  \t--disable-doc\n  \t--disable-ffplay\n  \t--enable-avresample\n  \t--enable-gnutls\n  \t--enable-gpl\n  \t--enable-libass\n  \t--enable-libfreetype\n  \t--enable-libmp3lame\n  \t--enable-libopus\n  \t--enable-librtmp\n  \t--enable-libtheora\n  \t--enable-libfdk-aac\n      --enable-libvorbis\n      --enable-libvpx\n      --enable-libwebp\n      --enable-libx264\n      --enable-libx265\n      --enable-nonfree\n      --enable-postproc\n      --enable-small\n      --enable-version3\n```\n\n## Built With\n\n* [OpenResty](https://openresty.org/en/) - Dynamic web platform based on NGINX and LuaJIT\n* [nginx-rtmp](https://github.com/arut/nginx-rtmp-module) - NGINX-based Media Streaming Server\n* [Gin](https://github.com/gin-gonic/gin) - HTTP web framework written in Go (Golang)\n* [FFmpeg](https://ffmpeg.org) - Cross-platform solution to record, convert and stream audio and video\n* [video.js](https://videojs.com/) - The Player Framework\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharming-byte%2Fopenresty-rtmp-ffmpeg-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharming-byte%2Fopenresty-rtmp-ffmpeg-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharming-byte%2Fopenresty-rtmp-ffmpeg-api/lists"}