[FFmpeg-user] Can't synchronize two webcam streams side by side using ffmpeg

Carl Eugen Hoyos ceffmpeg at gmail.com
Sat Dec 3 18:59:47 EET 2016


2016-12-03 16:14 GMT+01:00 bob Darkblue <darkbluewonderfulworld at gmail.com>:
>>> [0:v] setpts=PTS-STARTPTS,
>>> [1:v] setpts=PTS-STARTPTS,
>
>>Isn't this making sure that the two streams are not synchronised?
> I copy pasted it from
> https://trac.ffmpeg.org/wiki/Create%20a%20mosaic%20out%20of%20several%20input%20videos
>
> I don't understand it quite well but it should take care of the little
> difference in start time between :
> Input #0, video4linux2,v4l2, from '/dev/video1':
>   Duration: N/A, start:* 858.256014*, bitrate: N/A
>  ...
> Input #1, video4linux2,v4l2, from '/dev/video0':
>   Duration: N/A, start:* 858.878636*, bitrate: N/A

It "takes care" insofar as it removes any difference
from the timestamps of the two streams.

> I've also tried to remove the option and also tried with setpts=PTS but
> there is still a ~1s synchronization issue.

Please also try the hstack video filter.

Carl Eugen


More information about the ffmpeg-user mailing list