Incredible Render Performance In Kdenlive With NVENC - But 1 Big Problem
Vincent Pinon
vpinon at kde.org
Wed Jul 25 01:23:12 BST 2018
Hello,
I don't know how precisely you do the job in kdenlive
(you could share the .kdenlive, the .sh.mlt, a screenshot),
one thing I suspect is the track composition (automatic transparency):
if you keep the default high quality choice,
kdenlive adds "composite & transform" transitions that are based on Qt.
So without gpl / qt module, MLT skips these transitions.
Could you run your test switching to "no transparency"?
(toolbar just above timeline)
Thanks for you enthusiastic investigations :)
Vincent
Le mardi 24 juillet 2018, 23:26:01 CEST johnar1 a écrit :
Hey guys, I have some more info.
Hey Eugen, I have some more info.
For this test I used mlt 6.11, successfully compiled by Dan Dennedy's build-melt.sh
The test file that I am using is the 1080p version of Sintel.
https://durian.blender.org/download/
CPU: i5 6600K, GPU:GTX 750 TI nvidia-390 driver , Platform: Kubuntu 18.04
In order to check melt and isolate the problem I simply rendered the first minute of the Sintel short film with the following command:
(This is not the /bin/melt, but the script which launches it with the correct libs)
/home/frank/melt/20180724/melt -profile atsc_1080p_60 sintel.mkv out=3600 -consumer avformat:result-60.mp4 f=mp4 vcodec=h264_nvenc preset=slow
[CPU Utilization: 67% - 70% - 68% - 74%] [Video Engine Utilization (NVENC): 80%] [Render Time: 20s]
It obviously works perfectly.
Now when I select this melt in the kdenlive environment, and also ffmpeg, ffplay, ffprobe and the profiles path from Dan's melt folder, yields the following results when rendering the first minute of Sintel.
[CPU Utilization: 100% - 7% - 10% - 18%] [Video Engine Utilization (NVENC): 8%] [Render Time: 2m54s]
Something in kdenlive breaks parallel processing, only allowing 1 single core to be fully utilized.
And I have tested every single version of kdenlive available on this earth.
Every app image, including the refractoring version and every single ppa version, including stable, dev and master.
Also generating and launching the render script from the terminal yields the same result.
RENDERER="/home/frank/kdenlive/bin/kdenlive_render"
MELT="/home/frank/melt/20180724/melt"
SOURCE_0="file:///home/frank/Documents/scripts/script001.sh.mlt"
TARGET_0="file:///home/frank/Documents/untitled.mkv"
PARAMETERS_0="-pid:2664 in=0 out=3052 $MELT atsc_1080p_60 avformat - $SOURCE_0 $TARGET_0 vcodec=nvenc_h264 threads=4 real_time=-1"
$RENDERER $PARAMETERS_0
I have also tested different kdenlive_render executables/libs with the same result.
I should note, that using the kdenlive_multirender script in conjunction with the generated render script by kdenlive, while specifying 4 threads, the CPU uses 2 cores at 100%.
https://github.com/unfa/kdenlive-multirender
Now as I have described before, when I compile melt without enabling gpl, the 1 minute of Sintel renders perfectly again, with full utilization on both the CPU and GPU, but from within Kdenlive this time.
I conclude that this problem is somehow caused by Kdenlive and related to qt, but I do not possess the knowhow to further analyze it.
With the latest 18.08 Beta18 and the most recent QT version, 2 cores instead of 1 are now being utilized at 100% with the NVENC profile and 100% on all 4 cores using the MP4 h264 profile.
So this is 100% a QT issue with NVENC, but I need further insight from a professionals like yourselves.
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On July 16, 2018 7:51 AM, johnar1 <johnar1 at protonmail.com> wrote:
System: i5 6600K, 1050TI, Ubuntu 18.04, Kernel 4.16
I have successfully compiled mlt and ffmpeg with nvenc support using the official nvenc headers stripped from the Nvidia SDK.
Rendering the first minute of the 1080p Sintel version, with 4 threads specified and my nvenc profile, finishes in 10 seconds.
Sintel can be downloaded here: https://durian.blender.org/download/
Nvenc Profile: (compatible with recent mlt versions who are nvenc enabled by deafult)
f=mp4 vcodec=nvenc_h264 global_quality=21 vq=21 preset=slow bf=2 ab=384k
Now here is the problem that I do not understand:
Using the latest version of kdenlive from the kdenlive-master ppa combined with the newly compiled versions of ffmpeg and mlt works perfectly, but only under very specific circumstances.
I have only been able to get rendering with nvenc to work properly when I use and open this specific kdenlive [b]save file[/b] which I made of the first minute of the Sintel short film with the Appimage Version of Kdenlive. After launching the ppa/installed version of kdenlive and opening this save file, rendering with nvenc works flawlessly.
If I simply start a new project, adding the whole Sintel short film to the project bin, cutting the first minute and render it, nvenc simply does not work and the render time is tripled, despite having changed nothing else, including the nvenc render profile.
If I create a save file of the first minute of Sintel with the installed version and open it on the Appimage version, nvenc does not work again.
Conclusion: There must be something in this save file, maybe a parameter, additonal settings or any type of code not present in the default kdenlive project profiles, which enables NVENC.
I would greatly appreciate it if we could find out the source of this problem together.
Kdenlive Appimage Save File with which NVENC works:
https://pastebin.com/rzjR57DJ
PPA/Installed Version of Kdenlive created Save File which breaks NVENC:
https://pastebin.com/3uQ8sP0C
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdenlive/attachments/20180725/19ac718b/attachment-0001.html>
More information about the kdenlive
mailing list