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

http-ts #129

Closed
goliveok opened this issue Feb 2, 2022 · 11 comments
Closed

http-ts #129

goliveok opened this issue Feb 2, 2022 · 11 comments

Comments

@goliveok
Copy link

goliveok commented Feb 2, 2022

打開流http-ts慢的問題

@q191201771
Copy link
Owner

hi,
是使用lalserver做流中转吗,请问输入流是什么格式,打开http-ts使用什么播放器,
是否是因为GOP的I帧间隔过大导致,

@goliveok
Copy link
Author

goliveok commented Feb 6, 2022

hi

ffmpeg 到 rtmp lalserver 到 vlc

example:

ffmpeg -i urlstream -c copy -f flv rtmp://lalserver/live/name

vlc http://ip:port/live/name.ts

打開流太慢

謝謝

@q191201771
Copy link
Owner

我怀疑是因为GOP的I帧间隔过大导致
能否帮我验证一下

使用如下命令从lalserver拉取ts流并存储为文件
ffmpeg -i http://127.0.0.1:8080/live/test110.ts -c copy test110.ts

使用如下命令分析ts文件,并将输出发送给我
ffprobe -show_packets -print_format xml test110.ts

如果没有ffprobe命令的话,将ts文件发送给我也可以

@goliveok
Copy link
Author

goliveok commented Feb 8, 2022

hide.
editted by yoko.

@q191201771
Copy link
Owner

感谢提供信息。该信息显示
GOP的I帧间隔是2.6秒(帧率25fps)。

目前http-ts没有GOP缓存功能(rtmp和http-flv支持GOP缓存功能)。使用http-ts播放可能会出现首帧播放出来过慢问题。比如你的流可能会大于2.6秒(还有网络传输链路往返时长,播放器等方面的影响)。

你可以尝试在源流编码时降低GOP的I帧间隔,或者使用rtmp或http-flv播放。

http-ts后续也会添加GOP缓存功能。

@goliveok
Copy link
Author

goliveok commented Feb 8, 2022

非常感謝你 。

我需要http-ts
如果可以添加緩存以使其快速工作

@q191201771
Copy link
Owner

目前有其他工作正在进行,这个需求只能排在后面,可能是两周后。

@Golive3
Copy link

Golive3 commented Feb 9, 2022

問候和感謝您的出色工作和一個很好的回答,讓我向您致敬

@q191201771
Copy link
Owner

hi,我最近有时间处理这个issue了,
你反馈的使用vlc播放http-ts慢的问题,如果方便请进一步提供以下信息:

  1. 慢是指首屏播放(也即第一幅画面出来)慢,还是指延时大(也即源流和vlc播放lalserver的流的时间差大)
  2. 慢的具体数值,比如是1秒还是5秒
  3. vlc播放(http-ts所对应的)rtmp或http-flv的数值

感谢

@goliveok
Copy link
Author

goliveok commented Feb 22, 2022

流式傳輸 http-ts 和 flv 和 rtmp 不響應打開第一個圖像

1
當您開始在 vlc 上流式傳輸 http-ts 和 flv 和 rtmp 時,它會減慢 6 秒或更長時間
2
當您開始流式傳輸 http-ts 和 flv 和 rtmp 時,它會在第一個圖像處保持關閉幾秒鐘,然後再打開。
3
能不能用1-2秒的緩衝來支持流式http-ts和flv和rtmp的快速打開。

在 ffplay 上再次嘗試打開流式傳輸(http-ts +rtmp +flv),但打開圖像要慢得多。

我在這里為您提供幫助或嘗試發送報告。
請原諒我寫的錯誤,因為官方語言不是中文
謝謝

@q191201771
Copy link
Owner

httpts的gop cache缓存功能已经实现了。
将配置文件中 httpts -> gop_num 字段修改为1或者2即可开启。
欢迎测试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants