

Automatically make list.txt in Linux/macOS

If you want to add additional inputs make sure they all have the same attributes.

Then run ffmpeg: ffmpeg -f concat -i list.txt -c copy output.mp4

Contents of an example text file to repeat 4 times. The concat demuxer allows you to loop an input without needing to re-encode because it can use stream copy. This may not work with anything older than FFmpeg 4.0.0 means no loop, -1 means infinite loop.This can avoid re-encoding because it can use stream copy.Video:99kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.-stream_loop option ffmpeg -stream_loop 3 -i input.mp4 -c copy output.mp4 Execute the command line below and look at the last two frames of the output and its duration (is one frame too many, because it should be 1s as the input (24 frames width duration 1/24)).Ĭommand line (adjust the font file path for your os) and output:įfmpeg -f lavfi -i testsrc=640x480:d=1:r=25 -vcodec mpeg4 -vf drawtext="fontfile=/System/Library/Fonts/Courier.dfont:text='Frame %':x=85:y=H/2+lh/2+descent-ascent:fontsize=48:fontcolor=black",framerate=fps=24 -q:v 1 -y 25_to_24_1s.movįfmpeg version git-f6ef8f2 Copyright (c) 2000-2015 the FFmpeg developersīuilt with Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)Ĭonfiguration: -enable-shared -disable-static -disable-doc -disable-devices -enable-indev=lavfi -prefix=/Users/teamcity/buildAgent/work/3b1b1b1b725f407e/build/ffmpeg -extra-cflags=-I/Users/teamcity/buildAgent/work/3b1b1b1b725f407e/build/libmp3lame/include/ -extra-ldflags=-L/Users/teamcity/buildAgent/work/3b1b1b1b725f407e/build/libmp3lame/lib/ -enable-libmp3lame -enable-libopenh264 -enable-libfreetype
