]> cat aescling's git repositories - mastodon.git/commit
Fix some media attachments being converted with too high framerates (#17619)
authorClaire <claire.github-309c@sitedethib.com>
Tue, 22 Feb 2022 16:11:22 +0000 (17:11 +0100)
committerGitHub <noreply@github.com>
Tue, 22 Feb 2022 16:11:22 +0000 (17:11 +0100)
commit166f6e4b500dd84eeffdbf887b2dc21e6d8c0aa6
tree15940b2d096655d585f3b31d45874fe99eeeb63b
parent51e67f3243d5709361bde722f341b8a5e74d63ca
Fix some media attachments being converted with too high framerates (#17619)

Video files with variable framerates are converted to constant framerate videos
and the output framerate picked by ffmpeg is based on the original file's
container framerate (which can be different from the average framerate).

This means that an input video with variable framerate with about 30 frames per
second on average, but a maximum of 120 fps will be converted to a constant 120
fps file, which won't be processed by other Mastodon servers.

This commit changes it so that input files with VFR and a maximum framerate
above the framerate threshold are converted to VFR files with the maximum frame
rate enforced.
app/lib/video_metadata_extractor.rb
app/models/media_attachment.rb
lib/paperclip/transcoder.rb