Audio/video not synchronized when recording RTSP to MP4

Benjamin Le Bozec benjamin.lebozec at vodalys.com
Wed May 30 09:50:48 UTC 2018


Hello,

i'm trying to record a RTSP stream to MP4 with the following pipeline :

gst-launch-1.0 -e \
rtspsrc location="rtsp://..." name=src1 protocols=GST_RTSP_LOWER_TRANS_TCP \
src1. ! 'application/x-rtp,media=video' ! decodebin ! videoconvert ! \
x264enc threads=0 bitrate=2000 key-int-max=60 speed-preset=veryfast !
mux.video_0 \
src1. ! 'application/x-rtp,media=audio' ! decodebin ! audioconvert !
voaacenc ! mux.audio_0 \
mp4mux name=mux ! filesink location="test.mp4"

But audio and video are not synchronized in the recorded MP4 (audio is
about 100ms after video)

I tried the different parameters "ntp-sync", "ntp-time-source",
"rfc7273-sync", but that does not seem to change anything.

The RTSP stream is sync when reading with VLC.

Do you have any advice ?

Thank you,

Benjamin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180530/594019e8/attachment.html>


More information about the gstreamer-devel mailing list