- Newest
- Most votes
- Most comments
Based on the information provided, it appears you're encountering issues when trying to stream both H264 video and AAC audio to Amazon Kinesis Video Streams. The error message suggests that there's a problem with key frame fragmentation. Here are some points to consider:
-
For H264 video streaming, key frame fragmentation is typically required. Setting "keyFrameFragmentation = FALSE" might be causing issues with the video stream.
-
For AAC audio streaming, as you correctly noted, every frame can be considered a key frame. However, the settings for audio and video streams need to be different.
-
When combining both audio and video streams, you need to ensure that the settings are appropriate for each track. You can't apply the same settings to both.
Here's a suggested approach:
-
For the video track (H264):
- Set keyFrameFragmentation = TRUE
- Set nalAdaptationFlags = ADAPT_FRAME_NAL | ADAPT_CPD_ANNEXB
- Ensure that I-frames are produced every 2-4 seconds
-
For the audio track (AAC):
- Set keyFrameFragmentation = FALSE
- Set nalAdaptationFlags = NAL_ADAPTATION_FLAG_NONE
- Set the KEY_FRAME_FLAG on every audio frame
-
Make sure you're creating separate stream configurations for audio and video tracks.
-
When adding tracks to your Kinesis Video stream, use the appropriate configuration for each track.
-
Ensure that your RTSP source is correctly providing both audio and video streams.
-
Check that your GStreamer pipeline is correctly demuxing and processing both the audio and video streams from your RTSP source.
If you're still encountering issues after making these adjustments, you may need to examine your GStreamer pipeline more closely to ensure it's correctly handling both the audio and video streams from your RTSP source. Also, make sure that the Kinesis Video Streams SDK is properly configured to handle multi-track streams.
Remember, when working with Kinesis Video Streams, it's crucial to adhere to the requirements for providing data through protocols like HLS or MPEG-DASH, which include specific codec private data formats for both video and audio tracks.
Sources
Example: Kinesis Video Streams producer SDK GStreamer Plugin - kvssink - Amazon Kinesis Video Streams
GetHLSStreamingSessionURL - Amazon Kinesis Video Streams
GetDASHStreamingSessionURL - Amazon Kinesis Video Streams
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago
Thanks for quick response. I have gone through these property details "Set keyFrameFragmentation = TRUE Set nalAdaptationFlags = ADAPT_FRAME_NAL | ADAPT_CPD_ANNEXB" and found out that it is used for stream caps. And here I am using one stream only with two tracks. So I wonder how can I set different properties for different tracks in same stream.