Gstreamer camera Audio+Video out of sync

Currently working on pipelining for streaming video source from HDMI camera using Nano to a Local RTMP server, Currently having issues with audio not syncing, (Video is delayed by half a second)

Any further suggestions on changes to the pipelining would be appreciated.

Current pipeline:

gst-launch-1.0 -v v4l2src device=/dev/video0 ! image/jpeg, width=1280, height=720, framerate=30/1, format=MJPG ! jpegdec ! videoconvert ! video/x-raw,format=NV12 ! videoscale ! video/x-raw,format=NV12,width=1280,height=720 ! queue max-size-time=0 ! omxh264enc ! h264parse ! queue ! flvmux name=mux streamable=true ! rtmpsink location=‘rtmp:// live=1’ alsasrc device=“hw:CARD=2” ! queue ! audioconvert ! audioresample ! audio/x-raw,rate=44100 ! queue ! voaacenc bitrate=128000 ! audio/mpeg ! aacparse ! audio/mpeg, mpegversion=4 ! mux.

Setting the properties in alsasrc plugin should help:

  latency-time        : The minimum amount of data to read in each iteration in microseconds. This is the minimum latency that the source reports. This value might be ignored by the element if necessary; see "actual-latency-time"
                        flags: readable, writable
                        Integer64. Range: 1 - 9223372036854775807 Default: 10000
  actual-buffer-time  : Actual configured size of audio buffer in microseconds
                        flags: readable
                        Integer64. Range: -1 - 9223372036854775807 Default: -1
  actual-latency-time : Actual configured audio latency in microseconds
                        flags: readable
                        Integer64. Range: -1 - 9223372036854775807 Default: -1

We don’t actually have experience in tuning the properties. If you need further suggestion, please go to gstreamer forum

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.