I attempt to create a video slideshow from a number of image files and an audio file in 2 steps:
- Create a temporary video file from a sequence of image files
- Add an audio file to the temporary video file with a delay of 5 seconds
The audio file is an uncompressed stereo wav file, encoded with a sample rate of 44100 Hz and a bit depth of 32 bits, with a size of 40.1 MB. To preserve the lossless quality of the input audio file I use the option -c:a aac -b:a 192k as per Slideshow Wiki. However, the final output video file has a size of only 4.49 MB.
How can the output video file be about 10 times smaller than the input audio file and still preserve the original lossless quality?
My code:
ffmpeg -f concat -i slide-sequence.txt -c:v libx264 -r 30 -filter_complex format=yuv420p temp.mp4
ffmpeg -i temp.mp4 -i audio.wav -af "adelay=5000|5000" -c:v copy -c:a aac -b:a 192k out.mp4