flavioribeiro / nginx-audio-track-for-hls-module

:sound: Nginx module that generates audio track for HTTP Live Streaming (HLS) streams on the fly.
GNU General Public License v3.0
136 stars 17 forks source link

Path requires a trailing slash #15

Closed jbochi closed 2 years ago

jbochi commented 11 years ago

The module looks for the wrong file name, ending with the ".t" extension if there is not a trailing slash on root path.

2013/05/14 15:33:46 [error] 32662#0: *580 aac module: could not open video input: '/opt/hls/evostream/media//video/video300/segment_1368555478053_1368555478053_186.t', client: 10.31.252.89, server: , request: "GET /video/video300/segment_1368555478053_1368555478053_186.aac HTTP/1.0", host: "live.hls.qa01.globoi.com"

flavioribeiro commented 11 years ago

I could reproduce it now with a big path:

2013/06/07 20:50:54 [error] 30496#0: *28687 aac module: could not open video input: '/opt/hls/evostream/media/�/tvg/tvg1264/segment_1370635512350_1370635512350_5074',  client: 10.70.192.5, server: , request: "GET /tvg/tvg1264/segment_1370635512350_1370635512350_5074.aac HTTP/1.1", host: "segmenter.live.hls.globoi.com",  referrer: "http://dl.dropboxusercontent.com/u/7583353/watch_html5_video.html"

and

2013/06/07 20:51:00 [error] 30438#0: *28721 aac module: could not open video input: '/opt/hls/evostream/media//estudiocgjrj/estudiocgjrj_1264/segment_1370644433067_1370644433067_2306.t', client: 10.70.192.3, server: , request: "GET /estudiocgjrj/estudiocgjrj_1264/segment_1370644433067_1370644433067_2306.aac HTTP/1.0", host: "backend"

It seems that path concatenation is bugged. Putting this issue in high priority.

flavioribeiro commented 11 years ago

thanks @jbochi!

flavioribeiro commented 11 years ago

don't know if is the same bug but i'm getting 500 errors trying to get .aac files

2013/06/17 22:01:31 [error] 1808#0: *5592655 upstream prematurely closed connection while reading response header from upstream, client: 10.70.192.5, server: , request: "GET /tvg/tvg3564/segment_1371512667667_1371512667667_1154.aac HTTP/1.1", upstream: "http://..../tvg/tvg3564/segment_1371512667667_1371512667667_1154.aac", host: "....", referrer: "...."
2013/06/17 22:01:31 [error] 1808#0: *5592655 open() "/opt/hls/nginx-1.2.8/..../500.html" failed (2: No such file or directory), client: 10.70.192.5, server: , request: "GET /tvg/tvg3564/segment_1371512667667_1371512667667_1154.aac HTTP/1.1", upstream: "http://..../tvg/tvg3564/segment_1371512667667_1371512667667_1154.aac", host: "....", referrer: "http://dl.dropboxusercontent.com/u/7583353/watch_html5_video.html"