I’m trying to push an m3u8 stream into kinesis video stream in order to use rekognition for some analysis.
However the audio is out of sync by a few seconds, and I’m unable to work out what I need to do in order to fix it.
I’m using the following gstreamer command:
gst-launch-1.0 multiqueue name="mqueue" max-size-bytes=0 max-size-time=0
souphttpsrc location="<URL_GOES_HERE>"
! hlsdemux name="mdemux" connection-speed=4294967
mdemux.src_0 ! mqueue.sink_0 mqueue.src_0 ! tsdemux name=demux parse-private-sections=TRUE ! multiqueue max-size-bytes=0 max-size-time=0 ! video/x-h264 ! h264parse ! kvssink name=sink stream-name="audio-video-file" access-key="${AWS_ACCESS_KEY}" secret-key="${AWS_SECRET_KEY}" aws-region="${AWS_REGION}" retention-period=2
mdemux.src_1 ! mqueue.sink_1 mqueue.src_1 ! aacparse ! multiqueue max-size-bytes=8388608 max-size-buffers=0 max-size-time=10000000000 ! audio/mpeg ! sink.
A few things:
- I set the connection speed on the hlsdemux as it looked like there were a number of video streams, and without the connection speed, gstreamer would exit not knowing which one to choose
- I generated a dot file from using playbin to try and work out how that was playing the stream. From there, I got the values for the multiqueue
- I’ve tried replacing the multiqueue with queue and that didn’t seem to work either
New contributor
Michael Marini is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.