[FFmpeg-user] Synchronization trouble with multiple inputs on a Unix socket

João Bernardo jbvsmo at gmail.com
Wed Aug 6 20:26:53 CEST 2014


Hi,
I have a system receiving audio and video separately and I'm using FFmpeg
to join these and stream it to my RTMP server.

I started using named pipes but they tend to hang on some cases where
bandwidth is insufficient instead of giving me an error.

     ffmpeg -re -i audio_pipe.ts -i video_pipe.ts -c copy rtmp://
example.com/myapp

Then I changed those inputs to unix domain sockets:

     "unix://audio_socket.ts" and "unix://video_socket.ts"

But somehow now audio and video are out of sync because it seems to take
about 1.5 seconds between the audio socket and video socket to connect (The
sync error varies between 100 and 500ms).

Because I'm streaming mpeg2ts content on both audio and video, shouldn't
FFmpeg be able to use the timestamps provided? Why it seems that it starts
sending the audio before any video gets through?

I believe this did not happen using named pipes.


Thanks
João Bernardo


More information about the ffmpeg-user mailing list