This is a code / argument I use to merge 1 audio and 1 image into 1 video. For some reason it adds 30s silence to the end of output video no matter the source.
I run this on Win10 x64, with latest ffmpeg installed.
I have checked the code but cannot identify where it makes the silence.
ffmpeg -y -loop 1 -framerate 2 -i "some.png" -i "with.mp3"
-c:v libx264 -tune stillimage -c:a aac -b:a 192k -pix_fmt yuv420p -shortest "result.mkv"
The output should not conatin the additional 30s of silence. It should end when audio runs out.
I should add that I copied most of the arguments from some website, and that OP seems to use it just fine, so I'm not sure if this is just my problem.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…