Bug 499236 - After "successful" upgrade to kdenlive v24.12.0, video files created using OBS Studio cannot be imported at all.
Summary: After "successful" upgrade to kdenlive v24.12.0, video files created using OB...
Status: CONFIRMED
Alias: None
Product: kdenlive
Classification: Applications
Component: Project Bin & Import (other bugs)
Version First Reported In: 24.12.0
Platform: Microsoft Windows Microsoft Windows
: NOR major
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2025-01-28 08:19 UTC by Rohit Banerjee
Modified: 2025-02-02 12:58 UTC (History)
1 user (show)

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


Attachments
Error message "Cannot open file <filepath../filename>" displayed in the project bin, refusing to import the working video files (154.90 KB, image/png)
2025-01-28 08:19 UTC, Rohit Banerjee
Details
"INVALID" text displayed in Clip Monitor for existing imported video files, and "INVALID" text displayed in Project Monitor for existing edited clips from editing timeline, when re-opening projects (236.04 KB, image/png)
2025-01-28 08:22 UTC, Rohit Banerjee
Details
Environment settings page showing correct settings (80.09 KB, image/png)
2025-01-28 09:37 UTC, Jean-Baptiste Mardelle
Details
kdenlive environment settings (393.27 KB, image/png)
2025-01-28 10:19 UTC, Rohit Banerjee
Details
Error message "Cannot open file <filepath../filename>" displayed in the project bin, refusing to import the working video files, even from C Drive (279.99 KB, image/png)
2025-01-28 10:25 UTC, Rohit Banerjee
Details
Moved video file to user's Video folder for debug log generation (23.02 KB, text/plain)
2025-01-28 15:19 UTC, Rohit Banerjee
Details
Output of the command ./melt color:red out=50 -consumer avformat:C:\Users\XXX\test.mp4 (5.98 KB, video/mp4)
2025-01-31 08:08 UTC, Rohit Banerjee
Details
New DebugView utility debug log generated and uploaded, for re-installed instance (39.22 KB, text/plain)
2025-01-31 08:43 UTC, Rohit Banerjee
Details
Video successfully imported in 23.08.3 (460.26 KB, image/png)
2025-01-31 09:36 UTC, Rohit Banerjee
Details
Video successfully imported in 23.08.4 (434.74 KB, image/png)
2025-01-31 09:45 UTC, Rohit Banerjee
Details
Video successfully imported in 23.08.5 (456.52 KB, image/png)
2025-01-31 09:51 UTC, Rohit Banerjee
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rohit Banerjee 2025-01-28 08:19:14 UTC
Created attachment 177747 [details]
Error message "Cannot open file <filepath../filename>" displayed  in the project bin, refusing to import the working video files

SUMMARY
After "successful" upgrade to kdenlive v24.12.0, video files created using OBS Studio cannot be imported at all.

STEPS TO REPRODUCE
1. Upgrade from v24.08.3 to kdenlive v24.12.0, using "choco upgrade all" command on Windows Powershell.
2. After upgrade of kdenlive v24.12.0 and ffmpeg-full v7.1.0, open kdenlive and start new project.
3. Attempt importing any existing or current videos recorded on OBS Studio, in the project bin, to encounter the error message "Cannot open file <filepath../filename>".
4. Attempt re-opening already existing kdenlive project edited in previous version, to encounter different but presumably related bug, where Clip Monitor displays "INVALID" for existing working imported video files, and Project Monitor displays "INVALID" for existing edited clips from editing timeline.

OBSERVED RESULT
1. Error message "Cannot open file <filepath../filename>" displayed  in the project bin, refusing to import the working video files (verified working using ffmpegplay.exe and melt.exe), for new projects
2. "INVALID" text displayed in Clip Monitor for existing imported video files, and "INVALID" text displayed in Project Monitor for existing edited clips from editing timeline, when re-opening earlier projects.

EXPECTED RESULT
1. No error message for working video files, video files must be imported successfully.
2. No "INVALID" display in in Clip Monitor or Project Monitor, for earlier project files.

SOFTWARE/OS VERSIONS
Windows: 11 Version 23H2
Qt Version: 6.8.0

