E
E
estry2021-01-27 13:39:02
fmpeg
estry, 2021-01-27 13:39:02

How to merge two or three videos and apply ffmpeg watermark?

Hello. Using ffmpeg to splice videos (main videos + previews) and apply a watermark?
Now I do this:
1) if video 1|video 2|video 3 is not in mp4, then first I convert it to mp4, then to ts
2) if the preview is not in *.ts, then I make it ts, like all videos from p .one. Here is the command
-i video1.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts video1.ts
3) I merge 2 videos using the command
-i "concat:video1.ts|video2.ts" -c copy -bsf:a aac_adtstoasc output.mp4

As you can see, there are a lot of actions here. Don't throw stones. But it hasn't worked out for me so far.

How can you do everything with one command on the fly - peck a video, set up a watermark?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2021-01-27
@estry

Slowly not run a few commands, but slowly recode.
There are several ways to splice videos that require the same format of the component parts.
Your way seems to be the best. Gluing through -i "concat:video1.ts|video2.ts" -c copyis very fast.

first I translate to mp4, then to ts
these two actions should be one (see the link above):

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question