Let's say you have a photo and you want to convert it into a video.
We'll assume here that you want a 5-minute video, and that your photo
file is named "Babyface", your audio file is named "Lovely", and the
video file will be named "Thriller".
First install FFmpeg using these two commands:
sudo apt-get update
sudo apt-get install ffmpeg
You can now use the command below to create the video.
ffmpeg -loop 1 -i Babyface.jpg -i Lovely.mp3 -c:v libx264 \
-tune stillimage -c:a aac -b:a 192k \
-vf "scale='iw-mod(iw,2)':'ih-mod(ih,2)',format=yuv420p" \
-shortest -movflags +faststart Thriller.mp4
The scale filter example is a fancy way of making the width and height to be
divisible by 2 which is needed for this particular encoder when
outputting YUV 4:2:0 (4:2:2 and 4:4:4 are not supported by most
players, so that is why you see so many examples using yuv420p). A
simpler method is to crop or scale like crop=550:764, but the above
command will work with any input size.