question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lighthouse flagging HLS video chunks as text content

See original GitHub issue

FAQ

URL

https://hls-js.netlify.app/demo/?src=https://hls.enniscdn.net/ded3f0fb-0721-49bb-b761-2123d7be9ed7/master.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

What happened?

When running Lighthouse on a page with an embedded HLS video, the video chunks are incorrectly flagged as “text content”. This seems false, especially as the chunks come back with Content-Type: application/octet-stream.

Screenshot 2022-08-03 at 14 00 24

They’re also flagged as “enormous payloads”. Are there any docs pointing to how best to chunk up video for playback? HLS/DASH seems best practise at the moment.

What did you expect?

For Lighthouse not to interpret video chunks as text content.

What have you tried?

No response

How were you running Lighthouse?

Chrome DevTools

Lighthouse Version

9.6.1

Chrome Version

Chromium: 103.0.5060.114 (arm64)

Node Version

No response

OS

macOS

Relevant log output

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
connorjclarkcommented, Aug 3, 2022

Would need to add application/octet-stream here:

https://github.com/GoogleChrome/lighthouse/blob/c31a92a2224b8d491f22a95278f1b7a4f87acdc3/core/gather/gatherers/dobetterweb/response-compression.js#L30


Although, we may want to rethink this audit. Why only text? Sure, many binary files are already compressed, but the one in the provided example clearly isn’t - the page could be serving 25% of the bytes it currently is for these resources.

Maybe the ResponseGatherer should only skip the expensive “will it gzip” check for formats that are known to always be compressed, and this audit should be renamed to not single out only text.

0reactions
connorjclarkcommented, Aug 11, 2022

Is is standard to encode video files like this that are meant to be served over the web? We don’t have experience here with video specific web performance tuning, so we’ll have to investigate, but at a first glance it seems that the level of compression applied is just too low to be a reasonable thing to serve over a web connection.

how do I avoid the “enourmous payload” warning and score penalty?

FYI, the only thing that impacts scores is the actual metrics. This is just an educated guess on how to move that needle. We could delete the audit entirely and the score wouldn’t change.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP Live Streaming (HLS) Authoring Specification for Apple ...
Learn the requirements for live and on-demand audio and video content delivery using HLS.
Read more >
Untitled
Tableau server videos, Rocky hill school athletics, Goldglovetv vlog, ... Flexget deluge tutorial, Dzirciema iela 20 karte, Text link ads google!
Read more >
Board of County Commissioners - Regular Meeting
proposed improvements to the SGI Playground at Lighthouse Park. ... removing Carrabelle Beach from the flagging system. Informational Items c. HLS v.
Read more >
What Is HLS Streaming and When Should You Use It (2023)
First, the HLS protocol chops up MP4 video content into short (10-second) chunks with the .ts file extension (MPEG2 Transport Stream).
Read more >
HLS Latency Sucks, But Here's How to Fix It (Update) - Wowza
Remember when streaming video online meant constant buffering? HLS solved that problem by using chunks to ensure that your stream can be played ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found