Actually, I found a better way to do this, ffmpeg has newish video filtering functionality which is very complicated but very powerful. The command I'm using now looks more like this:

./ffmpeg -i mobile1a.mp4 -i mobile2a.mp4 -i mobile3a.mp4 -y -filter_complex '[0:0] setsar=1/1[sarfix];[sarfix] [1:0] concat=n=2:v=1:a=0 [v]' -map '[v]' -an output.mp4