awslabs/amazon-kinesis-video-streams-producer-c

[BUG] Audio is not in sync with video. Noises while playing back AAC.

sam-vasiutin opened this issue · 10 comments

I am using producer to send video and audio frames to Kinesis.
The devices to capture audio are iPhones with iOS 15+.

Here are the codecs:
hvc1.1.68080.L0.00.00.B0 (H.265 Main@L0.0)
mp4a.40.2 (AAC LC)

Since AVCaptureSession provides audio in PCM uncompressed format I am converting it to raw AAC using AudioToolbox API.
Playback is actually successful both on other devices and AWS console, but I am experiencing sound being late for the couple of seconds and it is slowed.

Sometimes, there is also a cracking noise every couple seconds when playing back on iOS AVPlayer. But, at first I want to deal with unsynchronized audio.

CPD I specify for the audio is 1210(generated with mkvgenGenerateAacCpd function, which is AAC_LC, 44100hz, 1 channel.

P.S.
Since pcm data, which iOS devices provide depends on model and some hardware conditions - the converted AAC data can be not 1024 packets, but 940 or other.

For example, on iPhone 12 I am getting 1880 bytes of pcm data, then I convert it to AAC and it becomes 940 packets(2 bytes each).

I tried aligning both PCM data before converting to 2048 bytes, or AAC raw data to 1024 packets filling the gap with zeros, but it only breaks the sound and it becomes a pure robotic noise.

I am attaching the clip downloaded from Amazon Kinesis console so you can hear the issue.

stage-285.3.mp4

@MushMal Hi, could you take a look, maybe you can help explaining something to me?

Btw, if you try scrolling video you can see the audio is behaving in a strange way.

Hi @sam-vasiutin

My suggestion would be to ensure the A/V sync at the source. The clicking sounds might be due to "empty" audio samples - some decoders are very sensitive to it. I am not very familiar with iOS av stack but see whether there is a way to keep them in sync (or otherwise you might want to synthesize the timestamps). I would recommend dumping out the timestamps as you produce and see whether the source is properly sync-ed.

Another and most likely case might be the A/V buffer overflow when using multi-track stream. If you trace the calls, for multi-track stream case (audio + video) the producer SDK (PIC layer) attempts to gather the frames from both tracks to package them together. It has a limited buffer and will drop frames with an error if the buffer overflows. There are rules governing how audio samples can get packaged with the video frames. Check whether your call to put frame returns any errors and enable verbose logging.

Thanks for your reply!

I found a bug in my code with setting frame.decodingts and frame.presentationts with incorrect values, now the audio is in sync and with normal speed.

But, there are still this clicking sounds. I tried aligning LPCM data to even less than it's actual size (1400 bytes, just random value to see what happens if it is not 2048) and there are even more of this clicks. However, aligning LPCM to 2048 filling the remaining bytes with zeros will make audio to sound a bit robotic.

I also take a look from the other side, checking the hls fragments coming to player, and here is what I can see:

General url:
https://b-e60d19d8.kinesisvideo.eu-central-1.amazonaws.com/hls/v1/getHLSMasterPlaylist.m3u8?SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~

will return:

#EXTM3U
#EXT-X-VERSION:1
#EXT-X-MEDIA:AUTOSELECT=YES,FORCED=NO,TYPE=AUDIO,URI="getHLSMediaPlaylist.m3u8?SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~&TrackNumber=2",GROUP-ID="audio",DEFAULT=NO,NAME="audio"
#EXT-X-STREAM-INF:CODECS="hvc1.1.68080.L0.00.00.B0,mp4a.40.2",RESOLUTION=720x1280,FRAME-RATE=30.0,BANDWIDTH=255012,AUDIO="audio"
getHLSMediaPlaylist.m3u8?SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~&TrackNumber=1

We can see two urls for getting tracks, and we are interested in audio especially:

getHLSMediaPlaylist.m3u8?SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~&TrackNumber=2

Running mediastreamvalidator command line tool on this url will produce the following:

mediastreamvalidator -d iphone "https://b-e60d19d8.kinesisvideo.eu-central-1.amazonaws.com/hls/v1/getMP4MediaFragment.mp4?FragmentNumber=91343852333181599455166244292753815937771818749&SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~&TrackNumber=2"

--------------------------------------------------------------------------------
https://b-e60d19d8.kinesisvideo.eu-central-1.amazonaws.com/hls/v1/getHLSMediaPlaylist.m3u8?SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~&TrackNumber=2
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 46 out of 46 segments
Average segment duration: 2.033000
Total segment bitrates (all discontinuities): average: 119.51 kb/s, max: 122.09 kb/s


Discontinuity: sequence: 1, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.65 kb/s, max: 120.65 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 2, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.87 kb/s, max: 119.87 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 3, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.09 kb/s, max: 119.09 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 4, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.62 kb/s, max: 119.62 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 5, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.74 kb/s, max: 119.74 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 6, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.29 kb/s, max: 119.29 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 7, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.80 kb/s, max: 120.80 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 8, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.39 kb/s, max: 118.39 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 9, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.11 kb/s, max: 119.11 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 10, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.11 kb/s, max: 120.11 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 11, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.73 kb/s, max: 119.73 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 12, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.23 kb/s, max: 120.23 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 13, parsed segment count: 1 of 1, duration: 2.033 sec, average: 121.42 kb/s, max: 121.42 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 14, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.91 kb/s, max: 119.91 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 15, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.98 kb/s, max: 118.98 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 16, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.23 kb/s, max: 120.23 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 17, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.50 kb/s, max: 119.50 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 18, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.85 kb/s, max: 119.85 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 19, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.82 kb/s, max: 118.82 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 20, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.11 kb/s, max: 120.11 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 21, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.26 kb/s, max: 119.26 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 22, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.13 kb/s, max: 118.13 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 23, parsed segment count: 1 of 1, duration: 2.033 sec, average: 122.09 kb/s, max: 122.09 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 24, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.41 kb/s, max: 119.41 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 25, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.59 kb/s, max: 118.59 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 26, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.71 kb/s, max: 120.71 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 27, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.02 kb/s, max: 118.02 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 28, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.99 kb/s, max: 118.99 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 29, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.57 kb/s, max: 120.57 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 30, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.19 kb/s, max: 118.19 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 31, parsed segment count: 1 of 1, duration: 2.033 sec, average: 120.02 kb/s, max: 120.02 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 32, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.72 kb/s, max: 119.72 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 33, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.26 kb/s, max: 119.26 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 34, parsed segment count: 1 of 1, duration: 2.033 sec, average: 117.73 kb/s, max: 117.73 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 35, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.69 kb/s, max: 118.69 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 36, parsed segment count: 1 of 1, duration: 2.033 sec, average: 121.36 kb/s, max: 121.36 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 37, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.43 kb/s, max: 119.43 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 38, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.07 kb/s, max: 119.07 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 39, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.94 kb/s, max: 118.94 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 40, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.87 kb/s, max: 118.87 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 41, parsed segment count: 1 of 1, duration: 2.033 sec, average: 118.00 kb/s, max: 118.00 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 42, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.91 kb/s, max: 119.91 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 43, parsed segment count: 1 of 1, duration: 2.033 sec, average: 117.51 kb/s, max: 117.51 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 44, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.79 kb/s, max: 119.79 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 45, parsed segment count: 1 of 1, duration: 2.033 sec, average: 119.98 kb/s, max: 119.98 kb/s
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

Discontinuity: sequence: 46, parsed segment count: 1 of 1, duration: 2.033 sec
Track ID: 2
Audio Codec: AAC-LC
Audio sample rate: 44100 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

--------------------------------------------------------------------------------
MUST fix issues
--------------------------------------------------------------------------------

Error: Illegal MIME type
--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://b-e60d19d8.kinesisvideo.eu-central-1.amazonaws.com/hls/v1/getHLSMediaPlaylist.m3u8?SessionToken=CiCisp-rLpB7IhHZgDWRcte4LOtoPkOmK6KL6aCxnxPZ_BIQxIjQoct-6gFDia6JlJyquBoZNh2UneQqSjQ9Dk3B-XTEmjF5vV1W9YJpWyIgubrze8viaGIEUs38ltbeLyA7Rp-xxxxxxxxxxxxxxxx~&TrackNumber=2

It can correctly see all the segmented audio information and there is no issues with the sound. (Illegal MIME type is just a misunderstanding, this is a correct MIME type.)

Btw, I can also see a bunch of this messages:

2023-02-23 11:23:17.156644+0100 xxx[25878:465215] HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)
2023-02-23 11:23:17.156876+0100 xxx[25878:465215] HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)
2023-02-23 11:23:17.157105+0100 xxx[25878:465215] HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)
2023-02-23 11:23:23.143274+0100 xxx[25878:464484] HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)
2023-02-23 11:23:29.168147+0100 xxx[25878:464484] HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)
2023-02-23 11:23:35.181854+0100 xxx[25878:464484] HALPlugIn::DeviceGetCurrentTime: got an error from the plug-in routine, Error: 1937010544 (stop)

