Livio Tenze (12021-02-17): > > That should work, provided you checked that your timestamps relate to > > the same origin. If some timestamps relate to the system boot and some > > to 1970-01-01, you will get a desync. > > The timestamp I am currently using is related to the pts obtained from the > AVPacket packets: I use the first PTS packet as reference. Is it a right > approach for syncing?
It is the only right approach. But you have not answered the question: have you checked that the timestamps of both streams are relative to the same origin? > I haven't found info about this issue: does the av_read_frame call return > always the latest acquired packet or does it return a buffered packet? I > haven't found this info. The question is related to real-time acquisition. av_read_frame() will not skip packets. A device driver may skip data, but you should try to avoid it at all costs. > Ok, thank you for this suggestion. Do you suggest to use one thread for > every source and one thread for encoding? Is it a good approach in your > opinion? For devices, running each in its own thread is probably the most reliable solution. At least until we have a proper event loop. Regards, -- Nicolas George
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
