user19918: ffmpeg -i "a.mov" -i "b.mp4" -filter_complex "[0:v]setsar=sar=${SAR}[a];  [1:v]setsar=sar=${SAR}[b]; [a][0:a] [b][1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -preset veryfast -crf 18 "merged.mp4"
using the above code I am able to successfully merge a.mov(1920x816) with b.mov(1920x816).  However, Youtube end screens require video to be 16:9 aspect ratio. Thus I tried scale filter and setting SAR to 16:9. however this leads to the output video stretching to fit the 16:9 ratio. 
How can I output a video with 16:9 ratio with the actual video with resolution 1920x816. Essentially The remaining vertical space should just be black without stretching the 816 height video to fit the 1080 height.  

user1871: Have you tried uploading it to Youtube? Their player window will be a fixed 16:9 ratio (on YT.com), but they should accept source videos of any ratio, and simply center it in their window during playback.
Anyway, here's the method:
ffmpeg -i "a.mov" -i "b.mp4" -filter_complex "[0:v]scale=iw*sar:ih,pad=if(gt(dar,16/9),iw,2*trunc(ih*16/9/2)):if(gt(dar,16/9),2*trunc(iw*9/16/2),ih):(ow-iw)/2:(oh-ih)/2,setsar=1[a];  [1:v]scale=iw*sar:ih,pad=if(gt(dar,16/9),iw,2*trunc(ih*16/9/2)):if(gt(dar,16/9),2*trunc(iw*9/16/2),ih):(ow-iw)/2:(oh-ih)/2,setsar=1[b];
[a][0:a] [b][1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -preset veryfast -crf 18 "merged.mp4

19918: <p><code>ffmpeg -i "a.mov" -i "b.mp4" -filter_complex "[0:v]setsar=sar=${SAR}[a];  [1:v]setsar=sar=${SAR}[b]; [a][0:a] [b][1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -preset veryfast -crf 18 "merged.mp4"</code></p>

<p>using the above code I am able to successfully merge a.mov(1920x816) with b.mov(1920x816).  However, Youtube <code>end screens</code> require video to be <code>16:9 aspect ratio.</code> Thus I tried scale filter and setting SAR to <code>16:9</code>. however this leads to the output video stretching to fit the <code>16:9 ratio</code>. </p>

<p>How can I output a video with <code>16:9</code> ratio with the actual video with resolution <code>1920x816</code>. Essentially The remaining vertical space should just be black without stretching the <code>816</code> height video to fit the <code>1080</code> height.  </p>
 1871: <p>Have you tried uploading it to Youtube? Their player window will be a fixed 16:9 ratio (on YT.com), but they should accept source videos of any ratio, and simply center it in their window during playback.</p>

<p>Anyway, here's the method:<br>
<code>ffmpeg -i "a.mov" -i "b.mp4" -filter_complex "[0:v]scale=iw*sar:ih,pad=if(gt(dar,16/9),iw,2*trunc(ih*16/9/2)):if(gt(dar,16/9),2*trunc(iw*9/16/2),ih):(ow-iw)/2:(oh-ih)/2,setsar=1[a];  [1:v]scale=iw*sar:ih,pad=if(gt(dar,16/9),iw,2*trunc(ih*16/9/2)):if(gt(dar,16/9),2*trunc(iw*9/16/2),ih):(ow-iw)/2:(oh-ih)/2,setsar=1[b];
[a][0:a] [b][1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" -preset veryfast -crf 18 "merged.mp4</code></p>
