Bug 491601

Summary: Transcoding from VFR to CFR does Nothing
Product: [Applications] kdenlive Reporter: ammarzawar123
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 24.05.1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ammarzawar123 2024-08-12 00:00:28 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
When it tries to transcode a video from VFR to CFR via 'Lossy x264 | frame only', it doesn't do anything.

STEPS TO REPRODUCE
1.  Import any framerate with a variable framerate.
2.  Kdenlive will say that this you need to transcode it into a constant framerate video. Let it transcode with 'Lossy x264 | frame only'.
3.  Now let it transcode.

OBSERVED RESULT
The video makes a copy of itself, with the original name and the new framerate appended to it. Kdenlive automatically replaces the old one with the copy, but the framerate is completely unchanged, so it's still VFR. Kdenlive recognizes this, and tells you to transcode it to CFR, causing an unending cycle of failed transcoding.

EXPECTED RESULT
The video makes a copy of itself, with the original name and the new framerate appended to it. Kdenlive automatically replaces the old one with the copy, and since it's now CFR there are no more issues.

SOFTWARE/OS VERSIONS
Windows: Windows 11 Home, Build 22631
KDE Frameworks Version: Version 6.3.0
Qt Version: Version 6.7.1 (built against 6.7.1)

ADDITIONAL INFORMATION
CPU: AMD Ryzen 5 3600
GPU: Nvidia RTX 3060
RAM: 12 GB
They also get bigger for some reason.
Comment 1 ammarzawar123 2024-08-12 01:34:28 UTC
Oh, and if this helps, I have a .bat script to convert them myself. Here's the ffmpeg command if you're interested.

ffmpeg -y -fflags +igndts -i input.video -filter:v fps=%new_fps% -fps_mode:v cfr -copytb 0 -c:v libx265 -crf 17 -tag:v hvc1 output.video
Does re-encode it, but it works flawlessly on anything I throw at it.
Comment 2 Jean-Baptiste Mardelle 2024-08-12 08:13:26 UTC
Thanks for your report. This is in fact fixed for the 24.08 version. Would be great if you can test the daily build to confirm:
https://cdn.kde.org/ci-builds/multimedia/kdenlive/release-24.08/windows/
Comment 3 ammarzawar123 2024-08-13 02:54:34 UTC
Tested with the build and 'Lossy x264 | frame only', and it works perfectly!
Thanks!