User Tools

Site Tools


informatique:divers:ffmpeg

This is an old revision of the document!


ffmpeg

Merge videos

https://superuser.com/questions/1039678/merge-multiple-video-with-ffmpeg-single-command-line-in-specific-time-without-cu

Use the concat demuxer.

First, create a text file with the filenames.

file '1.mp4'
file '2.mp4'
file '3.mp4'
...
file '13.mp4'
file '14.mp4'
file '15.mp4'

Then, run the concat command.

ffmpeg -f concat -i textfile -c copy -fflags +genpts merged.mp4

For this to work, all videos should have same properties such as codec, resolution, framerate, sample rate, etc.

If they are not, you can encode the concat.

ffmpeg -f concat -i textfile -fflags +genpts merged.mp4

Extraire audio

ffmpeg -i Spirited\ \(2022\).mkv -ss 01:03:53 -t 00:04:06.0 -q:a 0 -map 0:a:0 bonsoir-chez-vous_2.mp3

Convertir h265 to h264

La commande suivante n'a pas fonctionné mais je n'ai pas cherché plus que cela…

ffmpeg -i S01E01.mkv -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy S01E01_out.mkv

Convertir mpeg42 (vieux avi ou f18 YT) to h264

La commande suivante n'a pas fonctionné mais je n'ai pas cherché plus que cela…

ffmpeg -i infile.mp4 -an -vcodec libx264 -crf 23 outfile.h264
informatique/divers/ffmpeg.1672577336.txt.gz · Last modified: 2023/01/01 13:48 by didzkovitchz