Openshot-qt: Cannot render NVENC video

Created on 19 Apr 2018  Â·  16Comments  Â·  Source: OpenShot/openshot-qt

Hi,

First off, thank you for a great video editor!

I have a feature request, which I would be very happy if it got implemented.

It would be really nice to have an estimated time for rendering completion appear when the rendering starts. I come from Kdenlive which has this feature, and I find it really handy :)

Thanks for your time and have a nice day/night!

Kind regards!

duplicate

Most helpful comment

While not exactly a fix, an immediate workaround may be to export as MP4 and transcode with a tool like ffmpeg or handbrake to the desired MKV container format. I know that ffmpeg will allow you to set the transcode codec to "copy" (-c copy, -c:a copy or -c:v copy, for instance) to do a bit-by-bit copy of the included audio and/or video stream to the new container, resulting in no change in frame rate, resolution, quality or size of the stream data.

I'm not actually sure if ffmpeg support MKV containers on any or all platforms, so handbrake or another tool may be required to transcode/encode into the final MKV format.

All 16 comments

Hi @BinaryVigilante !

Download the latest daily build and give it a try... I think you will find that the render time remaining has already been implemented. 😀

I have installed it, and I think it's there, but I could'n test it as it won't render my project after giving this error: "Could not open codec".

I will have to see if it's a known bug and if not report it..

But anyways, thanks for the heads up! I'll see if I can get it working and really test things out! Thanks for the help! :)

Kind regards!

Could you please check what codec and stuff the video you're trying to edit with this program and provide the info here? That will help others help you. Hope that helps!

I'm trying to render a video recorded with NVENC using the matroska container and the audio is aac.

I'm then trying to render it to a libx264 video file, still with the matroska container and still with the audio at aac. I can do it in Kdenlive with no problem at all, and both Openshot and Kdenlive uses Melt to render.

Do you still need info from the program you mentioned @peanutbutterandcrackers ?

@BinaryVigilante - Hmm... OpenShot 1.x series did use the MLT library but with the 2.x series, OpenShot uses it's own multimedia library called libopenshot. Therefore, I am assuming that it is probably a case of lack of support NVENC encoding?

If you could, then yes please. @gary9872 might be able to give some more insight using the output from mediainfo...

@peanutbutterandcrackers - NVENC does not seem to be working. #583 #808

Ok, I used mediainfo:

General
Unique ID : 322868740778034119691474323225712689292 (0xF2E641F1E236F7E17CB57A2EB29E808C)
Complete name : 2018-04-16_12-18-05.mkv
Format : Matroska
Format version : Version 4 / Version 2
File size : 311 MiB
Duration : 6mn 41s
Overall bit rate : 6 481 Kbps
Writing application : Lavf57.40.101
Writing library : Lavf57.40.101 / Lavf57.40.101

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 6mn 41s
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 60.119 fps
Original frame rate : 60.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Default : Yes
Forced : No
Color range : Limited
Matrix coefficients : BT.601
DURATION : 00:06:41.934000000

Audio #1
ID : 2
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 6mn 41s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Frame rate : 46.875 fps (1024 spf)
Compression mode : Lossy
Title : Track1
Default : Yes
Forced : No
DURATION : 00:06:41.856000000

Audio #2
ID : 3
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : LC
Codec ID : A_AAC
Duration : 6mn 41s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Frame rate : 46.875 fps (1024 spf)
Compression mode : Lossy
Title : Track2
Default : Yes
Forced : No
DURATION : 00:06:41.856000000

One thing to note tho, if I write "mkv" in the Video Format, it indeed gives the "Could not open codec" error. But I write "matroska", it says this: "Could not deduce output format from file extension". Just in case it gives more info.

While not exactly a fix, an immediate workaround may be to export as MP4 and transcode with a tool like ffmpeg or handbrake to the desired MKV container format. I know that ffmpeg will allow you to set the transcode codec to "copy" (-c copy, -c:a copy or -c:v copy, for instance) to do a bit-by-bit copy of the included audio and/or video stream to the new container, resulting in no change in frame rate, resolution, quality or size of the stream data.

