1

There are similar questions on SU, but I have one ADDITIONAL requirement along with merging the videos.

I need to have a 2 seconds (or whatever seconds) of black screen between two consecutive videos. I'm looking for a free tool like ImageMagik (but for videos) which can easily merge the videos along with that black screen thing.

P.S. I have YouTube videos in Mp4 (tutorial series it is).

What is the fastest method I can use?

Kushal
  • 1,315
  • 9
  • 25
  • 40

2 Answers2

3

Very simple, if these are only MP4 ones. Install MP4Box (comes for every OS).

Then, you can concatenate MP4 videos by using:

mp4box -cat video1.mp4 -cat video2.mp4 -cat … output.mp4

And you're done. Just add as many -cat video.mp4 as you want.


Batch processing is simple too. Let's say you have a file with the blank two seconds, called blank.mp4, and a list of your input files videos.txt

#!/bin/bash
command="mp4box"
while IFS= read -r line
do
    command="$command"" -cat $line -cat blank.mp4"
done < "videos.txt"
command="$command output.mp4"
echo $command
eval $command

Save it somewhere, give it execute permissions with chmod +x batch.sh, and execute it with ./batch.sh. Obviously, blank.mp4 needs to be in the same folder. But you could easily modify that behaviour.

slhck
  • 235,242
1

What kind of movies? Mpeg? AVI? FLV? Are you joining a bunch of Youtube Rips? It makes a difference.

For example, here is mpgtx, a simple command line tool that, among other things, joins mpeg video clips. It doesn't work with AVI or other movie file types. So, it would be useless for what you want to do. Thus,, I have no idea if suggesting it to you will work... since I don't know what kind of file type your movie clips are.

Maybe AviDemux is more of what you need. It doesn't operate from a command line, but it does handle a wider range of movie types and it can be automated using projects, a task queue and scripts. Which would mean joining a batch of movie clips, and telling it to add 2 seconds of nothing in between each would not be outside of it's range.

At any rate, Videohelp.com is your friend, as it is a website dedicated to providing it's visitors with everything video... and audio. Editing, that is.

Bon Gart
  • 13,100