ffmpeg -i 1mp4 -i 2mp4 -i logopng -filter_complex 0vscale=7201280v0; 1vscale=7201280v1; v02voverlay=1010v0_watermark; v12voverlay=main_w-overlay_w-10main_h-overlay_h-10v1_watermark; v0_watermarkv1conc
This command uses the ffmpeg tool to combine two video files (1.mp4 and 2.mp4) and add a logo (logo.png) to each video.
The -filter_complex option specifies the video filtergraph, which is used to apply various video filters to the input videos.
First, the scale filter is applied to each input video to resize them to 720x1280 resolution.
Then, the overlay filter is used to add the logo to each video. The logo is positioned at the top-left corner of the first video and at the bottom-right corner of the second video.
Finally, the concat filter is used to combine the two videos into one output file. The n=2 option specifies that two input streams are being concatenated, and v=1 and a=0 specify that only video is included in the output file.
The -map option specifies which streams to include in the output file. In this case, only the concatenated video stream is included.
The output file is named output.mp4.
原文地址: https://www.cveoy.top/t/topic/bsTR 著作权归作者所有。请勿转载和采集!