Here are two videos created with Photoshop, sox, and ffmpeg

Photoshop handled the image sizing.

I wrote two scripts.

Both scripts maintain the proportions of the original image.

I ran the scripts on a folder of images using photoshop's batch processing command, resulting in two image sequences.

Make sure to give the images sequential names (img001.ext, img002.ext...).

ffmpeg handled the video processing and extracted some audio.

I built a video stream from a sequence of images.

Images must have sequential names.

The command:

ffmpeg -i img%03d.ext -b 4096 -r 5 -f webm out.webm

I trimmed a section from an audio file for use as an audio stream.

Trim a section lasting as long as the video.

The command:

ffmpeg -ss [beginning offset in seconds] -i audio.ext -t [length in seconds] out.wav

sox added a fade-in and fade-out to ffmpeg's audio stream output.

sox out.wav out-fade.wav fade t 00:00:02 00:00:12

ffmpeg muxed the whole thing together:

copied the video stream unchanged

ffmpeg -i out.webm -vcodec copy

converted the audio stream to Vorbis before multiplexing

ffmpeg -i out-fade -acodec libvorbis

all together:

ffmpeg -i out.webm -i out-fade.wav -vcodec copy -acodec libvorbis out-final.webm

Links to the videos, which open in a floating, browser-based player:

Full frame by crop

Full frame by pad