This forum has been archived. All content is frozen. Please use KDE Discuss instead.

2pass encoding greyed out on Kdenlive versions 19 and 20

Tags: None
(comma "," separated)
jefbo
Registered Member
Posts
13
Karma
0
OS
Hi guys, I am done with my editing, now wanted to render the final movie in H264 but...kdenlive does not offer the 2pass encoding possibility ??? The selection case is greyed out, and as far as I could see, this is the case for all profiles, no matter which codec you select. I have initially tried with kdenlive-19.12.0a-x86_64.appimage, now downloaded the kdenlive-20.04.0-x86_64.appimage, same result. Is there any reason, why the option is not available or is this a bug? Any idea how to solve?
Merlimau
Registered Member
Posts
986
Karma
8
see here: https://trac.ffmpeg.org/wiki/Encode/H.264#twopass. You have to make your own profile to implement 2-pass.
jefbo
Registered Member
Posts
13
Karma
0
OS
:( tough stuff for "normal" users.... the melt site https://www.mltframework.org/plugins/ConsumerAvformat/ is quite technical and not helping me to step into the stuff. And unfortunately I could not find any guide/tutorial for newbies in render profiles building. As far as I understand, I could eg. create a new profile based on the MP4 standard one "the dominating format" and add the string pass=%passes at the end of the parameters. However, I would like to set a min./average/max. Bitrate as well and this requires much more knowledge of the whole. Very pity, thanks anyway :)
vpinon
KDE Developer
Posts
708
Karma
6
OS
Hello, why do you want 2 pass and fixed bitrate? This is so old school ;-)
We should dig in git history from releases before 2015 I would say.
If I remember correctly, you needed "pass=%passes" and "vb=%bitrate".
vpinon
KDE Developer
Posts
708
Karma
6
OS
Yeah, commit in 2014 removed for example:
<profile name="MPEG-4/MP3" bitrates="400,600,800,1000,2000,4000,6000,8000,10000,12000,18000,25000" defaultbitrate="2000"
audiobitrates="64,128,192,256,384" defaultaudiobitrate="128"
args="properties=MPEG-4-ASP ab=%audiobitrate+'k' vb=%bitrate+'k' aspect=%dar pass=%passes" />
jefbo
Registered Member
Posts
13
Karma
0
OS
Yeah, this is for sure old school, but the reason why I would like to have such a profile is...

I have a 1h video I would like to archive on a DVD DL encoded with the highest possible birtate. If I use CRF 17 the video has a birtate of 18.000 and the file is too large for the DVD. If I encode with CRF 18 the final video has a birtate of 16.000 and I have approx. 1 GB I could still use. 17,000 would be perfect. This is why I would like to encode with a variable bitrate of 17.000 with a min. of approx. 10.000 and a max. of 21.000. By the way, the original video from my CANON M50 is 30.000.
Thanks I will try to translate your settings in my local profile - Cheers :)
pfdint
Registered Member
Posts
7
Karma
0
I'm so lost, how is 2-pass encoding "old school"?

It says right here on ffmpeg's VP9 encoding page
Two-pass is the recommended encoding method for libvpx-vp9 as some quality-enhancing encoder features are only available in 2-pass mode.


At some point in recent months, kdenlive started outputting garbage quality for webms for no apparent reason, as experienced by this user in "Rendering gives a very unclear video and mp4 not working". End users like he and I don't know that VP8 is an outdated codec. We just click on the top 2 render options in the render widget, webm or mp4. All we know is that the webm option is now broken, and research leads us to conclude as suggested by a user above, that we have to make our own 2-pass profile.

There is no documentation on creating a 2-pass profile for kdenlive. The closest thing is this woefully unhelpful page, half of which is just the output of `ffmpeg -h`. Do I just add pass=%passes to activate the checkbox and check it? Does that do all of the work recommended by the above linked instructions on 2-pass encoding, where you deactivate audio and output to null on the first pass? I looked at kdenlive's source code and couldn't see any indication that this is actually done, aside from something about the log file. I was looking at a 2015 release of the code, when surely the webm export option was working.

Or maybe I can make a render profile that is just "preset=webm" to take advantage of the similarly undocumented mlt profiles, I see that this one is somehow aware of 2-pass procedure. But that still outputs garbage.

Or perhaps it's as the other user in "Rendering gives a very unclear video and mp4 not working" suggested, and it's just mlt's fault and it has to be recompiled including a patch for qt-base 5.15. But I'm now on kdenlive 20.08.1, mlt 6.22.1-3, and ffmpeg 4.3.1 and the issue is still present, but I'm on archlinux, which has a package manager. Should I really force-uninstall mlt and install another version from source? I'd rather wait for another release of mlt.

Well, while I'm here, can someone tell me how to use a custom mlt profile in kdenlive? MLT says something about changing environment variables to access custom profile.txt things, but how does kdenlive reflect that? Or you specify it as a suboption of the 'consumer' or something? But even then it looks like a profile name, not a path or file. Should I really just try to drop my custom profile in /usr/share/mlt/presets/consumer/avformat?
pieq
Registered Member
Posts
2
Karma
0
Hello!

I am also interested in this. Both pages include detailed information on how to use 2 pass encoding for VP9 codec:

- https://trac.ffmpeg.org/wiki/Encode/VP9
- https://sites.google.com/a/webmproject. ... ding-guide

How to create a KDEnlive profile that makes use of the "2 pass" checkbox? I could not find any information in the documentation, but I would like to implement such a profile.

Thank you!
pfdint
Registered Member
Posts
7
Karma
0
I figured out how to do it back when this thread was young, and still have some scrawled notes here.

"To create a 2-pass profile:
Create a file, put the video options in it
Copy that file to filename-pass1
In original file, put audio options
In pass1 file, turn off audio and put pass=1
"

And later a summary
"To do a 2-pass or just write out the options in a file instead of in parameters:
In the parameters, put properties=/path/to/file.mlt_preset
The mlt_preset file is just the key=value per line file.
If it's two-pass, you make two files, a file.mlt_preset-pass1 and file.mlt_preset
You can give them both the same video options, but in pass1 you turn off audio (an=1, audio_off=1) and add pass=1
That's all.
"

I'm not sure the actual checkbox ever made a difference.


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]