Convert ppm to mp4 using ffmpeg

Description:

I use a supercomputer to generate PPM(Portable Pixmap Format) high resolution image flows for simulation results. Convert it to a mp4 movie is desirable because the mp4 file is small and plays automatically when opened. ffmpeg is a very powerful tool to convert image/video format, but its commad parameters are very cumbersome. Here is the ffmpeg command to generate the mp4 file.

Command

1
ffmpeg -f(convert format) image2pipe(ppm figures to stream pipe) -vcodec(the decoder) ppm -i(input file) movie.mp4.ppm -vf(the video format) "scale=1024(don't be too large):-1(keep the aspect ratio), format=yuv420p(a color scheme different from RGB)" movie.mp4(the destination file)