[FFmpeg-user] Live lipsync from different inputs and RTCSTART in (a)setpts
Vilnis Bicevskis
vilnis.bicevskis1 at gmail.com
Tue Jan 14 11:36:14 EET 2025
>
> Le 13 janv. 2025 à 19:03, Gyan Doshi <ffmpeg at gyani.pro> a écrit :
>
>
>
>> On 2025-01-13 08:39 pm, Vilnis Bicevskis wrote:
>> Or wallclock time value passed from input to setpts filter?
>
> For each input, you can add `-use_wallclock_as_timestamps true`
Unfortunatelly that didn’t solve the problem for me.
As there are some 127 msec difference between intitialisation of video and audio, this difference is kept onwards ending video always having some 3-4 frames in buffer and thus being guilty for some 3-4 frame large lip-sync error.
You can see that in logs where in “demuxer+ffmpeg” lines pkt_pts and pkt_pts_time are aligned, but in “demuxer” lines there is this > 120 msec difference in pkt_pts between audio and video.
Any ideas how to overcome that?
Relevant log lines:
1736836667.268472 test04 stream[975228]: demuxer -> ist_index:2 type:audio next_dts:1638396 next_dts_time:1.6384 next_pts:1638396 next_pts_time:1.6384 pkt_pts:1736836667264586 pkt_pts_time:1.73684e+09 pkt_dts:1736836667264586 pkt_dts_time:1.73684e+09 duration:85333 duration_time:0.085333 off:-1736836665630634 off_time:-1.73684e+09 start_time:NOPTS
1736836667.268528 test04 stream[975228]: demuxer+ffmpeg -> ist_index:2 type:audio pkt_pts:1633952 pkt_pts_time:1.63395 pkt_dts:1633952 pkt_dts_time:1.63395 duration:85333 duration_time:0.085333 off:-1736836665630634 off_time:-1.73684e+09
1736836667.270123 test04 stream[975228]: demuxer -> ist_index:1 type:video next_dts:1600019 next_dts_time:1.60002 next_pts:1600019 next_pts_time:1.60002 pkt_pts:1736836667102651 pkt_pts_time:1.73684e+09 pkt_dts:1736836667102651 pkt_dts_time:1.73684e+09 duration:40000 duration_time:0.04 off:-1736836665502741 off_time:-1.73684e+09 start_time:NOPTS
1736836667.270264 test04 stream[975228]: demuxer+ffmpeg -> ist_index:1 type:video pkt_pts:1599910 pkt_pts_time:1.59991 pkt_dts:1599910 pkt_dts_time:1.59991 duration:40000 duration_time:0.04 off:-1736836665502741 off_time:-1.73684e+09
1736836667.273893 test04 stream[975228]: demuxer -> ist_index:1 type:video next_dts:1639910 next_dts_time:1.63991 next_pts:1639910 next_pts_time:1.63991 pkt_pts:1736836667102651 pkt_pts_time:1.73684e+09 pkt_dts:1736836667142678 pkt_dts_time:1.73684e+09 duration:40000 duration_time:0.04 off:-1736836665502741 off_time:-1.73684e+09 start_time:NOPTS
1736836667.273893 test04 stream[975228]: demuxer+ffmpeg -> ist_index:1 type:video pkt_pts:1639937 pkt_pts_time:1.63994 pkt_dts:1639937 pkt_dts_time:1.63994 duration:40000 duration_time:0.04 off:-1736836665502741 off_time:-1.73684e+09
Regards,
Vilnis
> Regards,
> Gyan
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
More information about the ffmpeg-user
mailing list