ADDITIONAL INFORMATION
Issue persists in version 24.12.1 too. Already tried solution @ https://forum.kde.org/viewtopic.php%3Ff=265&t=138533.html without any success.
Comment 1 Rohit Banerjee 2025-01-28 08:22:27 UTC
Created attachment 177749 [details]
"INVALID" text displayed in Clip Monitor for existing imported video files, and "INVALID" text displayed in Project Monitor for existing edited clips from editing timeline, when re-opening projects
Comment 2 Jean-Baptiste Mardelle 2025-01-28 08:27:12 UTC
Chocolatey is not officially supported by the Kdenlive team. Please try the Windows binaries provided on our download page that should work correctly, and report the issue to Chocolatey.

If the problem persists with our binaries, feel free to re-open the issue.
Comment 3 Rohit Banerjee 2025-01-28 08:36:51 UTC
Problem persists on Windows binaries available from the download page, even without Chocolatey.
Comment 4 Jean-Baptiste Mardelle 2025-01-28 09:34:29 UTC
I just tested on a Windows 11 system (23H2 like you), and everything works fine. Could you try to reset the Kdenlive configuration (in the menu > Help > Reset Configuration).
Comment 5 Jean-Baptiste Mardelle 2025-01-28 09:36:41 UTC
After that, you can check that the environment page in the Kdenlive settings points to the correct MLT/FFmpeg paths, like in my attached screenshot
Comment 6 Jean-Baptiste Mardelle 2025-01-28 09:37:25 UTC
Created attachment 177754 [details]
Environment settings page showing correct settings
Comment 7 Rohit Banerjee 2025-01-28 10:19:02 UTC
I have exact same settings on the Environment settings page. I have even uninstalled, re-installed kdenlive, reset the settings, without any success.
Comment 8 Rohit Banerjee 2025-01-28 10:19:36 UTC
Created attachment 177755 [details]
kdenlive environment settings
Comment 9 Jean-Baptiste Mardelle 2025-01-28 10:20:44 UTC
Are your source videos on another drive than C: ? If yes, can you try copying a video to C: and add it in Kdenlive to see if that makes a difference ?
Comment 10 Rohit Banerjee 2025-01-28 10:25:27 UTC
Created attachment 177756 [details]
Error message "Cannot open file <filepath../filename>" displayed in the project bin, refusing to import the working video files, even from C Drive

Attempted to import from C Drive as well, with same error message. Interestingly, the earlier projects have also been affected, which used to work without any issues, in the previous version.
Comment 11 Jean-Baptiste Mardelle 2025-01-28 10:28:40 UTC
Can you move the video file to your User's Video folder just to be sure it is not a permission issue in the root C:\ folder
Comment 12 Jean-Baptiste Mardelle 2025-01-28 10:35:01 UTC
One last thing that would be very helpful is if we could see the Kdenlive debug output. For this, you would need to install the Windows  DebugView utility from Microsoft:
https://learn.microsoft.com/en-us/sysinternals/downloads/debugview

This is a small utility that allows to view system debug output. Open the DebugView App, then start Kdenlive and try to add the file. You should have a lot of debug output in DebugView, then attach the debug info here ( remove any sensitive info like username)
Comment 13 Rohit Banerjee 2025-01-28 15:19:27 UTC
Created attachment 177761 [details]
Moved video file to user's Video folder for debug log generation

Moved the video file to my user Video folder, to rule out it is not a permission issue in the root C:\ folder. Used DebugView utility as per instructions, and generated debug log as per instructions.
Comment 14 Rohit Banerjee 2025-01-31 05:38:23 UTC
DebugView utility debug log generated and uploaded, as per instructions.
Comment 15 Jean-Baptiste Mardelle 2025-01-31 07:49:06 UTC
This is puzzling. Nothing seems wrong on Kdenlive's side, so my suspicion is an issue  between MLT and FFmpeg, however I  cannot reproduce. I also tried installing Kdenlive from chocolatey and is also works fine. I saw other Windows report that look like yours, so I set the status to confirmed.
I will need you to dig a bit more. Can you please test the following:

Go in the Kdenlive bin folder:
cd C:\Program Files\kdenlive\bin

Run melt.exe (the MLT utiliy) to create a short mp4 file (replace XXX with your user name) :
./melt color:red out=50 -consumer avformat:C:\Users\XXX\test.mp4

It should create a short 2 seconds red color clip called test.mp4.
Can you please paste the output of the command here ?

