ant-media / Ant-Media-Server

Ant Media Server is a live streaming engine software that provides adaptive, ultra low latency streaming by using WebRTC technology with ~0.5 seconds latency. Ant Media Server is auto-scalable and it can run on-premise or on-cloud.
https://antmedia.io
Other
4.23k stars 618 forks source link

Check the HLS Validation Results #3890

Open mekya opened 2 years ago

mekya commented 2 years ago

Issue

There are some issues in HLS validation

Short description

There are numerous warnings and errors (as usual with ffmpeg HLS output), but the “passthrough” rendition is the most problematic one I’d say, and will probably cause issues in players

Environment

Steps to reproduce

  1. Add several adaptive bitrates
  2. Publish stream through OBS with default settings
  3. Validate the HLS Output with the tools above

Expected behavior

There should not be any varying issues. validation_data_illegal_change_in_tag_data_loss.html.zip validation_data.html.zip

Actual behavior

Varying durations and target durations in variant playlists, which can cause interoperability issues in the player

SelimEmre commented 2 years ago

Hi @mekya,

I investigated this issue deeply. Here are the details: There is a simple solution for the constraint Target Duration value. I mean HLS has split_by_time flag parameter. But it has some disadvantages for HLS players. Let's check FFmpeg documentations:

Allow segments to start on frames other than keyframes. This improves behavior on some players when the time between keyframes is inconsistent, but may make things worse on others, and can cause some oddities during seeking. This flag should be used with the hls_time option.

Please check it more detail: https://ffmpeg.org/ffmpeg-formats.html

Also, in the tests I made in Dacast, I saw that the Target Duration value was not a constraint.

New Project.png

Screenshot from 2022-02-25 00-15-30 (copy).png

Here is my recommendation: