Opened 2 years ago

Closed 2 years ago

#8721 closed defect (invalid)

-f concat hardcode input at 25fps. Impossible to set to something else.

Reported by: grisk Owned by:
Priority: normal Component: undetermined
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
There is no option that let you change the input of the command -f concat -i "{txtPath}" to something other than the default 25fps.

Here are my tests and the results:
# -r before "-f concat" : Override all duration from file. Its just like using a static fps
# -vf "fps=X" : Fake final fps, it will keep very few frames in the final output.
# -r after -i "{txtPath}" : It appear to work, but its start to have problems after 60fps.
# -filter:v "fps={fps},setpts={speed}*PTS" : It encode correctly after the video is encoded at 25fps. So if there is a duration smaller than 25fps, it will delete those frames.

Attached is a python script that make it very easy to test it.

How to reproduce:

% ffmpeg -y -f concat -i "{txtPath}" -c:v libx264 -crf 1 -pix_fmt yuv420p -r 120 "{out}"
% ffmpeg -y -r 120 -f concat -i "{txtPath}" -c:v libx264 -crf 1 -pix_fmt yuv420p"{out}"
% ffmpeg -y -f concat -i "{txtPath}" -c:v libx264 -crf 1 -pix_fmt yuv420p -filter:v "fps=120,setpts={speed}*PTS" "{out}"
% ffmpeg -y -f concat -i "{txtPath}" -c:v libx264 -crf 1 -pix_fmt yuv420p -vf "fps=120" "{out}"

ffmpeg 4.2.2-1ubuntu1~18.04.york0
built on ubuntu0.18.04.1

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Attachments (1)

fffmpeg.py (2.4 KB ) - added by grisk 2 years ago.
Python script

Download all attachments as: .zip

Change History (3)

by grisk, 2 years ago

Attachment: fffmpeg.py added

Python script

comment:1 by Nicolas George, 2 years ago

concat does not hard-code any frame rate, it uses the frame rate of the files you concatenate. Use a format that supports timestamps rather than individual image files and you will be fine.

comment:2 by Carl Eugen Hoyos, 2 years ago

Resolution: invalid
Status: newclosed
Version: 3.4.6unspecified
Note: See TracTickets for help on using tickets.