0

I want to create a video from combination of all these files which includes single audio file, still image in background and multiple image frames at several times, i have achieved this with video file on this help Now i have tried a failure attempt to create audio with same approach. But got an error which is obvious because still lack of knowledge in FFMPEG

Following is my failure attempt with error Output with label 'v2' does not exist in any defined filter graph, or was already used elsewhere.

ffmpeg -y -loop 1 -i bg.jpg -i img/%07d.png -i dia.mp3 -c:v libx264 -tune stillimage -pix_fmt yuv420p -c:a aac -b:a 128k -shortest -vf "[0:v]scale=1280:1280:force_original_aspect_ratio=increase,crop=1280:1280[v1],[v1][2]overlay=10:10:enable='between(t,0,6)'[v2]" -map "[v2]" out.mp4 2>&1

llogan
  • 121,796
  • 28
  • 232
  • 243
rathodbhavikk
  • 416
  • 7
  • 20

1 Answers1

1

Use

ffmpeg -y -loop 1 -i bg.jpg -i img/%07d.png -i dia.mp3 -c:v libx264 -tune stillimage -pix_fmt yuv420p -c:a aac -b:a 128k -shortest -filter_complex "[0:v]scale=1280:1280:force_original_aspect_ratio=increase,crop=1280:1280[v1];[v1][1]overlay=10:10:enable='between(t,0,6)'" out.mp4 2>&1

The pad numbering is wrong, and there should be a semi-colon after the bg image scale.

Gyan
  • 85,394
  • 9
  • 169
  • 201
  • Now it receives error `was expected to have exactly 1 input and 1 output. However, it had >1 input(s) and 1 output(s). Please adjust, or use a complex filtergraph (-filter_complex) instead. Error reinitializing filters! Failed to inject frame into filter network: Invalid argument` – rathodbhavikk Mar 28 '19 at 14:59
  • 1
    @BhavikRathod Copy and paste Gyan's command, or use `-filter_complex` instead of `-vf` as shown in the answer and as described in your error message. – llogan Mar 28 '19 at 17:33