exeldro / obs-source-record

GNU General Public License v2.0
370 stars 43 forks source link

[feature request] Passing a streamname parameter to the NGINX http-flv module thru RTMP #29

Closed coneos closed 3 years ago

coneos commented 3 years ago

Hi Exeldro,

Thanks for this great plugin but it's not working with this NGINX module as it needs a streamname parameter : https://github.com/winshining/nginx-http-flv-module

Your plugin works fine with NGINX 1.7.11.3 Gryphon on Windows 10 x64 running this command : rtmp://127.0.0.1/usb

But with the http-flv module (I use the preccompiled version here for testing) a streamname parameter has to be specified and the plugin doesn't handle that. I sent the module developper a feature request as well to know how can I avoid that parameter in the meantime or set it has default in nginx?

Here are the nginx debug log entries.

When I use ffmpeg -re -i test.mp4 -c copy -f flv rtmp://127.0.0.1/usb/streamname 2021/07/19 13:34:49 [info] 3284#11256: 2744484102146 client connected '127.0.0.1' 2021/07/19 13:34:49 [info] 3284#11256: 2 connect: app='usb' args='' flashver='FMLE/3.0 (compatible; Lavf58.76.100)' swf_url='' tc_url='rtmp://127.0.0.1:1935/usb' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935 2021/07/19 13:34:49 [debug] 3284#11256: 2 live: onFCPublish: stream='streamname' 2021/07/19 13:34:49 [debug] 3284#11256: 2 create: fcpublish - set structure data 2021/07/19 13:34:49 [info] 3284#11256: 2 createStream, client: 127.0.0.1, server: 0.0.0.0:1935 2021/07/19 13:34:49 [info] 3284#11256: 2 publish: name='streamname' args='' type=live silent=0, client: 127.0.0.1, server: 0.0.0.0:1935

When I use the plugin with that command rtmp://127.0.0.1/usb 2021/07/19 13:34:25 [info] 3284#11256: 2744484102145 client connected '127.0.0.1' 2021/07/19 13:34:25 [info] 3284#11256: 1 connect: app='usb/streamname' args='' flashver='FMLE/3.0 (compatible; FMSc/1.0)' swf_url='rtmp://127.0.0.1/usb/streamname' tc_url='rtmp://127.0.0.1/usb/streamname' page_url='' acodecs=0 vcodecs=0 object_encoding=0, client: 127.0.0.1, server: 0.0.0.0:1935 2021/07/19 13:34:25 [info] 3284#11256: 1 connect: application not found: 'usb/streamname', client: 127.0.0.1, server: 0.0.0.0:1935 2021/07/19 13:34:25 [info] 3284#11256: 1 disconnect, client: 127.0.0.1, server: 0.0.0.0:1935 2021/07/19 13:34:25 [info] 3284#11256: *1 deleteStream, client: 127.0.0.1, server: 0.0.0.0:1935

I asked the module dev how can you pass properly the streamname parameter if it's not in tc_url

Thanks!

coneos commented 3 years ago

PS : I know that you are sending the stream with the OBS functions but I was hoping you'd have an idea on how to make it work :)

coneos commented 3 years ago

I found the solution, in that case the streamname has to be passed in the key