stitch rawvideo with ffmpeg - Picture size 0x0 is invalid
rawvideo has no metadata so you have to supply all parameters. Since your input is mjpeg (edit: sequence), just keep it as that.

ffmpeg -f image2pipe -vcodec mjpeg -i - -c copy -f mjpeg part_N


Generate a text file like this

file part_0
file part_1
file part_2
...
file part_N


and then

ffmpeg -f concat -safe 0 -r 30 -i list.txt output.mp4


here -r is the desired framerate. Default is 25.