<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="monospace, monospace">Hi</font><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">I forgot to speak about the timebases in use, and those are important in this case.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">For my two inputs, after decoding, my AVCodecContexts have the following framerates and timebases:</font></div><div><font face="monospace, monospace">in0 => 30/1, 1/60</font></div><div><font face="monospace, monospace">in1 => 359/12, 6/359      // Well this is not exactly 30fps, but close.</font></div><div><font face="monospace, monospace">The common selected timebase by the framesync filter is 1/21540.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Here are some of the ptss feeded to the filter:</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><div>in0: pts in original tb: 16(1/60), pts in tb used by framesync: 5744</div></font><font face="monospace, monospace"><div>in0: pts in original tb: 18(1/60), pts in tb used by framesync: 6462</div></font><font face="monospace, monospace"><div>in0: pts in original tb: 20(1/60), pts in tb used by framesync: 7180</div></font><font face="monospace, monospace"><div>in0: pts in original tb: 22(1/60), pts in tb used by framesync: 7898</div></font><font face="monospace, monospace"><div>in0: pts in original tb: 24(1/60), pts in tb used by framesync: 8616</div></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><div>in1: pts in original tb: 17(6/359), pts in tb used by framesync: 6120</div></font><font face="monospace, monospace"><div>in1: pts in original tb: 19(6/359), pts in tb used by framesync: 6840</div></font><font face="monospace, monospace"><div>in1: pts in original tb: 21(6/359), pts in tb used by framesync: 7560</div></font><font face="monospace, monospace"><div>in1: pts in original tb: 23(6/359), pts in tb used by framesync: 8280</div></font><font face="monospace, monospace"><div>in1: pts in original tb: 25(6/359), pts in tb used by framesync: 9000</div></font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">The ptss of the two inputs are interleaved and that is why the vstack filter triggers twice.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Another possible solution to my problem would be to force the timebases to 1/framerate, this would prevent the interleaving of the frames, something like this:</font></div><div><div><font face="monospace, monospace">"</font></div><div><font face="monospace, monospace"> [in0]format=pix_fmts=yuv420p,scale=-1:540,settb=expr=1/30[s0];</font></div><div><font face="monospace, monospace"> [in1]format=pix_fmts=yuv420p,scale=-1:540,settb=expr=1/30[s1];</font></div><div><font face="monospace, monospace"> [s0][s1]vstack[stacked];</font></div><div><font face="monospace, monospace"> [stacked]pad=1920:1080:(ow-iw)/2:0[out0]</font></div><div><font face="monospace, monospace">"</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Would this work? Is there a better, more general approach of solving this problem.</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">For inputs with different framerates my plan is to select the greatest and use that, something like this:</font></div><div><div><font face="monospace, monospace">"</font></div><div><font face="monospace, monospace"> [in0]format=pix_fmts=yuv420p,scale=-1:540,settb=expr=1/greatestFps,</font><span style="font-family:monospace,monospace">fps=fps=</span><span style="font-family:monospace,monospace">greatestFps</span><span style="font-family:monospace,monospace">[s0];</span></div><div><font face="monospace, monospace"> [in1]format=pix_fmts=yuv420p,scale=-1:540,settb=expr=1/</font><font face="monospace, monospace">greatestFps,</font><span style="font-family:monospace,monospace">fps=fps=</span><span style="font-family:monospace,monospace">greatestFps</span><font face="monospace, monospace">[s1];</font></div><div><font face="monospace, monospace"> [s0][s1]vstack[stacked];</font></div><div><font face="monospace, monospace"> [stacked]pad=1920:1080:(ow-iw)/2:0[out0]</font></div><div><font face="monospace, monospace">"</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">Thanks.</font></div></div></div></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
</blockquote></div></div>