I am a new user to FFMpeg.
I want a command-line that will create a basic slideshow MP4 video from a folder of JPG and/or PNG images. The images are sourced from either digital cameras/smartphones or scanned photos (typically 600 dpi).
I have been partially successful so far by creating an input text file with a list of the image filenames from the folder with a "duration 2" command after each "file" statement to introduce a 2 second delay between each image.
ffmpeg -hide_banner -f concat -safe 0 -i MQSS_test-ffmpeg.Txt -c:v libx264 -r 30 -pix_fmt yuv420p MQSS_test-ffmpeg.mp4
I have noticed two strange behaviors.
Behavior #1: Incorrect orientation
All images in the MP4 output file are rendered either in portrait or landscape orientation depending on the orientation of the first image. And because I have a mix of portrait and landscape images in the folder, the images that are rendered in the incorrect orientation are stretched or squashed. So if the first image is portrait, all images render as portrait. If the first image is landscape, all images are rendered as landscape.
Is there a way to get the images to render in their correct orientation?
Behavior #2: Can't mix image formats
I can't mix both JPG and PNG image files in the same input file. I receive several errors:
invalid data found when processing input can not process SOS before SOF, skipping unsupported coding type (ca)
However, if I separate the JPG and PNG files into separate JPG and PNG input files and run the separately, both image types render correctly.
Any ideas?