Hi! thanks for this info! i have a question: is it possible to program a list of concatenation to do? for exemple: i have 50 videos, and i want to merge each of them with the same intro video with my brand. do i have to do 50 times the same operation, or can i program it?
thanks!
You could definitely script it, just loop over each file in the directory where your videos are stored and run the same command
Could look something like this:
#! /usr/bin/env shdir=$1intro=$2out=$3for f in$dir/*.mp4
do
ffmpeg -i$intro-i$f-filter_complex"[0:v][0:a][1:v][1:a]concat=n=2:v=1:a=1[outv][outa]"-map"[outv]"-map"[outa]""$out/$(basename$f)"done
I just whipped that up real fast and not sure if it works 100% but the idea is that it will:
Loop over all the files with .mp4 file extensions in the given directory
Run an ffmpeg command that use as inputs, the file given as the argument for the intro and the file of the current iteration of the loop, and write the newly combined version to a given directory
Thanks for your quick answer! sorry buy i'm a beginner with programming and ffmpeg and this programm would make me win a lot of time! i have a question concerning concatenation:
i have two files
1-video1 is an intro: mp4 file, 1280x720, 25 fps, with only one stream (only video, no audio)
2-video2: mp4 file, 1920x1080, 25 fps
i would like to change video2 resolution to 1280x720, and then concatenate video1 and the new video2.
is there a way to do that in one command?
thanks!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi! thanks for this info! i have a question: is it possible to program a list of concatenation to do? for exemple: i have 50 videos, and i want to merge each of them with the same intro video with my brand. do i have to do 50 times the same operation, or can i program it?
thanks!
You could definitely script it, just loop over each file in the directory where your videos are stored and run the same command
Could look something like this:
I just whipped that up real fast and not sure if it works 100% but the idea is that it will:
Thanks for your quick answer! sorry buy i'm a beginner with programming and ffmpeg and this programm would make me win a lot of time! i have a question concerning concatenation:
i have two files
1-video1 is an intro: mp4 file, 1280x720, 25 fps, with only one stream (only video, no audio)
2-video2: mp4 file, 1920x1080, 25 fps
i would like to change video2 resolution to 1280x720, and then concatenate video1 and the new video2.
is there a way to do that in one command?
thanks!