如何在 Ant Media Server 较新版本中恢复 HLS 文件名结构更改?

How to restore HLS file name structure change in Ant Media Server newer versions?

我一直在使用 Ant Media Server,我们的主要用例之一是 HLS 播放。

在最新更新到 v2.4.1 之前,HLS 的文件名结构类似于 streamId_480p.m3u8

但更新到v2.4.1+后文件名结构已更改为streamId_480p500kbps.m3u8

由于这一变化,我们当前的设置遇到了问题。

有没有办法恢复以前的文件命名结构?

Note: We are a part of AMS team and we are trying to ask and answer the FAQ here so that it can help the users and community to find quick solution to most common queries.

感谢您的提问。在 v2.4.1 及更高版本中更改文件名结构的原因是为了以不同的比特率播放相同的分辨率。 从v2.4.3开始,文件名结构是可配置的。

为了实现和之前版本一样的文件名,需要在/usr/local/antmedia/webapps/appname/WEB-INF/red5-web.properties文件中add/change以下属性

settings.fileNameFormat=%r (默认为 settings.fileNameFormat=%r%b )其中

%r = 分辨率

%b = 比特率

进行更改后,请使用 sudo service antmedia restart.

重新启动服务器

antmedia.io