{"action":"created","issue":{"url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module/issues/205","repository_url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module","labels_url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module/issues/205/comments","events_url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module/issues/205/events","html_url":"https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/issues/205","id":194743646,"number":205,"title":"What nginx and rtmp module versions (branch) do you use for HLS live streaming","user":{"login":"selimatmaca","id":24195140,"avatar_url":"https://avatars.githubusercontent.com/u/24195140?v=3","gravatar_id":"","url":"https://api.github.com/users/selimatmaca","html_url":"https://github.com/selimatmaca","followers_url":"https://api.github.com/users/selimatmaca/followers","following_url":"https://api.github.com/users/selimatmaca/following{/other_user}","gists_url":"https://api.github.com/users/selimatmaca/gists{/gist_id}","starred_url":"https://api.github.com/users/selimatmaca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/selimatmaca/subscriptions","organizations_url":"https://api.github.com/users/selimatmaca/orgs","repos_url":"https://api.github.com/users/selimatmaca/repos","events_url":"https://api.github.com/users/selimatmaca/events{/privacy}","received_events_url":"https://api.github.com/users/selimatmaca/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-12-10T04:16:25Z","updated_at":"2016-12-11T18:07:23Z","closed_at":null,"body":"Hi everyone,\r\nI am trying to do live streaming using HLS and randomly my fragments and index file disappear (deletes itself) and stream ends. My setup is: IPCamera - OBS - Nginx (ffmpeg) - VideoJS. Stream sometimes end in 5 minutes and sometimes in 1 hour. \r\nFirst I had this problem with Nginx1.11.6 and arut's master. \r\nThen I tried Nginx1.11.6 and sergey-dryabzhinsky's latest -dev, and experienced the same problem.\r\nThen I tried 1.9.10 with sergey's a couple of branches. I couldn't get rid of the problem. HLS index and fragments are deleted automatically. I tried many different ffmpeg commands that I could find on the internet.\r\n\r\nMy question is: I am sure there are some of you who can succesfully do live streaming by using HLS. Can you please tell me what version nginx and what version of rtmp module you are using. So I can try with them."},"comment":{"url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module/issues/comments/266297110","html_url":"https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/issues/205#issuecomment-266297110","issue_url":"https://api.github.com/repos/sergey-dryabzhinsky/nginx-rtmp-module/issues/205","id":266297110,"user":{"login":"lpcollier","id":15837654,"avatar_url":"https://avatars.githubusercontent.com/u/15837654?v=3","gravatar_id":"","url":"https://api.github.com/users/lpcollier","html_url":"https://github.com/lpcollier","followers_url":"https://api.github.com/users/lpcollier/followers","following_url":"https://api.github.com/users/lpcollier/following{/other_user}","gists_url":"https://api.github.com/users/lpcollier/gists{/gist_id}","starred_url":"https://api.github.com/users/lpcollier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lpcollier/subscriptions","organizations_url":"https://api.github.com/users/lpcollier/orgs","repos_url":"https://api.github.com/users/lpcollier/repos","events_url":"https://api.github.com/users/lpcollier/events{/privacy}","received_events_url":"https://api.github.com/users/lpcollier/received_events","type":"User","site_admin":false},"created_at":"2016-12-11T18:07:22Z","updated_at":"2016-12-11T18:07:22Z","body":"Hi,\r\n\r\nI used the Arut Master Branch as that's what was linked in the Howto that I initially used.  I have plans to explore more up to date branches when I've got time!\r\n\r\nOne bug present (at least in the branch I'm using) using variant quality streams is that the master stream is put in the directory $name but in the automatically created playlist it's referred to as $name_src.  I created symlinks within my directory structure to fix this.  Once I'm on a more up to date branch I'll investigate and submit a fix if it's still an issue.\r\n\r\nHere is my nginx.conf:\r\n\r\n`worker_processes  1;\r\nerror_log  logs/error.log debug;\r\nevents {\r\n\tworker_connections  1024;\r\n\t}\r\n\r\nrtmp {\r\n\tserver {\r\n\t\tlisten 1935;\r\n\t\tallow play all;\r\n\r\n\t\tapplication live {\r\n\t\t\tallow play all;\r\n\t\t\tlive on;\r\n\t\t\trecord off;\r\n\t\t\tpush rtmp://localhost:1935/live-hls;\r\n\t\t\texec ffmpeg -i rtmp://localhost/$app/$name\r\n\t\t\t\t-c:v libx264 -profile:v baseline -b:v 256K -vf \"scale=480:trunc(ow/a/2)*2\" -f flv -c:a aac -ac 1 -strict -2 -b:a 32k rtmp://localhost/live-hls/$name_low\r\n\t\t\t\t-c:v libx264 -profile:v baseline -b:v 768K -vf \"scale=800:trunc(ow/a/2)*2\" -f flv -c:a aac -ac 1 -strict -2 -b:a 96k rtmp://localhost/live-hls/$name_mid\r\n\t\t\t\t-c:v libx264 -profile:v baseline -b:v 1920K -vf \"scale=1280:trunc(ow/a/2)*2\" -f flv -c:a aac -ac 1 -strict -2 -b:a 128k rtmp://localhost/live-hls/$name_high;\r\n\t\t}\r\n\r\n\t\t#creates our \"live\" full-resolution HLS videostream from our incoming encoder stream and tells where to put the HLS video manifest and video fragments\r\n\t\tapplication live-hls {\r\n\t\t\tallow play all;\r\n\t\t\tlive on;\r\n\t\t\trecord all;\r\n\t\t\trecord_path /var/local/video_recordings;\r\n\t\t\trecord_unique on;\r\n\t\t\thls on;\r\n\t\t\thls_nested on;\r\n\t\t\thls_path /var/local/HLS/live;\r\n\t\t\thls_fragment 10s;\r\n\r\n\t\t\thls_variant _low BANDWIDTH=288000; \r\n\t\t\thls_variant _mid BANDWIDTH=448000;\r\n\t\t\thls_variant _high BANDWIDTH=1152000;\r\n\t\t\thls_variant _src BANDWIDTH=4096000;\t\t\t}\r\n\t\t\r\n\t\t#allows you to play your recordings of your live streams using a URL like \"rtmp://my-ip:1935/vod/filename.flv\"\r\n\t\tapplication vod {\r\n\t\t\tplay /var/local/video_recordings;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\r\nhttp {\r\n\tinclude       mime.types;\r\n\tdefault_type  application/octet-stream;\r\n\r\n\tserver {\r\n\t\tlisten 80;\r\n\t\tserver_name 192.168.254.178;\r\n\t\t\r\n\t\t#creates the http-location for our full-resolution (desktop) HLS stream - \"http://my-ip/live/my-stream-key/index.m3u8\"      \r\n\t\tlocation /live-hls {\r\n\t\t\ttypes {\r\n\t\t\t\tapplication/vnd.apple.mpegurl m3u8;\r\n\t\t}\r\n\t\t\talias /var/local/HLS/live;\r\n\t\t\tadd_header Cache-Control no-cache;\r\n\r\n\t\t\t# add CORS headers\r\n\t\t\tif ($request_method = 'OPTIONS') {\r\n\t\t        add_header 'Access-Control-Allow-Origin' '*';\r\n\t\t        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';\r\n\t\t        add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';\r\n\t\t        add_header 'Access-Control-Max-Age' 1728000;\r\n\t\t        add_header 'Content-Type' 'text/plain charset=UTF-8';\r\n\t\t        add_header 'Content-Length' 0;\r\n\t\t        return 204;\r\n\t\t\t}\r\n\t\t\tif ($request_method = 'POST') {\r\n\t\t        add_header 'Access-Control-Allow-Origin' '*';\r\n\t\t        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';\r\n\t\t        add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';\r\n\t\t\t}\r\n\t\t\tif ($request_method = 'GET') {\r\n\t\t        add_header 'Access-Control-Allow-Origin' '*';\r\n\t\t        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';\r\n\t\t        add_header 'Access-Control-Allow-Headers' 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type';\r\n\t\t\t}\r\n\t\r\n\t\t}\r\n\r\n\t\t\r\n\t\t#allows us to see how stats on viewers on our Nginx site using a URL like: \"http://my-ip/stats\"     \r\n\t\tlocation /stats {\r\n\t\t\tstub_status;\r\n\t\t\t}\r\n\r\n\t\t#allows us to host some webpages which can show our videos: \"http://my-ip/my-page.html\"     \r\n\t\tlocation / {\r\n\t\t\troot   html;\r\n\t\t\tindex  index.html index.htm;\r\n\t\t\t}   \r\n\t\t}\r\n\t}\r\n`"}}
{"actor":{"display_login":"lpcollier"}}