This is my code that i'm using to merge videos .
var_dump(shell_exec( "C:/ffmpeg/bin/ffmpeg.exe -f concat -safe 0 -i D:/xampp/htdocs/test/file.txt -c copy D:/xampp/htdocs/test/phpconcatenated.mp4 2>&1"));
But this code is working only when all videos is with same number of frames/second . and if frames per second are different for each other then it merge videos with only sounds with pause screen .