winshining / nginx-http-flv-module

A media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache, VHosts (one IP for multi domain names) and JSON style statistics are supported now.
BSD 2-Clause "Simplified" License
2.72k stars 567 forks source link

[bug] Cannot set a default streamname #209

Closed coneos closed 3 years ago

coneos commented 3 years ago

Hi guys,

Thanks for this great plugin but it's not working with this OBS plugin : https://github.com/exeldro/obs-source-record

The 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 your NGINX version (I use the preccompiled version here for testing) a streamname parameter has to be specified and the plugin doesn't handle that, I sent him a feature request but 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

How can the developper of this plugin pass properly the streamname parameter if it's not in tc_url?

Thanks!

coneos commented 3 years ago

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