It is related to the Hardware Abstraction Layer (HAL) in macOS and iOS. The HAL is a low-level interface that allows applications to interact with audio and other hardware on the system.
The error message suggests that there was a problem with the audio playback system, specifically with the HAL plug-in. This could be due to a number of reasons, such as an issue with the audio file or with the AVPlayer itself, but since AVPlayer is fine I guess the audio is not.

Audio path is very sensitive to "correctness" of the encoded stream. Moreover, many audio devices can get physically damaged. The audio firmware/microcode is very diligent of vetting out any "bad" samples. The discontinuity in some audio paths can result in clicking sounds while in others you can hear silence. At any rate, I believe you might want to check your AAC parameters in your source - especially the sample rate before generating the cpd PUBLIC_API STATUS mkvgenGenerateAacCpd(KVS_MPEG4_AUDIO_OBJECT_TYPES, UINT32, UINT16, PBYTE, UINT32); https://github.com/awslabs/amazon-kinesis-video-streams-pic/blob/master/src/mkvgen/include/com/amazonaws/kinesis/video/mkvgen/Include.h#L650

Not much else comes to mind - assuming the audio source does its job properly.

I have collected some data of the initial LPCM size:

  1. iPhone XS - 2048/2054 bytes (Sometimes it produces not 2048, but 2054, but cutting the ending 6 bytes doesn't affect the sound quality)
  2. iPhone 11/12 mini/12/13 pro - 1880/1882 bytes

The alignment to 2048 bytes works perfectly for iPhone XS producing clean and qualitative sound.
For all the "newer" devices there are only 1880/1882 bytes of LPCM data coming from source.

I found out that this newer work at 44100hz sample rate, and some of the past, like iPhone XS works at 48000.
So 940/941 packets makes sense now:

940.8 = 1024 * 44100 / 48000

To fix this I created a data buffer (FIFO data queue) where I put all the data, and when there is more or equal to 2048 bytes I take the slice of 2048 bytes and pass to kinesis.

@MushMal Hi, one more thing to ask - the audio is really qualitative and synchronized when playing back in ON_DEMAND mode. But, in LIVE it's intermittent.

We get an HLS url for playback with the following params, what can cause such behaviour?

LIVE:
image

ON_DEMAND:
Screenshot 2023-03-02 at 16 57 09

Not immediately clear to me - perhaps someone from AWS could shed more light on how the HLS is being packaged as I don't have the latest on it. I would suggest the following:

  1. Cut a separate ticket and include the exact setup and possible ways to reproduce it with using stock sample and pre-recorded clip or something.
  2. Include detailed information on the experience and which devices are being used - a lot of players have compatibility issues with the Live playback and A/V sync.
  3. Run more experiments in your environment and outside of it to try to pinpoint the delta.

Best of luck!

Really appreciate your help!

Seems like iOS players don't work well, I will try understand it a bit more. Tried hls URL for the live stream in different players: macos/windows are fine and all the iOS are not(even in browser).