ExoPlayer icon indicating copy to clipboard operation
ExoPlayer copied to clipboard

Support SCTE-35 in HLS

Open billyjoker opened this issue 2 years ago • 6 comments

ExoPlayer Version

2.18.1

Devices that reproduce the issue

Xiaomi Mi Mix 2 (Android 9)

Devices that do not reproduce the issue

Playing on Google Chrome, the SCTE-35 is receivde properly

Reproducible in the demo app?

Yes

Reproduction steps

Play the file (it is a boucle live with SCTE-35 implemented) and wait for the ads

Expected result

We expect receive and read SCTE-35 metadata, but no metadata entries are received.

Actual result

Not receiving Metadata

Media

https://c5433dd5ed1ff15654384a6e4d12952d.7wzuvg.channel-assembly.mediatailor.us-east-1.amazonaws.com/v1/channel/canal3/playlist.m3u8

Bug Report

  • [ ] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

billyjoker avatar Feb 15 '23 15:02 billyjoker

SCTE-35 metadata in HLS TS streams is not supported at the moment. We usually recommend ID3 for metadata entries.

The HLS spec also provides a way to signal SCTE-35 splice information in the media playlist: https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.5.1.1 This isn't supported either yet, but it seems like the preferred way of signalling this metadata.

I'll mark this as an enhancement to support either version of SCTE-35 signalling.

tonihei avatar Feb 20 '23 14:02 tonihei

Thanks @tonihei , so if I want to parse this data, how could I map it directly? I am reading the stream manifest data as follows:

    @Override
    public void onTimelineChanged(Timeline timeline, int reason) {
        Object manifest = player.getCurrentManifest();
        if (manifest instanceof HlsManifest) {
            for (String tag : ((HlsManifest) manifest).mediaPlaylist.tags) {
                // TODO CustomMediaPlaylist mediaPlaylist = parseMediaPlaylist(tag);
            }
        } 
    }

Could you please say if there is an existing parser to perform TODO section ?

billyjoker avatar Feb 20 '23 15:02 billyjoker

We have SpliceInfoDecoder that can read SCTE-35 information from a byte buffer. Not sure if it could be useful for this case.

tonihei avatar Feb 20 '23 15:02 tonihei

That did not helped to me. Finally I did a custom parse to get the attributes I needed

billyjoker avatar Feb 23 '23 17:02 billyjoker

i

thank you so much

woxxin14 avatar Feb 10 '25 05:02 woxxin14

@billyjoker Can you share the parser here, or the approach.

yogeshpaliyal avatar May 30 '25 08:05 yogeshpaliyal

De-duplicating this issue to the same feature request in Media3: https://github.com/androidx/media/issues/2560

tonihei avatar Jul 08 '25 12:07 tonihei