ffmpeg returning blank video upon concat

  editing, ffmpeg, pycharm, python, windows

I’m trying to combine an audio and image file into a single .mp4 file that plays for the duration of the audio.

This is my code:

import ffmpeg

audio = r'D:Reddit BotContentjuiceaudio_1.mp3'
image = r'D:Reddit BotContentjuicecomment_1.png'
save = r'D:Reddit BotContentjuicecombined_1.mp4'

input_still = ffmpeg.input(image)
input_audio = ffmpeg.input(audio)

(ffmpeg
 .concat(input_still, input_audio, v=1, a=1)
 .output(save)
 .run(overwrite_output=True)
 )

However, the resulting .mp4 file is audio only (and has a resolution of 1072×1920 as oppose to the image file’s ratio of 1080×1920??)

Any help is appreciated, thanks.

Source: Windows Questions

One Reply to “ffmpeg returning blank video upon concat”

LEAVE A COMMENT