Bug 174458 - [Gstreamer][HLS] Unable to play TED videos
Summary: [Gstreamer][HLS] Unable to play TED videos
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Critical
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks: 141959 154390 182108
  Show dependency treegraph
 
Reported: 2017-07-13 01:49 PDT by Sergio Villar Senin
Modified: 2023-07-17 06:53 PDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2017-07-13 01:49:40 PDT
Steps:
1- Go to https://www.ted.com/talks/nonny_de_la_pena_the_future_of_news_virtual_reality#t-134591
2- Press the plat button

The stream is not played.
Comment 1 Sergio Villar Senin 2017-07-13 01:51:14 PDT
BTW I'm using 2.16.5 although the issue can be reproduced on trunk too with MiniBrowser.
Comment 2 Carlos Alberto Lopez Perez 2017-07-13 07:37:07 PDT
Maybe its the same than bug 174414 ?
It plays fine with trunk as of today for me (r219449) and using the iternal jhbuild. It fails with Epiphany from Debian Stretch.
Comment 3 Carlos Alberto Lopez Perez 2017-07-13 07:37:56 PDT
(In reply to Carlos Alberto Lopez Perez from comment #2)
> Maybe its the same than bug 174414 ?
> It plays fine with trunk as of today for me (r219449) and using the iternal
> jhbuild. It fails with Epiphany from Debian Stretch.

Sorr,y I mean bug 172240
Comment 4 Charlie Turner 2017-07-13 07:50:03 PDT
Thanks for reporting this Sergio.

Just commenting to clear up the suggested triage,

Carlos, it's not the same issue, this is a new bug. I do have some very quick observations and will investigate this once I finish a separate task.

There's 27 subtitle tracks in this HLS manifest, which is a lot. My guess at the moment is that we're waiting for ages fetching those manifests before reporting progress events (causing the play button to reappear). If you click play after a while, playback does happen properly, but seeking causing funny things to happen and this will need investigation. I might be guessing at this because I'm currently investigated bugs related to progress events not working properly in live pipelines, but it seems feasible.

I will look at this when I can.
Comment 5 Charlie Turner 2017-07-13 07:52:51 PDT
So, maybe Carlos has a really great network connection to the server serving this stream and it's not causing the stall inside MediaPlayer...
Comment 6 Carlos Alberto Lopez Perez 2017-07-13 08:04:11 PDT
(In reply to Charlie Turner from comment #5)
> So, maybe Carlos has a really great network connection to the server serving
> this stream and it's not causing the stall inside MediaPlayer...

I have a good connection, indeed. 

Its also true that it don't really plays fine always, sometimes the image gets stalled and then it goes like fast-forward.
Comment 7 Charlie Turner 2017-07-13 08:09:22 PDT
> Its also true that it don't really plays fine always, sometimes the image gets stalled and then it goes like fast-forward.

Right, this is a separate area of open bugs. Before #172240, this stream will have failed to even preroll and likely live-locked. There are other existing bugs to do with progress events in live streams, and also seeking in live streams (seeking on vid.me is also broken, but at least it plays now :))
Comment 8 Sergio Villar Senin 2017-07-14 02:10:05 PDT
(In reply to Charlie Turner from comment #5)
> So, maybe Carlos has a really great network connection to the server serving
> this stream and it's not causing the stall inside MediaPlayer...

In my case my rural connection is far from being good, it's generally slow with a  lot of latency but usable (in comparison youtube works fine).
Comment 9 Charlie Turner 2017-07-14 02:22:37 PDT
> In my case my rural connection is far from being good, it's generally slow with a  lot of latency but usable (in comparison youtube works fine).

That's the same as me :). In any case, it's a bug that we're stalling. I'm working on a separate bug that should resolve at least part of this issue which is tracked in https://bugs.webkit.org/show_bug.cgi?id=141469
Comment 10 Charlie Turner 2017-07-19 07:24:17 PDT
This is a GStreamer bug in their adaptive streaming stack.
The video sort of plays if you're lucky, seeking around can fix the synchro, but in general there are issues with this particular flavour of HLS delivery that I'm tracking with https://bugzilla.gnome.org/show_bug.cgi?id=785129
Comment 11 jena 2020-05-13 11:28:27 PDT
I can play that video just fine with Epiphany Nightly 3.37.1-16-g04b840c21 (flatpak, I've heard there is no gstreamer) as well as in [Ephemeral](https://github.com/cassidyjames/ephemeral) with webkitgtk 2.28.2 from Ubuntu repos.
Comment 12 Alicia Boya García 2020-05-14 03:01:48 PDT
Doesn't work reliably for me. Even in gst-play (release 1.16.2) it tends to get stuck on the "TED" intro, audio clicks and sends hundreds of requests.

The manifest URL is https://hls.ted.com/talks/2376.m3u8
Comment 13 Sergio Villar Senin 2020-07-05 23:52:49 PDT
(In reply to Alicia Boya García from comment #12)
> Doesn't work reliably for me. Even in gst-play (release 1.16.2) it tends to
> get stuck on the "TED" intro, audio clicks and sends hundreds of requests.
> 
> The manifest URL is https://hls.ted.com/talks/2376.m3u8

Any news regarding this? Not being able to play TED videos is pretty bad for user experience.
Comment 15 Philippe Normand 2022-12-24 08:07:35 PST
I think we should disable HLS support. The current demuxer based on adaptivedemux is considered deprecated in favour of hlsdemux2, which we can't use in WebKit... The new demuxer uses libsoup directly, so it won't work if the WebProcess sandbox is enabled.

I just tried this TED video after disabling HLS, MSE was used as fallback and playback worked just fine...
Comment 16 Philippe Normand 2022-12-24 08:11:23 PST
We could make HLS support conditional on some env var, disabled by default. The adventurous HLS fans can re-enable it by setting, let's say, WEBKIT_GST_HLS_SUPPORT=1
Comment 17 Michael Catanzaro 2022-12-24 09:20:57 PST
I suspect we only need to support HLS on broken websites that assume they can use HLS because our user agent header looks like Safari. And maybe if we're lucky there are no such websites, or at least no such important websites.
Comment 18 Philippe Normand 2022-12-24 09:23:38 PST
(In reply to Michael Catanzaro from comment #17)
> I suspect we only need to support HLS on broken websites that assume they
> can use HLS because our user agent header looks like Safari. And maybe if
> we're lucky there are no such websites, or at least no such important
> websites.

I'm sorry but with the current small team we have we can't afford to support every broken website of the wild web unable to do a proper feature check on the user-agent.
Comment 19 Michael Catanzaro 2022-12-25 06:56:22 PST
Hopefully it's not a problem for any website. I'd say go ahead.

If it turns out to be a problem for some website, then we can decide what to do about it based on how important that website is. But I bet it will be fine.
Comment 20 Philippe Normand 2022-12-29 05:03:15 PST
Pull request: https://github.com/WebKit/WebKit/pull/8100
Comment 21 EWS 2023-01-10 05:12:02 PST
Committed 258717@main (e2afda4dd0ab): <https://commits.webkit.org/258717@main>

Reviewed commits have been landed. Closing PR #8100 and removing active labels.