user40515: I am trying to add two overlays using ffmpeg as below:
[v0][1:v] overlay=21:24:enable='between(t,0.000, 1.135)' [v1];
[v1][2:v] overlay=120:24:enable='between(t,0.000, 1.135)' " 

These two images [1:v] and [2:v] are below pngs:


The first png is 99px wide and I want to place it on x=21
The second png I want to place right behind the first one x=21+99=120
But I am getting the output as below: It seems that there is 1px gap between them and I have no idea where is it coming from.

How can I ensure it is pixel perfect and there is no gap?
Also I noticed that if the image is 98px and I use:
[v0][1:v] overlay=21:24:enable='between(t,0.000, 1.135)' [v1];
[v1][2:v] overlay=119:24:enable='between(t,0.000, 1.135)' " 

then suprisingly it is fine, same for 100px wide and next images x=121
The whole command to give more context (remove newlines to execute):
.\bin\ffmpeg.exe -ss 0 -to 5.681 
-i C:\Users\Radoslaw\Videos\ttt.mp4 
-i .\tempAssets\player1.png 
-i .\tempAssets\serving.png 
-filter_complex 
[0:v] select='between(t,1.247,2.550)+between(t,4.181,5.681)', setpts='PTS-STARTPTS-((gt(T,2.550)*1.630))/TB' [v0]; 
[0:a] aselect='between(t,1.247,2.550)+between(t,4.181,5.681)', asetpts='PTS-STARTPTS-((gt(T,2.550)*1.630))/TB'; 
[v0][1:v] overlay=21:21:enable='between(t,0.000, 2.803)' [v1];
[v1][2:v] overlay=120:21:enable='between(t,0.000, 2.803)' 
Untitled.mp4

@Gyan your answer helped for the mentioned simple scenario but if I change the order:
[v0][2:v] overlay=120:24:enable='between(t,0.000, 1.135)':format=auto,format=yuv444p [v1];
[v1][1:v] overlay=21:24:enable='between(t,0.000, 1.135)' " 

then I get the 1px gap again. Any suggestions?

user1871: Change base video to full chroma sampling and try.
[0:v] select='between(t,1.247,2.550)+between(t,4.181,5.681)', setpts='PTS-STARTPTS-((gt(T,2.550)*1.630))/TB',format=yuv444p[v0];
and
[v0][1:v] overlay=21:21:enable='between(t,0.000, 2.803)':format=auto,format=yuv444p [v1];
[v1][2:v] overlay=120:21:enable='between(t,0.000, 2.803)'


40515: <p>I am trying to add two overlays using ffmpeg as below:</p>
<pre><code>[v0][1:v] overlay=21:24:enable='between(t,0.000, 1.135)' [v1];
[v1][2:v] overlay=120:24:enable='between(t,0.000, 1.135)' &quot; 
</code></pre>
<p>These two images [1:v] and [2:v] are below pngs:</p>
<p><a href="https://i.stack.imgur.com/kXIua.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kXIua.png" alt="enter image description here" /></a>
<a href="https://i.stack.imgur.com/BFXBf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BFXBf.png" alt="enter image description here" /></a></p>
<p>The first png is 99px wide and I want to place it on x=21</p>
<p>The second png I want to place right behind the first one x=21+99=120</p>
<p>But I am getting the output as below: It seems that there is 1px gap between them and I have no idea where is it coming from.</p>
<p><a href="https://i.stack.imgur.com/IinpP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IinpP.png" alt="enter image description here" /></a></p>
<p>How can I ensure it is pixel perfect and there is no gap?</p>
<p>Also I noticed that if the image is 98px and I use:</p>
<pre><code>[v0][1:v] overlay=21:24:enable='between(t,0.000, 1.135)' [v1];
[v1][2:v] overlay=119:24:enable='between(t,0.000, 1.135)' &quot; 
</code></pre>
<p>then suprisingly it is fine, same for 100px wide and next images x=121</p>
<p>The whole command to give more context (remove newlines to execute):</p>
<pre><code>.\bin\ffmpeg.exe -ss 0 -to 5.681 
-i C:\Users\Radoslaw\Videos\ttt.mp4 
-i .\tempAssets\player1.png 
-i .\tempAssets\serving.png 
-filter_complex 
[0:v] select='between(t,1.247,2.550)+between(t,4.181,5.681)', setpts='PTS-STARTPTS-((gt(T,2.550)*1.630))/TB' [v0]; 
[0:a] aselect='between(t,1.247,2.550)+between(t,4.181,5.681)', asetpts='PTS-STARTPTS-((gt(T,2.550)*1.630))/TB'; 
[v0][1:v] overlay=21:21:enable='between(t,0.000, 2.803)' [v1];
[v1][2:v] overlay=120:21:enable='between(t,0.000, 2.803)' 
Untitled.mp4
</code></pre>
<p>@Gyan your answer helped for the mentioned simple scenario but if I change the order:</p>
<pre><code>[v0][2:v] overlay=120:24:enable='between(t,0.000, 1.135)':format=auto,format=yuv444p [v1];
[v1][1:v] overlay=21:24:enable='between(t,0.000, 1.135)' &quot; 
</code></pre>
<p>then I get the 1px gap again. Any suggestions?</p>
 1871: <p>Change base video to full chroma sampling and try.</p>
<p><code>[0:v] select='between(t,1.247,2.550)+between(t,4.181,5.681)', setpts='PTS-STARTPTS-((gt(T,2.550)*1.630))/TB',format=yuv444p[v0];</code></p>
<p>and</p>
<pre><code>[v0][1:v] overlay=21:21:enable='between(t,0.000, 2.803)':format=auto,format=yuv444p [v1];
[v1][2:v] overlay=120:21:enable='between(t,0.000, 2.803)'
</code></pre>
