1

My application does editing of an HLS input. I alter certain segments. I replace the original segments with these altered segments into the media manifest and #EXT_X_DISCONTINUITY markers added before the first altered segment and then at the end of last segment

The playback is generally fine but mild audio pause/blip is heard at the point of discontinuity. To rule out issue with my modification, I inserted the discontinuity markers in the original content itself and to my surprise, I could see issues on Safari in the original content itself

For example, if my content is

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:3,
0.ts
#EXTINF:3,
1.ts
#EXTINF:3,
2.ts
#EXTINF:3,
3.ts
#EXTINF:3,
4.ts
#EXTINF:3,
5.ts
#EXTINF:3,
6.ts
EXT-X-ENDLIST

I change it to

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:4
#EXT-X-PLAYLIST-TYPE:VOD
#EXTINF:3,
0.ts
#EXTINF:3,
1.ts
#EXT-X-DISCONTINUITY
#EXTINF:3,
2.ts
#EXTINF:3,
3.ts
#EXTINF:3,
4.ts
#EXTINF:3,
5.ts
#EXT-X-DISCONTINUITY
#EXTINF:3,
6.ts
EXT-X-ENDLIST

I dont expect any playback issue here but I do hear audio blips at the point of discontinuity Does anyone have any info on how I can generate the content such that playback is gapless and no audio/video issue seen at discontinuity?

Jagadish Kamath
  • 103
  • 2
  • 8
  • My guess is there is a gap in the audio due to the video track extending beyond the start or end of the segments. Check the first and last timestamos of the affected segments. – szatmary Nov 10 '20 at 16:15
  • But that shouldn't happen in original content with benign discontinuity markers, isn't it? The player must consider starting timestamps and compensate them appropriately. I also tested this in a content with virtually no length difference between audio and video(less than 10ms). But even in that case, this issue is seen. The issue is seen only with Safari HLS playback and not on any other player such as hlsjs or jwplayer – Jagadish Kamath Nov 10 '20 at 16:39
  • No. The player cant "compensate" if it did the audio and video would not line up, and the sync would be off. – szatmary Nov 10 '20 at 16:42
  • That is correct. I'm talking of compensation of negative offsets. For example the video ended at 6.000s and audio at 5.900s, the next timestamps would be 6.033 and 5.921 respectively. And that should be the case with or without discontinuity – Jagadish Kamath Nov 10 '20 at 16:46
  • Please reread my fist comment. my guess is your segments are not as you described here. Please take a look at the timestamps and confirm your assumptions are true. – szatmary Nov 10 '20 at 16:56
  • I completely agree on that. I did analyse the timestamps, both Audio and Video PTS of PES Packets in TS. Audio and Video lengths arent same and have about 100ms of gap between them like how I mentioned. But that gets handled correctly in adjacent segment. There isnt any playback issue without discontinuity marker. But the moment discontinuity tag is introduced, Safari seems to do something non intrusive and creates this mild audio blip which isnt seen with web players – Jagadish Kamath Nov 10 '20 at 17:22
  • @JagadishKamath I'm facing the same issue. Were you able to resolve this issue? – muraliv Oct 28 '22 at 14:41
  • @muraliv No, i havent found a solution. What is your usecase? – Jagadish Kamath Oct 29 '22 at 15:07

0 Answers0