-
Is the WebWorker also useful for streams which contain no TS tracks, only fMp4 (and possibly fragmented vtt subtitles)? Or can it be disabled in that scenario without detrimental effects to performance because its only purpose is TS demuxing and MP4 remuxing? TIA |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @phloxic, That really depends on the content and platform you are running on. Message event roundtrip to and from workers can introduce latency, but at least parsing of the media does not block UI operations. Subtitles segments (VTT) are never sent to the worker. Only audio and video segments are sent to the transmuxer for parsing. Even fragmented mp4 are subject to parsing (mp4 trac start and duration, SEI/emsg/captions). We haven't experimented with a more dynamic worker mode where fragment stats are analyzed, and a decision to demux sync or async is made in real-time, based on throughput and segment bitrate. It also could be beneficial for all network activity to be handled in the worker, but that would require a large amount of decoupling of responsibilities in the stream-controllers, and messaging of playback/player state instead of AV input/output. |
Beta Was this translation helpful? Give feedback.
-
@robwalch, thanks for taking the time to answer in depth. |
Beta Was this translation helpful? Give feedback.
Hi @phloxic,
That really depends on the content and platform you are running on. Message event roundtrip to and from workers can introduce latency, but at least parsing of the media does not block UI operations.
Subtitles segments (VTT) are never sent to the worker. Only audio and video segments are sent to the transmuxer for parsing. Even fragmented mp4 are subject to parsing (mp4 trac start and duration, SEI/emsg/captions).
We haven't experimented with a more dynamic worker mode where fragment stats are analyzed, and a decision to demux sync or async is made in real-time, based on throughput and segment bitrate.
It also could be beneficial for all network activity to be handled in the w…