Bug 446886

Summary: Rendering Crashed in version 21.12.0
Product: [Applications] kdenlive Reporter: Sebastian <sebastian.kuhne>
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED WORKSFORME    
Severity: crash CC: fritzibaby, snd.noise
Priority: NOR Flags: fritzibaby: timeline_corruption+
Version First Reported In: 21.12.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: ErrorLog
Screenshot of Scene
kdenlive File
mp4 log
ErrorLog - AppImage
Screenshot of Scene - AppImage
mp4 log - AppImage

Description Sebastian 2021-12-12 15:25:51 UTC
Created attachment 144483 [details]
ErrorLog

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Load *.kdenlive file based on a *.m2t video
2. Start Rendering (mp4)
3. 

OBSERVED RESULT
Rendering crashed after ~about 10% of rendering time

EXPECTED RESULT
no crash, output mp4


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.23.4
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
There is no crash with Kdenlive 21.08.3 (still available on another computer)
Comment 1 Sebastian 2021-12-12 15:26:33 UTC
Created attachment 144484 [details]
Screenshot of Scene
Comment 2 Sebastian 2021-12-12 15:27:06 UTC
Created attachment 144485 [details]
kdenlive File
Comment 3 Sebastian 2021-12-12 15:27:27 UTC
Created attachment 144486 [details]
mp4 log
Comment 4 Sebastian 2021-12-12 15:28:36 UTC
I am attaching several files that hopefully will help to identify the root cause. The files should be self-explaining. Happy to help.
Comment 5 emohr 2021-12-19 13:58:14 UTC
Thank you for reporting. Difficult to say what happens here.
Please try with the current Kdenlive AppImage version 21.21.0 to see if there are any packaging issues https://download.kde.org/stable/kdenlive/21.12/linux/
Comment 6 Sebastian 2021-12-20 06:24:22 UTC
(In reply to emohr from comment #5)
> Thank you for reporting. Difficult to say what happens here.
> Please try with the current Kdenlive AppImage version 21.21.0 to see if
> there are any packaging issues
> https://download.kde.org/stable/kdenlive/21.12/linux/

Many thanks for taking that issue.
I tried the current Kdenlive AppImage version 21.21.0 as you proposed.
Unfortunately, the same issue appears. I am attaching the same file structure again.
Comment 7 Sebastian 2021-12-20 06:25:02 UTC
Created attachment 144699 [details]
ErrorLog - AppImage
Comment 8 Sebastian 2021-12-20 06:25:43 UTC
Created attachment 144700 [details]
Screenshot of Scene - AppImage
Comment 9 Sebastian 2021-12-20 06:26:30 UTC
Created attachment 144701 [details]
mp4 log - AppImage
Comment 10 Sebastian 2022-01-20 06:44:31 UTC
Just want to touch base and ask if there is any progress, and if I can further help.
I have tested the issue again with Nightly kdenlive-22.03.70-2668251-x86_64.appimage - the issue is still persistent.
Comment 11 Jean-Baptiste Mardelle 2022-01-20 12:04:01 UTC
Thanks for your report. From the log, I would say that your source video file is corrupted:
[mpeg2video @ 0x7fcd9819a900] Invalid frame dimensions 0x0

Could you try to remux the source file with FFmpeg ? In a terminal, type:

ffmpeg -i yoursource.m2t converted.mp4 -vcodec copy -acodec copy

This will create a "converted.mp4" file that might be usable in Kdenlive.
If this does not work you can re-encode it with:

ffmpeg -i yoursource.m2t converted.mp4

This will re-encode the video and should work. To further debug the issue (probably an upstream problem in MLT), we would need access to the source file but I guess it's a huge file. So please first try my workarounds.
Comment 12 Sebastian 2022-01-20 19:55:14 UTC
(In reply to Jean-Baptiste Mardelle from comment #11)
> Thanks for your report. From the log, I would say that your source video
> file is corrupted:
> [mpeg2video @ 0x7fcd9819a900] Invalid frame dimensions 0x0
> 
> Could you try to remux the source file with FFmpeg ? In a terminal, type:
> 
> ffmpeg -i yoursource.m2t converted.mp4 -vcodec copy -acodec copy
> 
> This will create a "converted.mp4" file that might be usable in Kdenlive.
> If this does not work you can re-encode it with:
> 
> ffmpeg -i yoursource.m2t converted.mp4
> 
> This will re-encode the video and should work. To further debug the issue
> (probably an upstream problem in MLT), we would need access to the source
> file but I guess it's a huge file. So please first try my workarounds.

Hi Jean-Baptiste,
Many thanks for the advice, and I am sorry that I did not realize that the original file was corrupted.
However, your workaround worked perfectly.
Obviously there is nothing more to add; I will close this issue and sorry again for the inconveniences.
Comment 13 Sebastian 2022-02-13 14:10:32 UTC
Hi Jean-Baptiste,

I need to come back to this issue since I have updated information.

If I render a .m2t- file to .mp4 with 
*Video Settings*
- Frame size: 1920 x 1080 (16:9)
- Frame rate: 25 fps
- Pixel Aspect Ratio: 1
- Colour Space: ITU-R 709
- Interlaced: no
all is OK, and there is no crash.


If I render the *same* .m2t- file to .mp4 with 
*Video Settings*
- Frame size: 720 x 576 (16:9)
- Frame rate: 25 fps
- Pixel Aspect Ratio: 1,42222
- Colour Space: ITU-R 601
- Interlaced: no
the crash occurs.

I do not know if we should follow up on this, but it might be reasonable to prevent other users from the same experience. 
Happy to provide the m2t-file and .kdenlive-file.
Let me know how to proceed.

Best regards
Sebastian
Comment 14 farid 2022-08-26 18:58:37 UTC
Can you please provide these files so I can try to reproduce?
Comment 15 Sebastian 2022-08-27 16:44:09 UTC
(In reply to farid from comment #14)
> Can you please provide these files so I can try to reproduce?

Hi farid,

this topic is quite old, and I have used the workaround described above so far. However, I tried today to reproduce the issue with the current setup:

Kdenlive 22.08.0
Operating System: openSUSE Tumbleweed 20220826
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5
Kernel Version: 5.19.2-1-default (64-bit)
Graphics Platform: X11
Processors: 4 × AMD A8-7650K Radeon R7, 10 Compute Cores 4C+6G
Memory: 14.6 GiB of RAM
Graphics Processor: AMD KAVERI

I can say that I was not able to reproduce the failure anymore – the rendering process finished without any issues.
So, obviously the issue disappeared, and in my view we can close this topic.

Many thanks!

Best regards
Sebastian
Comment 16 Sebastian 2022-08-27 16:44:59 UTC
I change the status to RESOLVED-WORKSFORME.