Audio video alignment/sync issue

Guru Govindan gurunathan.govindan at gmail.com
Thu Jun 16 05:42:03 UTC 2022


Hi,
I have a pipeline that ingests from rtsp stream and saves the original
segment and 360p (transcoded) as two variants to a hls manifest.

The pipeline works fine in hlsjs player and other browsers.

However Avplayer plays only audio and not video for both original and
transcoded stream.

On debugging the issue further I identified that if I disable audio muxing
it plays fine.
It seems to me that the audio and video are out of alignment/sync from the
generated individual segments.

What is the way to ensure that the audio and video are aligned? Will
rtpjitterbuffer help?

Here is a sample pipeline I have

```
gst-launch-1.0 hlssink2 name=ingest1 playlist-length=5 max-files=10
target-duration=2 send-keyframe-requests=true
playlist-location=/live/stream.m3u8 location=/live/%d.ts \
rtspsrc location=rtsp://admin:password@10.10.10.20:554/ protocols=4
name=rtspsrc0 rtspsrc0. ! rtph264depay ! tee name=t t.! queue !
ingest1.video \
  t.! queue ! decodebin name=video_decoder ! tee name=one_decode \
    one_decode. ! queue ! videorate ! video/x-raw,framerate=15/1 !
videoscale ! video/x-raw,width=640,height=360 ! vaapih264enc ! hlssink2
name=ingest2 target-duration=2 playlist-location=/live/360/stream.m3u8
location=/live/360/%d.ts \
rtspsrc0. ! decodebin name=audio_decoder ! fdkaacenc ! tee name=audio_t \
  audio_t. ! queue ! ingest1.audio \
  audio_t. ! queue ! ingest2.audio
```

Thanks a lot for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20220615/a1d54b91/attachment.htm>


More information about the gstreamer-devel mailing list