Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change frame rate of FFmpeg output video in concat case

Tags:

ffmpeg

I have a file list_of_file_names.txt which (for instance) has the content

file 'file_000.png'
file 'file_001.png'
...

I want to make a video with a frame rate of 5 frames per second from this sequence of image files. In an attempt to do so, I use the command

ffmpeg.exe -framerate 5 -y -f concat -safe 0 -i list_of_file_names.txt.txt -c copy output.mp4

which then gives me the error Option framerate not found..

How do I set the frame rate to 5 frames per second without getting errors?

like image 699
Adriaan Avatar asked Oct 30 '25 16:10

Adriaan


1 Answers

The contents of list_of_file_names.txt should be

file 'file_000.png'
duration 0.2
file 'file_001.png'
duration 0.2
...
file 'file_099.png'
duration 0.2
file 'file_099.png'

in case of a 100 frames (notice that the last image is included twice, the second time without a duration, as mentioned on https://trac.ffmpeg.org/wiki/Slideshow under the section 'Concat demuxer'.

And the command should be

.\ffmpeg.exe -safe 0 -y -f concat -i .\list_of_file_names.txt -r 5 output.mp4

under Windows 10.

like image 132
Adriaan Avatar answered Nov 01 '25 06:11

Adriaan