gnolizuh / BLSS

NGINX-based Live Media Streaming Server
Other
196 stars 73 forks source link

Stuck at FLV header if playback start before publish #99

Open typcn opened 6 years ago

typcn commented 6 years ago

如果有任何客户端在推流之前开始播放的话,所有客户端都会卡在 FLV 头无法开始,RTMP 也不能播,但是 HLS 可以正常生成切片并播放。

edge 使用的是 pull 的方式回源。

还有一个小建议,匹配推流播放域名的功能最好可以选择关闭,或者允许使用一个 default 域名。有的时候很多域名的配置都一样,这样设置有些麻烦。

gnolizuh commented 6 years ago

我用你描述的方式无法复现,先FLV播放,再推流,推流之后播放会自动开始。(播放器是ffplay)

typcn commented 6 years ago

需要先开一个 application a,推流到 a, 然后 b 使用 pull 的方式回源 A。 两个 app 均开启了 GOP Cache。

gnolizuh commented 6 years ago

能帖一下你的配置文件么?

typcn commented 6 years ago
            application live{
                live on;
                gop_cache on;
                gop_cache_count 1;

                deny publish all;

                pull rtmp://127.0.0.1:1935/push;
            }

            application push{
                live on;

                gop_cache on;
                gop_cache_count 1;

                allow publish 172.22.10.0/24;
                deny publish all;

                hls on;
                hls_fragment 5s;
                hls_playlist_length 20s;
                hls_fragment_naming system;
            }
gnolizuh commented 6 years ago

u are right..确实能复现。