LAVFilters icon indicating copy to clipboard operation
LAVFilters copied to clipboard

An m3u8 problem

Open kdadmin opened this issue 2 years ago • 9 comments

This NASA stream fails to play with LAV 0.77.1 in an app on Win 10:

https://ntv1.akamaized.net/hls/live/2014075/NASA-NTV1-HLS/master_2000.m3u8

The error occurs at IFileSourceFilter::Load(). Note I call ILavFSettings SetRuntimeConfig(TRUE).

The stream plays fine using LAV 0.74.1 and 0.70.2.

Not sure what to make of it.

kdadmin avatar Dec 24 '22 01:12 kdadmin

Confirmed. It fails with LAV Splitter Source but works with File Source URL + LAV Splitter. So likely related to HTTPS protocol changes in FFmpeg.

clsid2 avatar Dec 24 '22 14:12 clsid2

~~BTW, 0.67.0 is the last to play this stream, 0.67.1 fails.~~ Oops, bad brain! BTW, 0.76.0 is the last to play this stream, 0.76.1 fails.

kdadmin avatar Jan 12 '23 01:01 kdadmin

It's my fault https://github.com/Nevcairiel/LAVFilters/commit/5da67b51f10462ae248fbf143ca3c7ac11056a58

This stream works only without referer or with https://www.nasa.gov/.

I would argue tho it is more common to see streams to not work without referer if any filtering is done. Hence the change to improve "compatibility", but obviously it is not always universal. I have network.http.referer.spoofSource (which does the same thing as LAV basically) in Firefox set and it is very rare for things to not work.

kasper93 avatar Jan 12 '23 06:01 kasper93

Possible workaround in FFmpeg code could be to retry with empty referrer in case of a http 403 with self referrer set.

clsid2 avatar Jan 12 '23 14:01 clsid2

Hello! How to use referrer to avoid 403 in mpc-hc

zhouxinghong avatar Apr 06 '24 15:04 zhouxinghong

@Nevcairiel If I'm not wrong in the latest code there are 2 cases:

  • pszReferrer == NULL => send fileName as referer
  • pszReferrer != NULL => send it as referer

Is it possible to add anoter case please?

  • pszReferrer == empty string => do NOT send the referer header

ale5000-git avatar Jun 06 '24 18:06 ale5000-git

The latest revision should allow that

Nevcairiel avatar Jun 06 '24 21:06 Nevcairiel

You can refer to the following implementations 2024-06-06_potplayer

zhouxinghong avatar Jun 06 '24 22:06 zhouxinghong