{"id":20074569,"url":"https://github.com/mgthetrain/nginx-hls-sample","last_synced_at":"2025-05-05T21:31:55.216Z","repository":{"id":208307626,"uuid":"720878548","full_name":"MGTheTrain/nginx-hls-sample","owner":"MGTheTrain","description":"Sample repository demonstrating HLS streaming with nginx.","archived":false,"fork":false,"pushed_at":"2024-01-07T18:06:37.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-07T19:23:52.636Z","etag":null,"topics":["hls","live-streaming","nginx","sample"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MGTheTrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-19T21:33:42.000Z","updated_at":"2023-11-20T20:09:06.000Z","dependencies_parsed_at":"2023-11-20T21:24:13.839Z","dependency_job_id":"7cd95d29-d24a-4927-99cb-25a8108ee57d","html_url":"https://github.com/MGTheTrain/nginx-hls-sample","commit_stats":null,"previous_names":["mgthetrain/nginx-hls-sample"],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGTheTrain%2Fnginx-hls-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGTheTrain%2Fnginx-hls-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGTheTrain%2Fnginx-hls-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MGTheTrain%2Fnginx-hls-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MGTheTrain","download_url":"https://codeload.github.com/MGTheTrain/nginx-hls-sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224470612,"owners_count":17316704,"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":["hls","live-streaming","nginx","sample"],"created_at":"2024-11-13T14:52:56.397Z","updated_at":"2024-11-13T14:52:57.074Z","avatar_url":"https://github.com/MGTheTrain.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nginx-hls-sample\n\n## Table of Contents\n\n- [Summary](#summary)\n- [References](#references)\n- [How to use](#how-to-use)\n\n\n## Summary\n\nSample repository demonstrating HLS streaming with nginx    \n\n## References\n\n[Main reference](https://www.codeinsideout.com/blog/pi/stream-ffmpeg-hls-dash/#create-video-chunks)\n\n## How to use\n\n### Build docker image and run nginx docker container\n\n```\n# Build \nsudo docker build -t nginx-video-streaming:stable .\n# Run on Unix systems\nsudo docker run -v /dev/shm/hls:/usr/share/nginx/html/hls \\\n-v $(pwd)/assets:/usr/share/nginx/html \\\n-p 8080:80 -d nginx-video-streaming:stable\n```\n\n### Record new video and audio segments with ffmpeg \n\n```\n# HLS with h264 (video codec) and aac (audio codec) on Unix systems\n\nsudo mkdir -vp /dev/shm/hls\nsudo ffmpeg -y -f v4l2 -framerate 30 -i /dev/video0 -f alsa -i hw:0 -c:v libx264 -preset veryfast -tune zerolatency -pix_fmt yuv420p -b:v 1500k -c:a aac -b:a 64k -ar 44100 -f hls -hls_time 1 -hls_list_size 30 -hls_flags delete_segments /dev/shm/hls/live.m3u8\n```\n\n### View results\n\nVisit `localhost:8080/hls-stream.html` in a browser of choice (e.g. Safari, Chrome, Firefox).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgthetrain%2Fnginx-hls-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgthetrain%2Fnginx-hls-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgthetrain%2Fnginx-hls-sample/lists"}