Thanks in advance
Comment 16 Jean-Baptiste Mardelle 2025-01-31 07:50:52 UTC
Correction, the melt command should be using the .exe extension for melt:
.\melt.exe color:red out=50 -consumer avformat:C:\Users\XXX\test.mp4
Comment 17 emohr 2025-01-31 08:07:05 UTC
Could be there a conflict between kdenlive v24.12.1 and the "user" installed ffmpeg v7.1.0? What happen if the Windows system path is set and point to ffmpeg v7.1.0 and Kdenlive runs on an older ffmpeg version?
Comment 18 Rohit Banerjee 2025-01-31 08:08:32 UTC
Created attachment 177841 [details]
Output of the command  ./melt color:red out=50 -consumer avformat:C:\Users\XXX\test.mp4

C:\Program Files\kdenlive\bin>.\melt.exe color:red out=50 -consumer avformat:C:\Users\RohitBanerjee-AiElem\test.mp4
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
|1=-10| |2= -5| |3= -2| |4= -1| |5=  0| |6=  1| |7=  2| |8=  5| |9= 10|
+-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+ +-----+
+---------------------------------------------------------------------+
|               H = back 1 minute,  L = forward 1 minute              |
|                 h = previous frame,  l = next frame                 |
|           g = start of clip, j = next clip, k = previous clip       |
|                0 = restart, q = quit, space = play                  |
+---------------------------------------------------------------------+
[libx264 @ 000002bf9a84f640] interlace + weightp is not implemented
[mp4 @ 000002bf9a7f54c0] Timestamps are unset in a packet for stream 1. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[mp4 @ 000002bf9a7f54c0] Encoder did not produce proper pts, making some up.
Comment 19 Jean-Baptiste Mardelle 2025-01-31 08:11:55 UTC
Ok, then can you now test if MLT can playback this created file:

.\melt.exe C:\Users\XXX\test.mp4

Should play the red clip in a window (press 'q' to close the video window)
Comment 20 Jean-Baptiste Mardelle 2025-01-31 08:12:56 UTC
And then try playing one of your OBS files in the same way:

.\melt.exe your_obs_file.mp4

Does it work ?
Comment 21 Rohit Banerjee 2025-01-31 08:20:08 UTC
.\melt.exe C:\Users\XXX\test.mp4 works successfully, so does my other OBS videos files, which I verified already.

I also tested @emohr 's libe of thought on ffpmeg versions being conflicted. I downloaded the ffmpeg files manually from the repo, and manually overwrote them in the kdenlive folder, as per the instructions mentioned in https://forum.kde.org/viewtopic.php%3Ff=265&t=138533.html . Sadly, it still continues with the same error.
Comment 22 Jean-Baptiste Mardelle 2025-01-31 08:27:52 UTC
Overwriting the libraries inside kdenlive's folder is typically something that could lead to the error you are seeing. 
However I don't understand how melt can work but not kdenlive.
Just to be sure, can you uninstall kdenlive, completely delete the 'kdenlive' folder in 'C:\Program Files', then reinstall using our official package downloaded from our website.

Then, using a teminal:
cd C:\Program Files\kdenlive\bin
.\kdenlive.exe

Just to be sure that you are running kdenlive installed from our package and not another version installed somewhere else on your drive.
Comment 23 Rohit Banerjee 2025-01-31 08:37:45 UTC
Completely uninstalled kdenlive, completely deleted the 'kdenlive' folder in 'C:\Program Files', confirmed no other version is installed anywhere else on my drive, and then reinstalled the official package downloaded from the website. Launched kdenlive from the terminal exactly as the command below:
cd C:\Program Files\kdenlive\bin
.\kdenlive.exe

Attempted loading the test OBS video file from my user Video folder, to rule out it is not a permission issue in the root C:\ folder.

Problem unfortunately still persists.
Comment 24 Rohit Banerjee 2025-01-31 08:43:48 UTC
Created attachment 177843 [details]
New DebugView utility debug log generated and uploaded, for re-installed instance

