Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck at FLV header if playback start before publish #99

Open
typcn opened this issue Mar 8, 2018 · 5 comments
Open

Stuck at FLV header if playback start before publish #99

typcn opened this issue Mar 8, 2018 · 5 comments

Comments

@typcn
Copy link

typcn commented Mar 8, 2018

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

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

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

@gnolizuh
Copy link
Owner

gnolizuh commented Mar 8, 2018

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

@typcn
Copy link
Author

typcn commented Mar 8, 2018

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

@gnolizuh
Copy link
Owner

gnolizuh commented Mar 8, 2018

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

@typcn
Copy link
Author

typcn commented Mar 8, 2018

            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
Copy link
Owner

gnolizuh commented Mar 8, 2018

u are right..确实能复现。

@gnolizuh gnolizuh closed this as completed Mar 8, 2018
@gnolizuh gnolizuh reopened this Mar 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants