http-streaming icon indicating copy to clipboard operation
http-streaming copied to clipboard

Fragmented MP4 always leads to Video/Audio append errors when switching quality.

Open ghost opened this issue 3 years ago • 7 comments

Description

Hello Folks,

I now tried several plugins to switch the video quality on demand "videojs-max-quality-selector", "videojs-hls-quality-selector", all of these facing the same issue, no matter what codec I use HEVC, AV1, AVC1 all tested, but I keep falling into the same error after switching the quality levels for several times, reinitializing the player, switching the qualities again and again always leads to:

The media playback was aborted due to a corruption problem or because the media used features your browser did not support.

Or something like:

video append of 1081635b failed for segment #4 in playlist 10-v-av01-720p-av01.0.08M.08/master.m3u8

Once this issue comes up, it heavily persists until you clean up everything, from your browsers cache up to a restart ...

If I check my browser console output, I always see this:

VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) The media playback was aborted due to a corruption problem or because the media used features your browser did not support. 
Object { code: 3, message: "The media playback was aborted due to a corruption problem or because the media used features your browser did not support." }
video.es.js:228:47
VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) video append of 1081635b failed for segment #4 in playlist 10-v-av01-720p-av01.0.08M.08/master.m3u8 
Object { code: 3, message: "video append of 1081635b failed for segment #4 in playlist 10-v-av01-720p-av01.0.08M.08/master.m3u8" }
video.es.js:228:47

Switching qualities really always has to work, every single time, with no exceptions! After some further investigation, it seems that this issue only happens with fmp4 or fragmented mp4 aka .m4s segments, not mpegts or .ts segments. Why that? I can also confirm that this is a VideoJS specific BUG, other players like the bitmovin commercial player loves my HLS streaming media and plays it without any concern, even after changing the quality levels 100 times, but I also tested other players here.

To reproduce this issue, please setup VideoJS with a quality selector plugin of your choice or simply use this stream-tester: https://www.nuevodevel.com/tools/stream-tester or this VHS stream test: https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=false&minified=false&sync-workers=false&liveui=true&llhls=false&url=https%3A%2F%2Fd2zihajmogu5jn.cloudfront.net%2Fbipbop-advanced%2Fbipbop_16x9_variant.m3u8&type=application%2Fx-mpegurl&keysystems=&buffer-water=false&exact-manifest-timings=false&pixel-diff-selector=false&network-info=false&dts-offset=false&override-native=true&preload=auto&mirror-source=true, place the test streams in both versions, mpegts and fmp4 on a webserver and play the content like every other HLS/DASH stream using the master.m3u8 or mpd file included in the testing files that can be obtained from here:

https://drive.google.com/file/d/1iMj4DIX6J7tCq_f7Mi5jSSiQw_t2_oMc/view?usp=share_link

If there is anything else I can do to solve this issue faster, please let me know. Sadly I cannot expose any development resources here otherwise I would have already hosted the stream myself to present this issue directly.

Reduced test case

Files can be obtained from here: https://drive.google.com/file/d/1iMj4DIX6J7tCq_f7Mi5jSSiQw_t2_oMc/view?usp=share_link

Steps to reproduce

All steps to reproduce are already part of the description.

Errors

- The media playback was aborted due to a corruption problem or because the media used features your browser did not support. - video append of 1081635b failed for segment #4 in playlist 10-v-av01-720p-av01.0.08M.08/master.m3u8

What version of Video.js are you using?

7.20.3 ("@types/video.js": "^7.3.48")

Video.js plugins used.

"videojs-max-quality-selector", "videojs-hls-quality-selector"

What browser(s) including version(s) does this occur with?

Firefox 106.0.2, Chrome 106.0.5249.119

What OS(es) and version(s) does this occur with?

Windows 11, Ubuntu 20.04

ghost avatar Nov 01 '22 12:11 ghost

other tickets about that topic : https://github.com/videojs/http-streaming/issues/1273 https://github.com/videojs/video.js/issues/7107

privaloops avatar Nov 24 '22 07:11 privaloops

The funny thing seems that this issue only appears when we really talk about fmp4 with independent segments, If the mp4 gets pulled via byte-range requests, you don't have this issue at all. Anyway, I can't use byte-range due to different caching methods we have implemented in the background, so a single files work much better for us.

