Why does VLC struggle with .m3u8 streams while browser extensions handle them flawlessly?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
gerry1
New Cone
New Cone
Posts: 1
Joined: 12 Jan 2025 15:22

Why does VLC struggle with .m3u8 streams while browser extensions handle them flawlessly?

Postby gerry1 » 12 Jan 2025 15:24

Hello,

I have been a long-time user of VLC Media Player and appreciated its flexibility for playing all sorts of multimedia files and streams. However, I have recently encountered a frustrating limitation: VLC seems to struggle with .m3u8 streams.

When clicking on .m3u8 links in my browser (e.g., Chrome), VLC often tries to interpret them as playlists instead of treating them as network streams. As a result, VLC fails to load the stream properly or attempts to load non-existent local files.

I have tried:
1. Opening the .m3u8 links manually via "Media > Open Network Stream" in VLC – this works, but it's tedious to do for every link.
2. Adjusting VLC settings, such as disabling automatic playlist start or increasing network caching.
3. Using command-line options like `--no-playlist-autostart`.

Despite these efforts, VLC continues to handle .m3u8 links poorly, especially when launched directly from the browser.

Meanwhile, browser extensions like "HLS Player - m3u8 Streaming Player" handle these links flawlessly, loading the streams directly without any issues.

My questions are:
1. Why has VLC, once known for its flexibility, become so unreliable with .m3u8 streams?
2. Is there any proper way to configure VLC to treat .m3u8 links as network streams by default?
3. Are the developers aware of this issue, and is there any plan to improve .m3u8 handling in future versions?

Any guidance or insights would be greatly appreciated. Thank you!

Lotesdelere
Cone Master
Cone Master
Posts: 10188
Joined: 08 Sep 2006 04:39
Location: Europe

Re: Why does VLC struggle with .m3u8 streams while browser extensions handle them flawlessly?

Postby Lotesdelere » 13 Jan 2025 11:35

M3U8 files are playlists. In case of live streams they then contain links to these streams.
If there are several video resolutions then it may take a while before VLC will finally display the best possible available resolution.

Try to increase the network cache setting.

Menu Tools -> Preferences (Show Settings = ALL) -> Input/Codecs
Then scroll down to Advanced/File Caching on the right panel.

Save, exit and restart VLC for the changes to take effect.

F6FLT
New Cone
New Cone
Posts: 1
Joined: 16 Jan 2025 09:18

Re: Why does VLC struggle with .m3u8 streams while browser extensions handle them flawlessly?

Postby F6FLT » 16 Jan 2025 10:07

This is not a VLC problem but a browser problem. VLC handles M3U8 links as well as possible.

There are two types of M3U8 playlist. The “master” m3u8 provides stream addresses (videos at different resolutions, audios, subtitles, etc.). Its addresses point to other M3U8 files, called M3U8 “media”, which provide the actual content of each stream.
With a few exceptions, M3U8 “media” files, but often also M3U8 masters, contain only relative addresses, e.g. “seq123456.ts”.
If a link is clicked from a browser, the browser provides VLC with the contents of the M3U8, for example the one found at http://stream.site.com/channel1/master.m3u8. VLC can't know which address it was downloaded from, it only has the content, so it can't know the host name (http://stream.site.com/channel1/) to complete the relative addresses to get the full address, e.g. http://stream.site.com/channel1/seq123456.ts for an audio or video section.

Solution: always provide VLC with the M3U8 URL, not the file content. And if you supply VLC with the content of an M3U8 master, all the more so with m3u8 media, check that all the links included are absolute (contain the host addresses) and complete the addresses if necessary. Ideally, clicking on an M3U8 link should cause the browser to supply the link address to the application, rather than its content. I don't know if this is possible.

Incidentally there are two other frequent causes of VLC failure, linked to a deliberate refusal by the TV to serve the stream, because either the “user-agent” or the “referrer” is not suitable. In this case, you need to open the channel from an M3U containing optional VLC extensions, for example #EXTVLCOPT:http-user-agent=Mozilla.5.0 to make the streaming service think it's being read from a browser instead of VLC, or #EXTVLCOPT:http-referrer=http://stream.site.com/channel1/ to make it think that the request came from a page on the site http://stream.site.com/channel1 rather than from VLC.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 44 guests