Bug 469321 - Crash when trying to render using NVENC H265 ABR preset
Summary: Crash when trying to render using NVENC H265 ABR preset
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: 23.04.0
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2023-05-03 18:06 UTC by greens17
Modified: 2024-10-27 09:13 UTC (History)
1 user (show)

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


Attachments
Custom profile parameters (97.97 KB, image/jpeg)
2023-05-19 07:54 UTC, Jean-Baptiste Mardelle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description greens17 2023-05-03 18:06:37 UTC
I'm getting a consistent crash when trying to render video using the NVENC H265 ABR preset. Using software rendering as well as the NVENC H264 presets both work fine, but I'm rendering 4K footage so NVENC HEVC is what I'd prefer to continue using as it's worked for months until recently.

STEPS TO REPRODUCE
1. Insert video into the track
2. Try rendering using NVENC H265 ABR preset
3. Render job immediately crashes with the log below

OBSERVED RESULT
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca0ec00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca0ec00] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca14500] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca14500] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca30480] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca30480] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca37f80] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca37f80] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373d24e880] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373d24e880] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca31340] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56373ca31340] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[hevc_nvenc @ 0x7fb8dc201fc0] B frames as references are not supported
[hevc_nvenc @ 0x7fb8dc201fc0] No capable devices found

EXPECTED RESULT
The project should begin rendering

SOFTWARE/OS VERSIONS
Linux: EndeavourOS (Arch Linux) Kernel: 6.2.13-zen-1-zen
KDE Plasma Version: Plasma 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
This preset has worked on my system for months, it stopped working around a week ago.
I've tried with multiple different video files that definitely aren't corrupted.
I've disabled Parallel Processing
I've tried setting Threads to 1
I have this issue on Arch Linux (tried Flatpak and AppImage) as well as a fresh install of Linux Mint (tried AppImage) using the same computer
I'm using an nvidia GTX 1070Ti using proprietary nvidia driver (530.41.03)
I've tried using the AppImage (gives the same Error Log)
I've tried resetting my Kdenlive configuration to default, still crashes
Comment 1 emohr 2023-05-14 18:11:35 UTC
Please try with the current Kdenlive AppImage version 23.04.1. We fixed a lot of crashes including rendering issues. https://kdenlive.org/en/download/
Comment 2 greens17 2023-05-17 06:04:09 UTC
(In reply to emohr from comment #1)
> Please try with the current Kdenlive AppImage version 23.04.1. We fixed a
> lot of crashes including rendering issues. https://kdenlive.org/en/download/

Just tried the latest Flatpak and AppImage (23.04.1) and still no luck.

Crash Log:
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x931cc0] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x931cc0] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xa40440] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa40440] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x11bfa40] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x11bfa40] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1161740] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1161740] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0xa7ae00] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0xa7ae00] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x1367ec0] st: 0 edit list: 1 Missing key frame while searching for timestamp: 1001 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x1367ec0] st: 0 edit list 1 Cannot find an index entry before timestamp: 1001.
[hevc_nvenc @ 0x7f6c18201fc0] B frames as references are not supported
[hevc_nvenc @ 0x7f6c18201fc0] No capable devices found
Comment 3 Jean-Baptiste Mardelle 2023-05-19 07:54:35 UTC
Created attachment 159091 [details]
Custom profile parameters

Ok, so I found the solution. Problem is linked to a change in FFmpeg. For NVidia cards that don't support B Frames encoding, you need to add this parameter to the encoding profile:

b_ref_mode=0

You can do it by creating a custom render profile based on NVENC H265 ABR, and in the Other tab, add this under Additional Parameters.
Comment 4 greens17 2023-05-19 08:21:32 UTC
(In reply to Jean-Baptiste Mardelle from comment #3)
> Created attachment 159091 [details]
> Custom profile parameters
> 
> Ok, so I found the solution. Problem is linked to a change in FFmpeg. For
> NVidia cards that don't support B Frames encoding, you need to add this
> parameter to the encoding profile:
> 
> b_ref_mode=0
> 
> You can do it by creating a custom render profile based on NVENC H265 ABR,
> and in the Other tab, add this under Additional Parameters.

The b_ref_mode=0 parameter seems to have fixed the issue! Thanks for figuring this out