Bug 370480 - WISHLIST: Add Support for hardware encoders
Summary: WISHLIST: Add Support for hardware encoders
Status: RESOLVED DUPLICATE of bug 378832
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 14:55 UTC by Paul Konecny
Modified: 2018-11-10 14:41 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
fritzibaby: Brainstorm+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Konecny 2016-10-11 14:55:08 UTC
Would it be possible to expose hardware encoder interfaces (VCE, VA_API, NVENC) via the render menu or use them for the rendered timeline preview function?
I think this would greatly benefit workflow and prototyping. 

I found this video by Christoph Haag that shows such an encoder in action on his VCE enabled GPU
https://www.youtube.com/watch?v=Js4tviEMIQA
The command he used was:
gst-launch-1.0 ximagesrc display-name=:0 use-damage=0 startx=0 starty=0 endx=1919 endy=1079 ! queue ! videoconvert ! queue ! video/x-raw,format=NV12,framerate=30/1 ! omxh264enc ! h264parse ! matroskamux ! filesink location=output.mkv

Cheers!
Comment 1 farid 2016-11-27 23:26:59 UTC
This is probable something you need to request from MLT upstream... I might be wrong though.
Comment 2 Paul Konecny 2016-11-28 14:44:19 UTC
I think we talked about this in Cafe #10 after you went offline. 
https://notes.kde.org/public/kdenlive-cafe10

*- Hardware encoder Support (given MLT support) https://bugs.kde.org/show_bug.cgi?id=370480
*We can already benefit from FFmpeg's hardware encoders in proxy clip/transcoding jobs (TODO for 16.12 / JBM)

So it seems at least some parts can be accelerated already. I could be wrong though.
Comment 3 Jean-Baptiste Mardelle 2016-12-02 10:03:56 UTC
This requires some more testing. Currently, using vaapi, to encode i get ~160fps:

ffmpegmlt -vaapi_device /dev/dri/renderD128 -i input.mp4 -vf 'format=nv12|vaapi,hwupload,scale_vaapi=640:220' -c:v h264_vaapi output.mp4

Using software encoding, I get ~180-230 fps with this command:

ffmpegmlt -i input.mp4 -vf scale=640:-1 -g 5 -crf 25 -ab 128k -vcodec libx264 -acodec libvorbis -preset:v veryfast output.mov

This is most likely due to the fact that we can use h264 profiles (veryfast) in software encoding, but I could not find a way to change the provile using the va_api encoder, so it produces HQ but slow h264.

So in my tests, there is no benefit to use hardware encoders for Kdenlive's proxy feature (quickly producing low quality files).
Comment 4 Paul Konecny 2017-04-19 01:59:06 UTC
Hi J-B,
Is this whislist item fixed alongside this bug then? 
https://bugs.kde.org/show_bug.cgi?id=378832

Cheers!
Comment 5 emohr 2018-11-10 14:41:43 UTC
Vaapi and nvenc integration is ongoing/on testing.
I close this whish list as a duplicate of 378832. If you see it differently reopen it.

*** This bug has been marked as a duplicate of bug 378832 ***