ghost avatar Nov 24 '22 11:11 ghost

I closed the wrong issue by accident, my bad. The problem is still existing. To make thing more simple, I also created a test case that can get obtained directly from here:

https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=true&minified=false&sync-workers=false&liveui=true&llhls=true&url=https%3A%2F%2Fcdn.strics.io%2Fhls%2FMovies%2F2160p%2FTester%252520%255B2160p%252520UHD%255D%2Fmaster.m3u8&type=application%2Fx-mpegURL&keysystems=&buffer-water=false&exact-manifest-timings=false&pixel-diff-selector=false&network-info=false&dts-offset=false&override-native=true&preload=auto&mirror-source=true

Simply change the quality several times, reload the whole page and change the quality level again for several times, the stream will break with no exceptions no matter what browser. On chrome, it fails actually every time when Firefox works for a couple of manual quality changes ... At least for me.

ghost avatar Nov 24 '22 16:11 ghost

Hey! We've detected some video files in a comment on this issue. If you'd like to permanently archive these videos and tie them to this project, a maintainer of the project can reply to this issue with the following commands:

  • for https://videojs-http-streaming.netlify.app/?debug=false&autoplay=false&muted=false&fluid=true&minified=false&sync-workers=false&liveui=true&llhls=true&url=https%3A%2F%2Fcdn.strics.io%2Fhls%2FMovies%2F2160p%2FTester%252520%255B2160p%252520UHD%255D%2Fmaster.m3u8: say @video-archivist-bot save BEJB7E

video-archivist-bot avatar Nov 24 '22 16:11 video-archivist-bot

@privaloops

After a long, long journey deep down the rabbit hole, I was finally able to find the BUG and VideoJS contributors urgently need to fix that. In general, I build a massively large playlist containing multiple Codecs and profiles like avc1.640033, avc1.640029, avc1.4d0028, avc1.4d001f for avc1. And av01.0.09H.08, av01.0.09H.10 for av1. And hvc1.2.4.L150.B0, hvc1.1.4.L126.B0, hvc1.2.4.L123.B0 for hevc ... supplying all these diffrent kind of codecs and profiles seems to distort VideoJS if you have a playlist master manifest like show below.

Actually I found the solution by accident to make VideoJS eat my playlist once and for all! Have a look at the m3u8 manifest below. have a look at the following two lines for example:

#EXT-X-STREAM-INF:BANDWIDTH=11956736,RESOLUTION=3840x2160,CODECS="avc1.640033,ec-3",AUDIO="a-0" v-h264-2160p-avc1.640033/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=6189568,RESOLUTION=1920x1080,CODECS="avc1.640029,ec-3",AUDIO="a-0" v-h264-1080p-avc1.640029/master.m3u8

These two lines both referencing a h264 stream, both at diffrent Bitrates, Resolutions and also Codec. The 4K version uses avc1.640033 which is the AVC High Level 5.1 profile, suitable for 4K content. The other is avc1.640029 or AVC High Level 4.1 profile suitable for 1080p content.

As soon as VideoJS has to switch between codecs, meaning you have a quality-picker setup with your player that switches from e.g. avc1.640033 to avc1.640029, the stream will break, no matter what! When using Chrome browser it breaks imidialty, same with Edge and with firefox it is for some reason kinda robust at least for 2-3 quality switches until it also breaks (every single time with no execptions). Sometimes for some reason the player needs to be initilaized 1-2 times, but after that the bug definitly appears. So just for fun I gave the 1080p Version also the avc1.640033 codec at the manifest which previously was avc1.640029, meaning 1080p version and 4k version are both now using avc1.640033 at the master.m3u8 now (without changing the actualy data behind the reference line). This magically solves the issues for switches qualites either manually or going to full screen mode, as the full screen mode enlarges the player aspect ration which again also upgrades the quality automatically in the background and will also make your stream break instantly.

So to fix this issue you now have two solutions:

  1. VideoJS contributors fix up codec switching for fmp4 as this does BUG does not appear with mpegts even when using diffrent profiles. I guess this has something to do with the self-initialization you have with mpegts but not with fmp4.

  2. Simply split up your playlists by Codec profiles. Meaning you provide the player only the playlist that references the best fitting codec for the device you want to deliver the content to. For example, you can check at your frontend app, what browser the user uses, when its firefox you can either provide the user only avc1 playlist in 4k, only containing lines where the Codec for the video is avc1.640033 and no other. This is kinda against the idea of ABR streaming as you can only reference a single resolution, 4K in this case. So if you want to stick with ABR streams you currently have to use the same Profil for all your resolutions/bitrates within one codec. This kinda sucks but from my understanding it's no big deal if you simply stick with a higher profile as the content actually needs. So using avc1.640033 with 1080p content will also work fine, even if it's kinda wrong/overkill.

master manifest (master.m3u8):

#EXTM3U
#EXT-X-VERSION:7
#EXT-X-PLAYLIST-TYPE VOD

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="Deutsch (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-eac3-de-ec-3_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="English (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-eac3-en-ec-3_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="Español (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="es",URI="a-eac3-es-ec-3_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="Français (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="fr",URI="a-eac3-fr-ec-3_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-0",NAME="Italiano (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="it",URI="a-eac3-it-ec-3_384000/master.m3u8"

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-1",NAME="Deutsch (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-aac-de-mp4a.40.2_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-1",NAME="English (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac-en-mp4a.40.2_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-1",NAME="Español (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="es",URI="a-aac-es-mp4a.40.2_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-1",NAME="Français (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="fr",URI="a-aac-fr-mp4a.40.2_384000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-1",NAME="Italiano (5.1)",CHANNELS=6,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="it",URI="a-aac-it-mp4a.40.2_384000/master.m3u8"

#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-2",NAME="Deutsch (5.1)",CHANNELS=2,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="de",URI="a-aac_he-de-mp4a.40.5_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-2",NAME="English (5.1)",CHANNELS=2,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="en",URI="a-aac_he-en-mp4a.40.5_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-2",NAME="Español (5.1)",CHANNELS=2,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="es",URI="a-aac_he-es-mp4a.40.5_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-2",NAME="Français (5.1)",CHANNELS=2,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="fr",URI="a-aac_he-fr-mp4a.40.5_128000/master.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="a-2",NAME="Italiano (5.1)",CHANNELS=2,AUTOSELECT="YES",DEFAULT="NO",LANGUAGE="it",URI="a-aac_he-it-mp4a.40.5_128000/master.m3u8"


#EXT-X-STREAM-INF:BANDWIDTH=11956736,RESOLUTION=3840x2160,CODECS="avc1.640033,ec-3",AUDIO="a-0"
v-h264-2160p-avc1.640033/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=11956736,RESOLUTION=3840x2160,CODECS="avc1.640033,mp4a.40.2",AUDIO="a-1"
v-h264-2160p-avc1.640033/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=11675136,RESOLUTION=3840x2160,CODECS="avc1.640033,mp4a.40.5",AUDIO="a-2"
v-h264-2160p-avc1.640033/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=9073152,RESOLUTION=3840x2160,CODECS="hvc1.1.4.L126.B0,ec-3",AUDIO="a-0"
v-hevc-2160p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=9073152,RESOLUTION=3840x2160,CODECS="hvc1.1.4.L126.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-2160p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=8791552,RESOLUTION=3840x2160,CODECS="hvc1.1.4.L126.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-2160p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=11956736,RESOLUTION=3840x2160,CODECS="hvc1.2.4.L150.B0,ec-3",AUDIO="a-0"
v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=11956736,RESOLUTION=3840x2160,CODECS="hvc1.2.4.L150.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=11675136,RESOLUTION=3840x2160,CODECS="hvc1.2.4.L150.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-2160p-hvc1.2.4.L150.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=7343001,RESOLUTION=3840x2160,CODECS="av01.0.10H.08,ec-3",AUDIO="a-0"
v-av01-2160p-av01.0.10H.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=7343001,RESOLUTION=3840x2160,CODECS="av01.0.10H.08,mp4a.40.2",AUDIO="a-1"
v-av01-2160p-av01.0.10H.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=7061401,RESOLUTION=3840x2160,CODECS="av01.0.10H.08,mp4a.40.5",AUDIO="a-2"
v-av01-2160p-av01.0.10H.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=9073152,RESOLUTION=3840x2160,CODECS="av01.0.12H.10,ec-3",AUDIO="a-0"
v-av01-2160p-av01.0.12H.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=9073152,RESOLUTION=3840x2160,CODECS="av01.0.12H.10,mp4a.40.2",AUDIO="a-1"
v-av01-2160p-av01.0.12H.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=8791552,RESOLUTION=3840x2160,CODECS="av01.0.12H.10,mp4a.40.5",AUDIO="a-2"
v-av01-2160p-av01.0.12H.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=6189568,RESOLUTION=1920x1080,CODECS="avc1.640029,ec-3",AUDIO="a-0"
v-h264-1080p-avc1.640029/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=6189568,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.2",AUDIO="a-1"
v-h264-1080p-avc1.640029/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=5907968,RESOLUTION=1920x1080,CODECS="avc1.640029,mp4a.40.5",AUDIO="a-2"
v-h264-1080p-avc1.640029/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4459417,RESOLUTION=1280x720,CODECS="avc1.4d0028,ec-3",AUDIO="a-0"
v-h264-720p-avc1.4d0028/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4459417,RESOLUTION=1280x720,CODECS="avc1.4d0028,mp4a.40.2",AUDIO="a-1"
v-h264-720p-avc1.4d0028/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4177817,RESOLUTION=1280x720,CODECS="avc1.4d0028,mp4a.40.5",AUDIO="a-2"
v-h264-720p-avc1.4d0028/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2729267,RESOLUTION=640x480,CODECS="avc1.4d001f,ec-3",AUDIO="a-0"
v-h264-480p-avc1.4d001f/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2729267,RESOLUTION=640x480,CODECS="avc1.4d001f,mp4a.40.2",AUDIO="a-1"
v-h264-480p-avc1.4d001f/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2447667,RESOLUTION=640x480,CODECS="avc1.4d001f,mp4a.40.5",AUDIO="a-2"
v-h264-480p-avc1.4d001f/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3882700,RESOLUTION=1920x1080,CODECS="av01.0.09H.08,ec-3",AUDIO="a-0"
v-av01-1080p-av01.0.09H.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3882700,RESOLUTION=1920x1080,CODECS="av01.0.09H.08,mp4a.40.2",AUDIO="a-1"
v-av01-1080p-av01.0.09H.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3601100,RESOLUTION=1920x1080,CODECS="av01.0.09H.08,mp4a.40.5",AUDIO="a-2"
v-av01-1080p-av01.0.09H.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2729267,RESOLUTION=1280x720,CODECS="av01.0.08M.08,ec-3",AUDIO="a-0"
v-av01-720p-av01.0.08M.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2729267,RESOLUTION=1280x720,CODECS="av01.0.08M.08,mp4a.40.2",AUDIO="a-1"
v-av01-720p-av01.0.08M.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2447667,RESOLUTION=1280x720,CODECS="av01.0.08M.08,mp4a.40.5",AUDIO="a-2"
v-av01-720p-av01.0.08M.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1864192,RESOLUTION=640x480,CODECS="av01.0.05M.08,ec-3",AUDIO="a-0"
v-av01-480p-av01.0.05M.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1864192,RESOLUTION=640x480,CODECS="av01.0.05M.08,mp4a.40.2",AUDIO="a-1"
v-av01-480p-av01.0.05M.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1582592,RESOLUTION=640x480,CODECS="av01.0.05M.08,mp4a.40.5",AUDIO="a-2"
v-av01-480p-av01.0.05M.08/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3882700,RESOLUTION=1920x1080,CODECS="av01.0.09H.10,ec-3",AUDIO="a-0"
v-av01-1080p-av01.0.09H.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3882700,RESOLUTION=1920x1080,CODECS="av01.0.09H.10,mp4a.40.2",AUDIO="a-1"
v-av01-1080p-av01.0.09H.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3601100,RESOLUTION=1920x1080,CODECS="av01.0.09H.10,mp4a.40.5",AUDIO="a-2"
v-av01-1080p-av01.0.09H.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2729267,RESOLUTION=1280x720,CODECS="av01.0.08M.10,ec-3",AUDIO="a-0"
v-av01-720p-av01.0.08M.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2729267,RESOLUTION=1280x720,CODECS="av01.0.08M.10,mp4a.40.2",AUDIO="a-1"
v-av01-720p-av01.0.08M.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2447667,RESOLUTION=1280x720,CODECS="av01.0.08M.10,mp4a.40.5",AUDIO="a-2"
v-av01-720p-av01.0.08M.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1864192,RESOLUTION=640x480,CODECS="av01.0.05M.10,ec-3",AUDIO="a-0"
v-av01-480p-av01.0.05M.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1864192,RESOLUTION=640x480,CODECS="av01.0.05M.10,mp4a.40.2",AUDIO="a-1"
v-av01-480p-av01.0.05M.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1582592,RESOLUTION=640x480,CODECS="av01.0.05M.10,mp4a.40.5",AUDIO="a-2"
v-av01-480p-av01.0.05M.10/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4459417,RESOLUTION=1920x1080,CODECS="hvc1.1.4.L126.B0,ec-3",AUDIO="a-0"
v-hevc-1080p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4459417,RESOLUTION=1920x1080,CODECS="hvc1.1.4.L126.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-1080p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4177817,RESOLUTION=1920x1080,CODECS="hvc1.1.4.L126.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-1080p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3305984,RESOLUTION=1280x720,CODECS="hvc1.1.4.L126.B0,ec-3",AUDIO="a-0"
v-hevc-720p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3305984,RESOLUTION=1280x720,CODECS="hvc1.1.4.L126.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-720p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3024384,RESOLUTION=1280x720,CODECS="hvc1.1.4.L126.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-720p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2152546,RESOLUTION=640x480,CODECS="hvc1.1.4.L126.B0,ec-3",AUDIO="a-0"
v-hevc-480p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2152546,RESOLUTION=640x480,CODECS="hvc1.1.4.L126.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-480p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1870946,RESOLUTION=640x480,CODECS="hvc1.1.4.L126.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-480p-hvc1.1.4.L126.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4459417,RESOLUTION=1920x1080,CODECS="hvc1.2.4.L123.B0,ec-3",AUDIO="a-0"
v-hevc-1080p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4459417,RESOLUTION=1920x1080,CODECS="hvc1.2.4.L123.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-1080p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=4177817,RESOLUTION=1920x1080,CODECS="hvc1.2.4.L123.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-1080p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3305984,RESOLUTION=1280x720,CODECS="hvc1.2.4.L123.B0,ec-3",AUDIO="a-0"
v-hevc-720p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3305984,RESOLUTION=1280x720,CODECS="hvc1.2.4.L123.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-720p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=3024384,RESOLUTION=1280x720,CODECS="hvc1.2.4.L123.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-720p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2152546,RESOLUTION=640x480,CODECS="hvc1.2.4.L123.B0,ec-3",AUDIO="a-0"
v-hevc-480p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2152546,RESOLUTION=640x480,CODECS="hvc1.2.4.L123.B0,mp4a.40.2",AUDIO="a-1"
v-hevc-480p-hvc1.2.4.L123.B0/master.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=1870946,RESOLUTION=640x480,CODECS="hvc1.2.4.L123.B0,mp4a.40.5",AUDIO="a-2"
v-hevc-480p-hvc1.2.4.L123.B0/master.m3u8

ghost avatar Nov 28 '22 00:11 ghost

Not sure if it's the same bug or just related, but I have observed the same problem when trying to concatenate two fmp4 videos using HLS (similar to what https://github.com/videojs/plugin-concat does) and where the first video doesn't have audio. If I reverse the order, all works perfectly. This suggests that the audio decoder is not properly initialized if it's not initialized from the beginning.

gsimko avatar Feb 04 '23 04:02 gsimko

Digging around the code I found that the codec change feature using changeType() has been added 2 years ago in https://github.com/videojs/http-streaming/pull/841/

@brandonocasey if you are still familiar with the code, do you know if this regression is known?

gsimko avatar Feb 04 '23 05:02 gsimko