Bug 491257 - Incorrectly identifying imported clips as having variable frame rate
Summary: Incorrectly identifying imported clips as having variable frame rate
Status: RESOLVED NOT A BUG
Alias: None
Product: kdenlive
Classification: Applications
Component: Project Bin & Import (show other bugs)
Version: 24.05.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-04 16:00 UTC by Martin Bolding
Modified: 2025-02-08 09:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Bolding 2024-08-04 16:00:12 UTC
SUMMARY
Versions 24.5.1 and 24.5.2 of kdenlive on Win 64 incorrectly identify imported clips as having variable frame rate.


STEPS TO REPRODUCE
1.  Open a new project using kdenlive > 24.5.0
2. Import a stitched GoPro Fusion clip (which has 5504x2752 pixels @ 23.976 frame rate)

OBSERVED RESULT
3. Warning dialogue about clip having variable frame rate, and therefore unsuitable for editing/use. Convert clip yes/no.

EXPECTED RESULT
Successful import of clip

SOFTWARE/OS VERSIONS
Windows: 11, build 23H2 22631.3958

ADDITIONAL INFORMATION
Using GoPro Fusion Studio 1.4 to stitch raw clips for import into kdenlive.
I can supply sample clip for diagnostics if required.
Comment 1 Jean-Baptiste Mardelle 2024-08-08 10:49:33 UTC
Could you provide a short video sample so that we can test this further ?
Comment 2 Martin Bolding 2024-08-08 11:24:20 UTC
(In reply to Jean-Baptiste Mardelle from comment #1)
> Could you provide a short video sample so that we can test this further ?

1sec video is c. 130Mb, so provided via Dropbox Link.

I have reconfirmed that 24.05.0 is OK, but 24.5.1 and 24.05.2 give an error.
https://www.dropbox.com/scl/fi/5p4wnt4j875foeu6cgfkv/TEST.mov?rlkey=cea13t1ac4wp39uvguhsle42a&st=731or6qx&dl=0
Comment 3 Bug Janitor Service 2024-08-23 03:47:36 UTC
🐛🧹 ⚠️ This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information, then set the bug status to REPORTED. If there is no change for at least 30 days, it will be automatically closed as RESOLVED WORKSFORME.

For more information about our bug triaging procedures, please read https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Martin Bolding 2024-09-13 10:37:14 UTC
I have confirmed this is also a problem with 24.08.0.
Comment 5 Martin Bolding 2024-09-25 08:56:12 UTC
...and 24.08.1
Comment 6 Jean-Baptiste Mardelle 2025-02-07 17:18:54 UTC
Well MediaInfo also detects your video file as Variable Frame Rate, so I will close this bug.

-----------------------------------------------------------------------------
Frame rate mode                          : Variable
Frame rate                               : 23.976 (23976/1000) FPS
Minimum frame rate                       : 23.970 FPS
Maximum frame rate                       : 24.212 FPS
Comment 7 Martin Bolding 2025-02-07 23:27:45 UTC
That doesn't alter the fact that these files are NOT variable frame rate, whether MediaInfo says so or not.

I have tested with version 24.12.1 of kdenlive and it flags a warning that the clips are variable frame rate but seems to let me continue to use them, so I guess that will have to do for now.

Your response does not explain how versions of kdenlive prior to 24.05.1 were quite happy to process these files but subsequent versions are not.

I do appreciate that this difference may be caused by a change to a software component over which you do not have change control. However, it is a significant inconvenience to me as a long time kdenlive user.
Comment 8 Jean-Baptiste Mardelle 2025-02-08 02:49:11 UTC
Detection of VFR clips happens in MLT. Your clips doesn't pass a check comparing FFmpeg's average and real frame rates on the video stream :
av_cmp_q(stream->avg_frame_rate, stream->r_frame_rate);
https://github.com/mltframework/mlt/blob/master/src/modules/avformat/producer_avformat.c#L1398

If you think this is incorrect, it means that there is a problem within this check or in FFmpeg.
However there are several reports of GoPro producing VFR clips, and you can see Dan's answer (the MLT maintainer)on this topic:
https://forum.shotcut.org/t/constant-frame-rate-video-incorrectly-determined-to-be-variable-frame-rate-in-20-11-29/25112/3
Comment 9 Martin Bolding 2025-02-08 09:27:44 UTC
Thanks for that additional info. I didn't realise it was an issue reported with other GoPro products or that it was potentially an issue with MLT not reporting that it had determined that the file had a variable frame rate.

As you may know, GoPro fusion footage has to be "stitched" (using "GoPro Fusion Studio") to create a single .mov (or .mp4) file for each clip prior to futher editing. Opening the "raw" front and back camera files, MediaInfo reports a constant frame rate of 23.976 but, after stitching, (I agree that) the reported frame rate *mode* is "variable" (despite the stitching process being spatial not temporal). Possibly a bug in the GoPro code or its subcomponents (which hasn't been changed since  2018).

My issue may well be that Fusion Studio is incorrectly flagging the output as VFR, a fact which has hitherto been ignored (or at least not reported by) MLT.

As long as I can continue to use kdenlive to edit my footage (albeit with a warning about clips being flagged with variable frame rates), I'll be happy.
I have certainly never noticed any judder on the output from kdenlive with frames being dropped, repeated or interpolated to give me a constant 23.976 output.

I'll maybe stick with 24.05.0 for as long as I can. I definitely DON'T want my clips to be temporally converted on input.

Thanks again.