[FFmpeg-user] Audio-Video Delay When Fetching From NGINX-RTMP

Stephan Monecke stephanmonecke at gmail.com
Sun Nov 8 22:46:39 EET 2020


Good evening together,


I have another audio-sync question where we're out of ideas.
We get an rtsp-Stream and mix it together with line-in over pulseaudio.

This looks something like:

ffmpeg \
  -use_wallclock_as_timestamps 1  -fflags +genpts      \
  -max_delay 2000000 -thread_queue_size 1024         \
  -i "rtsp://url"           \
  -use_wallclock_as_timestamps 1  -fflags +genpts      \
  -max_delay 2000000 -thread_queue_size 1024         \
  -itsoffset <offset>  \
  -f pulse                  \
  [...]

So far so good. This _kind_ of works when fetching the rtsp stream directly.

As soon as we route the rtsp stream through an nginx-rtmp loopback
(live mode) beforehand, we get a delay of close to 5 s within the
output.
The rtmp-server itself does not cause a noticeable delay, I hence
assume this to be a timestamp issue but my wisdom ends with the above
written options.


Any ideas anyone?


Thanks a lot!


Stephan


More information about the ffmpeg-user mailing list