Тёмный

How to concatenate two videos using FFmpeg? 

Learn with Monir
Подписаться 1,4 тыс.
Просмотров 6 тыс.
50% 1

Опубликовано:

 

2 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 30   
@solveiteasy1795
@solveiteasy1795 4 месяца назад
I already follow ffmpeg -f concat -i drone-shots.txt -c copy output.mp4 but the result, sound of output video very slow, it not keep same with original sound.
@mzmnbd
@mzmnbd 4 месяца назад
i understand. can you check what is the codec and bitrate for audio in each file? if they are not same, then instead of copying codec, reencode the video, this should resolve the issue
@overcrumbled
@overcrumbled Год назад
I've never used ffmpeg before, but this tutorial is brilliant. Nice and easy to follow compared to other videos that are unnecessarily complicated!
@mzmnbd
@mzmnbd Год назад
thank you so much ♥️
@Ulibert
@Ulibert Год назад
how about doing this on google drive video files and merge it please make tutorial using google colab on it
@mzmnbd
@mzmnbd Год назад
nice question, but I have no idea on this, let me know if you find anything.
@MicheleAlbano
@MicheleAlbano 2 месяца назад
Hi, congratulations for the simplicity in describing the process of concatenating even different videos. A question... I have two 360° videos in mov format can I use the ffmpeg command or do I necessarily have to convert them to Mp4? There are converters that when they convert from mov to mp4 make the video no longer 360. thanks
@mzmnbd
@mzmnbd 2 месяца назад
Yes, you can
@MicheleAlbano
@MicheleAlbano 2 месяца назад
@@mzmnbd Can you write me the command line?
@mzmnbd
@mzmnbd 2 месяца назад
@@MicheleAlbano sorry about that. could you try using chat gpt?
@RomanianProductions
@RomanianProductions 6 месяцев назад
I get “non-monotonic dts” and even without -c the video doesn’t play correctly
@mzmnbd
@mzmnbd 5 месяцев назад
Thanks for your comment! The 'non-monotonic dts' error can occur due to timestamp issues. Try adding '-fflags +genpts' before the input files in your ffmpeg command to fix it. Let me know if that helps!
@jagag7716
@jagag7716 7 месяцев назад
but i got output too much length 26:57:29 input file1 00:21:30 input file2 00:03:20 how to solve this error
@mzmnbd
@mzmnbd 5 месяцев назад
It seems like the output duration is longer than expected. This might happen due to incorrect input durations or incorrect concatenation settings. Make sure the durations of your input files are accurately specified in the ffmpeg command. You can also try explicitly setting the output duration using the '-t' option followed by the desired duration. Let me know if you need further clarification!
@noskillnochill
@noskillnochill Год назад
Thank you so much! great tutorial, exactly what I needed to know.
@mzmnbd
@mzmnbd Год назад
thank you so much for saying that
@jitendrachouhan7024
@jitendrachouhan7024 2 года назад
How to use ffmpeg in server (cloud computing)
@mzmnbd
@mzmnbd 2 года назад
you can wrap it with other programming language or just run the command with a server side programming language
@Sequoyas
@Sequoyas Год назад
if i have 3 video files with the same codec, arguments, and extra arguments does it keep them in the output file
@mzmnbd
@mzmnbd Год назад
When concatenating multiple video files using FFmpeg, the codec, resolution, and other parameters of the input files must be consistent for the output file to be playable. If the input files all have the same codec and resolution, and you are using the same arguments and extra arguments for all the input files, then it is likely that the output file will be playable. To concatenate multiple video files using FFmpeg, you can use the concat filter. The basic syntax is as follows: ffmpeg -i file1.mp4 -i file2.mp4 -i file3.mp4 -filter_complex "[0:v][0:a][1:v][1:a][2:v][2:a]concat=n=3:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" output.mp4 This command will take 3 video files file1.mp4, file2.mp4 and file3.mp4 and concatenate them in to a single output file output.mp4. In this command, n=3 specifies the number of input files to be concatenated, v=1 specifies that the video streams should be concatenated and a=1 specifies that the audio streams should be concatenated. It's important to note that, if the input video files have different codecs, resolutions, or other parameters, FFmpeg will not be able to concatenate them directly. You would have to re-encode the input files to match the codec, resolution, and other parameters of one of the input files. Also, when concatenating video files, it is important to ensure that the video and audio streams are correctly aligned so that the final output file is in sync.
@adarshranjan2935
@adarshranjan2935 2 года назад
Dada, What's the meaning of " -f" in this command ffmpeg -f concat -i drone-shots.txt -c copy output.mp4???
@mzmnbd
@mzmnbd 2 года назад
-f means flag, which is to concatenate in this scenario thanks for being a regular watcher of my videos
@danielparga7154
@danielparga7154 Год назад
Great video thank you!
@mzmnbd
@mzmnbd Год назад
Glad you liked it!
@ansorisaputra9751
@ansorisaputra9751 8 месяцев назад
brother.. how remove bg music, but keep voice in video music? code ffmpeg plase?
@mzmnbd
@mzmnbd 8 месяцев назад
use splitter. ai
@ansorisaputra9751
@ansorisaputra9751 8 месяцев назад
if make code ffmpeg brother?@@mzmnbd
@spicysoda318
@spicysoda318 Год назад
thx
@mzmnbd
@mzmnbd Год назад
you are welcome
Далее
FFMPEG Add Audio to Video - Single and Multitrack
12:03
FFMPEG Tutorial: Trim Videos without Re-encoding
10:24
Просмотров 1,3 тыс.
#kikakim
00:10
Просмотров 12 млн
The basics of FFMPEG | DenshiHelp
10:36
Просмотров 13 тыс.
Lossless Video Trimming with FFmpeg
7:09
Просмотров 8 тыс.
FFmpeg for Screencasts and Recording 📹
11:55
Просмотров 9 тыс.
How to use FFMPEG
12:49
Просмотров 656 тыс.