简体   繁体   English

如何查看m3u8 live stream是否存活?

[英]How to check if m3u8 live stream is alive?

I can get the JSON sent by the streaming link, and get the mime type out of it, but this is not enough.我可以获取流式传输链接发送的 JSON,并从中获取 mime 类型,但这还不够。 I actually want to check if the m3u8 link is actually streaming.我实际上想检查 m3u8 链接是否真的在流式传输。 JSON is like this: JSON是这样的:

"description": "Adaptive",
    "url": "http://media1-lh.maihd.net/i/English_1@123035/master.m3u8",
    "mimetype": "application/vnd.apple.mpegURL"

I have been searching for a tool, or some code, preferably in Java or PHP, which could check the m3u8 link every few minutes to make sure the links is actually streaming.我一直在寻找一种工具或一些代码,最好是在 Java 或 PHP 中,它可以每隔几分钟检查一次 m3u8 链接,以确保链接确实在流式传输。 So far I have not been able to find any solution to this so asking it here if someone could help.到目前为止,我还没有找到任何解决方案,所以在这里询问是否有人可以提供帮助。

The the stream is live, new segments will be added to the end of the m3u8 file every few seconds. 流是实时流,新的段将每隔几秒钟添加到m3u8文件的末尾。 Check to see if the contents of the m3u8 have changed. 检查m3u8的内容是否已更改。

try many times多次尝试

curl http://media1-lh.maihd.net/i/English_1@123035/master.m3u8

Check the contents of the m3u8 have changed.检查 m3u8 的内容是否已更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM