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

Kdenlive does not support x264 rendering with crf (constant rate factor) ?

Tags: None
(comma "," separated)
kdengreat
Registered Member
Posts
12
Karma
0
My impression is, that the crf option is actually (and very unfortunately!) not supported by kdenlive yet. Why? Well I used a rendering profile with crf=20 and rendered. Then I changed the profile to crf=18 (leaving everything else unchanged). The filesize of the first rendering should usually be smaller than the rendering of the second file. BUT: It is not! The two files had the exact same filesize! Therefore it seems to me, that kdenlive actually just ignores the crf-option (and at the same time does not put out an error message).

Could perhaps someone confirm this?

It would be also very helpful, if a savvy person could exactly explain, what options are supported and which ones not.

Happy to discuss.
yellow_drupal
Registered Member
Posts
748
Karma
0
crf works fine. Make sure you're other encoder flags aren't overiding your crf value. I did this quick test using sunabs git PPA, two custom render profiles. No 2nd Pass. crf is float, not sure if inputing integer values makes any difference, didn't test any further than these:

f=mp4 acodec=aac ab=%audiobitrate+'k' ar=48000 pix_fmt=yuv420p vcodec=libx264 crf=18.0 aspect=%dar pass=%passes

f=mp4 acodec=aac ab=%audiobitrate+'k' ar=48000 pix_fmt=yuv420p vcodec=libx264 crf=20.0 aspect=%dar pass=%passes

Mediainfo tells me:

General
Complete name : crf18.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 8.45 MiB
Duration : 10s 261ms
Overall bit rate mode : Variable
Overall bit rate : 6 910 Kbps
Writing application : Lavf53.21.0


General
Complete name : crf20.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom
File size : 6.09 MiB
Duration : 10s 261ms
Overall bit rate mode : Variable
Overall bit rate : 4 979 Kbps
Writing application : Lavf53.21.0

General defaults applied that I didn't control other than crf value.

crf18.mp4

Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=1 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.25 / aq=1:1.00

crf20.mp4

Encoding settings : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=1 / b_bias=0 / direct=1 / weightb=0 / open_gop=1 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.25 / aq=1:1.00

kdengreat
Registered Member
Posts
12
Karma
0
Thank you for your kind and fast feedback. Because for it definitely did not work, I tried to update my system from 11.10 to 12.04 - and this actually did it! Now I can also work with the crf-option!
I am about to generate a H.264 rendering profile which uses the preset slower and the tune option film (next to the crf option). But I did put this in a seperate thread.
yellow_drupal
Registered Member
Posts
748
Karma
0
I too am using 12.04, so that could well explain it. Good to hear you're sorted now.
GMaq
Registered Member
Posts
47
Karma
0
@yellow

Thanks for sharing these CRF presets, they also work with the ffmpeg in AV Linux 6.0, I was having a lot of difficulty getting H.264 rendering working with the stock presets on Kdenlive 0.9.3GIT. You've really helped save a lot of time and head-scratching!

I expanded on them a bit here if anyone is interested: http://www.remastersys.com/forums/index.php?topic=2731.0

Thanks again to yellow!


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]