{"id":13437373,"url":"https://github.com/alfg/docker-nginx-rtmp","last_synced_at":"2025-05-15T18:08:33.630Z","repository":{"id":37587762,"uuid":"71740508","full_name":"alfg/docker-nginx-rtmp","owner":"alfg","description":"🐋 A Dockerfile for nginx-rtmp-module + FFmpeg from source with basic settings for streaming HLS. Built on Alpine Linux.","archived":false,"fork":false,"pushed_at":"2024-09-01T01:56:51.000Z","size":109,"stargazers_count":1095,"open_issues_count":17,"forks_count":408,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-12T02:59:39.707Z","etag":null,"topics":["docker","ffmpeg","hls","hls-live-streaming","live-streaming","nginx-rtmp","rtmp","twitch"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/alfg/nginx-rtmp/","language":"XSLT","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/alfg.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":"2016-10-24T01:17:34.000Z","updated_at":"2025-04-06T20:24:49.000Z","dependencies_parsed_at":"2024-01-07T09:41:29.742Z","dependency_job_id":"377a6549-f95f-4fad-aff6-550667f46f68","html_url":"https://github.com/alfg/docker-nginx-rtmp","commit_stats":{"total_commits":96,"total_committers":14,"mean_commits":6.857142857142857,"dds":0.625,"last_synced_commit":"b4be5dc4915df98691201fe17cd0e6bf11473ad4"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdocker-nginx-rtmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdocker-nginx-rtmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdocker-nginx-rtmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alfg%2Fdocker-nginx-rtmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alfg","download_url":"https://codeload.github.com/alfg/docker-nginx-rtmp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394722,"owners_count":22063984,"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":["docker","ffmpeg","hls","hls-live-streaming","live-streaming","nginx-rtmp","rtmp","twitch"],"created_at":"2024-07-31T03:00:56.442Z","updated_at":"2025-05-15T18:08:33.601Z","avatar_url":"https://github.com/alfg.png","language":"XSLT","funding_links":[],"categories":["HarmonyOS","XSLT","twitch","Infrastructure \u0026 Delivery"],"sub_categories":["Windows Manager","Streaming Servers"],"readme":"# docker-nginx-rtmp\nA Dockerfile installing NGINX, nginx-rtmp-module and FFmpeg from source with\ndefault settings for HLS live streaming. Built on Alpine Linux.\n\n* Nginx 1.23.1 (Mainline version compiled from source)\n* nginx-rtmp-module 1.2.2 (compiled from source)\n* ffmpeg 5.1 (compiled from source)\n* Default HLS settings (See: [nginx.conf](nginx.conf))\n\n[![Docker Stars](https://img.shields.io/docker/stars/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/)\n[![Docker Pulls](https://img.shields.io/docker/pulls/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/)\n[![Docker Automated build](https://img.shields.io/docker/automated/alfg/nginx-rtmp.svg)](https://hub.docker.com/r/alfg/nginx-rtmp/builds/)\n[![Build Status](https://travis-ci.org/alfg/docker-nginx-rtmp.svg?branch=master)](https://travis-ci.org/alfg/docker-nginx-rtmp)\n\n## Usage\n\n### Server\n* Pull docker image and run:\n```\ndocker pull alfg/nginx-rtmp\ndocker run -it -p 1935:1935 -p 8080:80 --rm alfg/nginx-rtmp\n```\nor \n\n* Build and run container from source:\n```\ndocker build -t nginx-rtmp .\ndocker run -it -p 1935:1935 -p 8080:80 --rm nginx-rtmp\n```\n\n* Stream live content to:\n```\nrtmp://localhost:1935/stream/$STREAM_NAME\n```\n\n### SSL \nTo enable SSL, see [nginx.conf](nginx.conf) and uncomment the lines:\n```\nlisten 443 ssl;\nssl_certificate     /opt/certs/example.com.crt;\nssl_certificate_key /opt/certs/example.com.key;\n```\n\nThis will enable HTTPS using a self-signed certificate supplied in [/certs](/certs). If you wish to use HTTPS, it is **highly recommended** to obtain your own certificates and update the `ssl_certificate` and `ssl_certificate_key` paths.\n\nI recommend using [Certbot](https://certbot.eff.org/docs/install.html) from [Let's Encrypt](https://letsencrypt.org).\n\n### Environment Variables\nThis Docker image uses `envsubst` for environment variable substitution. You can define additional environment variables in `nginx.conf` as `${var}` and pass them in your `docker-compose` file or `docker` command.\n\n\n### Custom `nginx.conf`\nIf you wish to use your own `nginx.conf`, mount it as a volume in your `docker-compose` or `docker` command as `nginx.conf.template`:\n```yaml\nvolumes:\n  - ./nginx.conf:/etc/nginx/nginx.conf.template\n```\n\n### OBS Configuration\n* Stream Type: `Custom Streaming Server`\n* URL: `rtmp://localhost:1935/stream`\n* Stream Key: `hello`\n\n### Watch Stream\n* Load up the example hls.js player in your browser:\n```\nhttp://localhost:8080/player.html?url=http://localhost:8080/live/hello.m3u8\n```\n\n* Or in Safari, VLC or any HLS player, open:\n```\nhttp://localhost:8080/live/$STREAM_NAME.m3u8\n```\n* Example Playlist: `http://localhost:8080/live/hello.m3u8`\n* [HLS.js Player](https://hls-js.netlify.app/demo/?src=http%3A%2F%2Flocalhost%3A8080%2Flive%2Fhello.m3u8)\n* FFplay: `ffplay -fflags nobuffer rtmp://localhost:1935/stream/hello`\n\n### FFmpeg Build\n```\n$ ffmpeg -buildconf\n\nffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers\n  built with gcc 10.2.1 (Alpine 10.2.1_pre1) 20201203\n  configuration: --prefix=/usr/local --enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libfdk-aac --enable-libass --enable-libwebp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug --disable-doc --disable-ffplay --extra-libs='-lpthread -lm'\n  libavutil      56. 70.100 / 56. 70.100\n  libavcodec     58.134.100 / 58.134.100\n  libavformat    58. 76.100 / 58. 76.100\n  libavdevice    58. 13.100 / 58. 13.100\n  libavfilter     7.110.100 /  7.110.100\n  libavresample   4.  0.  0 /  4.  0.  0\n  libswscale      5.  9.100 /  5.  9.100\n  libswresample   3.  9.100 /  3.  9.100\n  libpostproc    55.  9.100 / 55.  9.100\n\n  configuration:\n    --prefix=/usr/local\n    --enable-version3\n    --enable-gpl\n    --enable-nonfree\n    --enable-small\n    --enable-libmp3lame\n    --enable-libx264\n    --enable-libx265\n    --enable-libvpx\n    --enable-libtheora\n    --enable-libvorbis\n    --enable-libopus\n    --enable-libfdk-aac\n    --enable-libass\n    --enable-libwebp\n    --enable-postproc\n    --enable-avresample\n    --enable-libfreetype\n    --enable-openssl\n    --disable-debug\n    --disable-doc\n    --disable-ffplay\n    --extra-libs='-lpthread -lm'\n```\n\n\n### FFmpeg Hardware Acceleration\nA `Dockerfile.cuda` image is available to enable FFmpeg hardware acceleration via the [NVIDIA's CUDA](https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC).\n\nUse the tag: `alfg/nginx-rtmp:cuda`:\n```\ndocker run -it -p 1935:1935 -p 8080:80 --rm alfg/nginx-rtmp:cuda\n```\n\nYou must have a supported platform and driver to run this image.\n\n* https://github.com/NVIDIA/nvidia-docker\n* https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker\n* https://docs.docker.com/docker-for-windows/wsl/\n* https://trac.ffmpeg.org/wiki/HWAccelIntro#CUDANVENCNVDEC\n\n**This image is experimental!*\n\n## Resources\n* https://alpinelinux.org/\n* http://nginx.org\n* https://github.com/arut/nginx-rtmp-module\n* https://www.ffmpeg.org\n* https://obsproject.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fdocker-nginx-rtmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfg%2Fdocker-nginx-rtmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfg%2Fdocker-nginx-rtmp/lists"}