I'm not actually sure if ffmpeg support MKV containers on any or all platforms, so handbrake or another tool may be required to transcode/encode into the final MKV format.

Here is handbrake, just in case. :)

@gary9872 - Any thoughts?

Dup of #583 #808.

I suppose it is a workaround to use ffmpeg to convert the mp4 file to mkv :)

ffmpeg does indeed support the MKV container :) I use Melt for rendering, which is running on ffmpeg and there are no problems at all. But thanks anyways for the hint and the link ;) I will give it a look anyways!

And sorry about the duplication.. I did not see the other two posts. :(

Have a fantastic day!

You can use nvenc_h264 with ac3, but I don't think the AppImage doesn't support it.

If you say are in Linux and you use the build from your distro which uses external libraries you should have no problem using it. That being said there are no way to set any other parameters to it so it may not be much if any faster. It works for me, it offloads some work to the GPU, but don't expect a huge performance bost.

I confirming this issue. On ver.: 2.5.1-dev2 from stable PPA. On laptop with intel integrated + discrete nvidia. Linux.
Affects export via h264_nvenc.
Despite the fact that i have installed libnvidia-encode-390, and:

$ ffmpeg -encoders 2>/dev/null | grep nvenc
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_hevc           NVIDIA NVENC hevc encoder (codec hevc)
 V..... hevc_nvenc           NVIDIA NVENC hevc encoder (codec hevc)

Maybe help: https://askubuntu.com/questions/778100/how-to-install-compile-nvenc-in-ubuntu

Same error (issue↑) affects export via vp9_vaapi.

$ ffmpeg -encoders 2>/dev/null | grep vp9
 V..... libvpx-vp9           libvpx VP9 (codec vp9)
 V..... vp9_vaapi            VP9 (VAAPI) (codec vp9)

ver.: 2.5.1-dev2, h264_nvenc, vp9_vaapi

h264_vaapi (not nvidia) encoding works, but with same bit rate, which used with x264 cpu encoding, the quality of video is ugly. Increasing of bit rate of course gives better quality, but bigger file size too. And as i can see in cpu load indicator, h264_vaapi uses 1 cpu core, whereas x264 cpu encoding uses all 8 cores.
Actually i have only this in Preferences > Performance:
ver.: 2.5.1-dev2, h264_vaapi

And Appimage version 2.5.1 does not have accelerated options in Preferences > Performance at all. Just cpu.

@Flashwalker Yeah, hardware acceleration does not currently support secondary GPUs (laptop Optimus / PRIME -- Hah! I just got that), unfortunately. Works fine if the Nvidia chip is your primary GPU.

It's not supported _at all_ in the AppImages, tho, since it seems to be impossible to include hardware driver support in a way that's compatible with all distros. (Which is the entire reason for the existence of AppImage builds in the first place.)

If VAAPI works at all, (a) I'm kind of surprised, TBH, but (b) it's most likely either encoding unaccelerated (but through the VA interface), or it's using your Intel chip's integrated GPU as the hardware encoder. Which would probably explain the poor quality, when using VAAPI instead of QSV.

I've tried today (dec 27/2020) and neither nvenc or vaapi works to export a video using hardware encode. I just updated my manjaro to the latest version, which came with the latest openshot-qt available.

not working at all! Why was this issue closed then?

btw, I only have one NVidia GTX1060 6GB video card on my computer (no discreet video card whatsoever), and openshot is installed by pacman in my Manjaro install, NOT appimage, and nvenc/vaapi still doesn't work. So there's something more than what has being discussed here.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sefran007 picture Sefran007  Â·  3Comments

ppkakkar picture ppkakkar  Â·  3Comments

CarlBicknell picture CarlBicknell  Â·  3Comments

Geoff0627 picture Geoff0627  Â·  3Comments

malinga91 picture malinga91  Â·  3Comments