How to transcode a video to H.264 baseline using ffmpeg

The following command will transcode a video to H.264 baseline using ffmpeg:

ffmpeg -i input.mp4 -threads 8 -c:v libx264 -profile:v baseline -level:v 4.0 -c:a copy baseline.mp4