[FFmpeg-user] Unable to sync audio and video
Nicolas George
george at nsup.org
Wed Feb 17 15:19:51 EET 2021
Livio Tenze (12021-02-17):
> No, it is not, because the audio and the video streams come from two
> different sources: one webcam and an external microphone. The starting PTS
Different sources do not mean different timestamps origins. In fact, you
NEED the same timestamps origin if you want to sync.
> values are different for two audio and video sources. How should I get the
> same origin with this configuration? Please suggest how to treat this case.
Ideally, the documentation of the device you are using should be stating
it. For example:
http://ffmpeg.org/ffmpeg-all.html#video4linux2_002c-v4l2
"Depending on the kernel version and configuration, the timestamps may
be derived from the real time clock (origin at the Unix Epoch) or the
monotonic clock (origin usually at boot time, unaffected by NTP or
manual changes to the clock)."
Unfortunately this is rather the exception than the norm.
If the documentation does not say it, then you need to experiment:
actually look at the timestamps, look at at the actual time when you
capture, do some arithmetic to find the origin, and try to guess what it
corresponds to.
And then propose a patch to document the origin of timestamps for that
particular device.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-user/attachments/20210217/3d25a5ce/attachment.sig>
More information about the ffmpeg-user
mailing list