Change $file to the file you wanta to convert and $file-h264 is the name of the converted file.
ffmpeg -i $file -c:v libx264 -profile:v high -preset slow -tune -film -crf 18 $file-h264.mp4
Of course you can adapter the -c:v libx264 to any other format you might want.
Here is a handy script to mass convert to h264:
for file in `ls *.mp4`; do
echo ffmpeg -i $file -c:v libx264 -profile:v high -preset slow -tune -fil........
If you were in my boat you were frustrated that you had to double encode, eg. one separate encode for watermark and a separate from concat and it's not easy to figure out this with ffmpeg on your own. However it is a nice way to save time!
ffmpeg -i file1.mp4 -i file2.mp4 -i file3.mp4 -i watermark.png -filter_complex "[0:v]setpts=PTS-STARTPTS[v0]; [1:v]setpts=PTS-STARTPTS[v1]; [2:v]setpts=PTS-STARTPTS[v2]; [v0][0:a][v1][1:a][v2][2:a]concat=n=3:v=1:a=1[v][aout]; [v][3:........
When things go wrong your video is basically unplayable or the first video plays fine and then freezes when moving on to the next. Generally if both videos weren't produced with the exact 100% same settings you will have issues. You can try the basic concat but it often won't work right.
Solution for me:
My example uses 3 videos in total so "n=3" and a=1 to include audio.
ffmpeg -threads 12 -i file1.mp4 -........