Didn't realise that the DebugView was already running in the backend, this time it seems like it had something difference from the last log.
Comment 25 Jean-Baptiste Mardelle 2025-01-31 08:59:33 UTC
I am running out of ideas :(.
Could you maybe try creating a new Windows user with a very simple name (no dash, no space, no caps), and see if you get the same failure starting Kdenlive from that user account ?
Comment 26 Rohit Banerjee 2025-01-31 09:12:34 UTC
I understand the frustration, I also come from a software development background and can appreciate the efforts to investigate the bug.

However, I believe we are veering away from the actual problem at hand, which has nothing to do with user accounts, folder permissions, or environment variables.

As I have mentioned at least twice now, the issue is with the file loading, since there is an observable defect not just in the new projects being unable to load video files, but also with already prior projects successfully edited on previous version, which now display INVALID on the new version, on both Clip Monitor and the Project Monitor.

A code review on the relevant module(s) can perhaps shed more light. Since I practice and teach management as well, I'm reminded of the Vanilla Icecream story (https://kepner-tregoe.com/blogs/help-my-car-is-allergic-to-vanilla-ice-cream-a-study-in-problem-solving/), in this issue's case.
Comment 27 emohr 2025-01-31 09:25:19 UTC
Can you upload the file "2025-01-08_09-25-24.mp4" somewhere or send it to me by SwissTransfer https://www.swisstransfer.com to my mail address fritzibaby@gmx.net so we can have a look.
Comment 28 Rohit Banerjee 2025-01-31 09:34:57 UTC
(In reply to emohr from comment #27)
> Can you upload the file "2025-01-08_09-25-24.mp4" somewhere or send it to me
> by SwissTransfer https://www.swisstransfer.com to my mail address
> fritzibaby@gmx.net so we can have a look.

I can try and transfer the file, but it is a 170MB file. And I really see no point of sharing the file, since I just confirmed that the defect is not present in the previous version. I am uploading the screenshots of the successful video imports on 23.08.3, 23.08.4, and 23.08.5
Comment 29 Rohit Banerjee 2025-01-31 09:36:57 UTC
Created attachment 177844 [details]
Video successfully imported in 23.08.3
Comment 30 Rohit Banerjee 2025-01-31 09:45:03 UTC
Created attachment 177845 [details]
Video successfully imported in 23.08.4
Comment 31 Rohit Banerjee 2025-01-31 09:51:17 UTC
Created attachment 177846 [details]
Video successfully imported in 23.08.5
Comment 32 emohr 2025-01-31 10:08:23 UTC
Mmh, interesting. That means it has something to do with the switch of Kdenlive to Qt6. The OSB file would be interesting to deeper check with the debugger. SwissTrasnfer can have files up to 50GB.
Comment 33 Jean-Baptiste Mardelle 2025-01-31 11:09:14 UTC
The thing is that in your DebugView startup log, you have 130 lines like: 
plugin not available: "avfilter.aecho"	

Normally, you should only have like 29 lines of it, because some avfilters are not supported.
This means that MLT cannot correctly load the avformat module (its module interfacing with FFmpeg).
So I agree that the issue is probably not related to your video files, but there is something on your system that prevents MLT to correctly communicate with FFmpeg.

Comparing the 23.x with 24.x installs, I found a difference in the way MLT libraries are installed. In 23.08, the 2 MLT libraries
libmlt-7.dll and libmlt++-7.dll were in 2 locations: 
C:\Program Files\kdenlive\bin and
C:\Program Files\kdenlive\lib

In Kdenlive 24.x, these 2 libraries are only in:
C:\Program Files\kdenlive\bin

Could you try with a Kdenlive 24.12 install to copy these 2 libraries from C:\Program Files\kdenlive\bin to C:\Program Files\kdenlive\lib
and check if it makes a difference ?
Comment 34 Rohit Banerjee 2025-01-31 18:16:34 UTC
(In reply to Jean-Baptiste Mardelle from comment #33)
> Comparing the 23.x with 24.x installs, I found a difference in the way MLT
> libraries are installed. In 23.08, the 2 MLT libraries
> libmlt-7.dll and libmlt++-7.dll were in 2 locations: 
> C:\Program Files\kdenlive\bin and
> C:\Program Files\kdenlive\lib
> 
> In Kdenlive 24.x, these 2 libraries are only in:
> C:\Program Files\kdenlive\bin
> 
> Could you try with a Kdenlive 24.12 install to copy these 2 libraries from
> C:\Program Files\kdenlive\bin to C:\Program Files\kdenlive\lib
> and check if it makes a difference ?

Tried this approach, no success.

(In reply to emohr from comment #32)
> Mmh, interesting. That means it has something to do with the switch of
> Kdenlive to Qt6.

This may something to start looking at ...
Comment 35 emohr 2025-02-01 10:37:28 UTC
I similar issue on Windows here (Bug 498237): in 23.8.05 it works in later versions not.
Comment 36 emohr 2025-02-02 12:58:15 UTC
It’s maybe a stupid idea. Update your graphic card driver to the latest version. Maybe that fixes the connection to FFMPEG.