ffmpeg: final video too big I have one image ~1MB (jpg) and a ~30 mins audio file ~7MB (m4a).

What I am trying to get is a final video that lasts like the audio file (30 mins) with the same image displayed. I get that with the following ffmpeg usage:

ffmpeg -loop 1 -i image.jpg -i audio.m4a -c:v copy -c:a copy -shortest -y video.mp4


The final result is correct but the size of the file is way far too big ~41GB as we consider the original size of the 2 files (image+audio ~8MB).

Is there a way to get a smaller size for the final video? I have used -r 1, -vf fps=1 etc but it didn't change.

EDIT

Following your suggestions I have changed the command into this:

ffmpeg -loop 1 -r 1 -i image.jpg -i audio.m4a -c:a copy -vf fps=1 -shortest -y video.mp4


and now the  final video size is dropped from 41GB to only 22MB and it built all in 2 mins.

Anyway it comes out a new issue: The image appears after 3/4 seconds that video is started. How can I fix that to have the image displayed from the beginning?

I think the solution for the delay is using fps=3.
Just remove -c:v copy. So it should look like this:

ffmpeg -loop 1 -i image.jpg -i audio.m4a -c:a copy -shortest -y video.mp4


ffmpeg will select H.264 encoder to encode your image. You could also try -c:v libx264 -tune stillimage option. But probably the result will be similar.