Bug 344626 - Wishlist - Add VP9 Export profile
Summary: Wishlist - Add VP9 Export profile
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-27 12:23 UTC by Paul Konecny
Modified: 2016-01-12 02:55 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Konecny 2015-02-27 12:23:31 UTC
Hello JB, 
Although x264 profiles work great it would be nice to add a high quality open format to file rendering like VP9/Opus/Vorbis

I tried modifying the WebM Profile but meddling with all the options is a little bit out of my league. 
Desirable would be high quality CBR and VBR VP9 profiles with either Opus or Vorbis audio. A drop-down codec selection would also be nice. 

On a sidenote: I never managed to get the WebM VBR profile in Web sites to work properly. No matter what I set in Video Quality / Constant Rate Factor  videos would always  export to low quality (x264 CRF 15 ~6,4 MB no artifacts; WebM CRF 15,20,50 ~900KB very blocky artifacts)
Using WebM CBR profile with 25000 works though. 

Cheers!


Reproducible: Always
Comment 1 Paul Konecny 2015-04-05 00:08:58 UTC
Getting back to this topic I finally found settings that give me satisfying quality:
f=webm acodec=libopus ar=48000 ab=128k vcodec=libvpx-vp9 vb=2M g=120 bf=2 threads=6 rc_lookahead=16 quality=good speed=1 vprofile=0 qmax=51 qmin=4 slices=4 tile-columns=6 frame-parallel=1 auto-alt-ref=1 lag-in-frames=25

I got these by using JB's downloadable profile as base and adding a little more from here:
https://github.com/mltframework/mlt/commit/968191aa6ec7c0d9226277da0ffce6077cc5d55c
and here:
http://wiki.webmproject.org/ffmpeg/vp9-encoding-guide

On a sidenote:
libvpx 1.4.0 was released and should finally enable multi-threaded de- and enconding. The VP9 encoding guide should already be up to date.
https://groups.google.com/a/webmproject.org/forum/#!topic/codec-devel/2zYWenmdUM8

Cheers!
Comment 2 Evert Vorster 2015-04-20 18:49:59 UTC
There is a .webm profile under the "webpages" group of output profiles.
Comment 3 Paul Konecny 2015-04-21 19:28:20 UTC
Yes, there is but it uses the "old" VP8 codec which is less efficient and has inferior image quality compared to VP9 (think of it as h.264 vs h.265). And I'd like an extra profile which uses VP9 and opus. 
The profile I proposed above achieves this. It's just a quick shot at this and still needs a lot of tweaking (like being able to change parameters with the GUI elements) but it works. Even more so if you use it in combination with libvpx v1.4.0+ as this finally enables multi-threaded VP9 encoding (Update just came in on Arch and I'm rendering a video with all 4 threads at 100 % <3 )
Comment 4 Paul Konecny 2015-07-27 16:54:34 UTC
Hi J-B, Hi Evert,
I just played with this again but as I said I have not much knowledge about the options of libvpx-vp9. I think I coupled the quality setting with the constant rate factor of the codec but "I have no idea what I'm doing (tm)". Currently I set it to 8 threads but even when I add threads=%threads I can't adjust it with the controls (like for example with the x264 preset).

f=webm acodec=libopus ar=48000 ab=128k vcodec=libvpx-vp9 vb=2M g=120 bf=2 threads=8 rc_lookahead=16 quality=good speed=1 crf=%quality vprofile=0 slices=4 tile-columns=8 frame-parallel=1 auto-alt-ref=1 lag-in-frames=25

Any chance this could get added (in a refined state) to 15.08 final like Evert's x265 profile?
Comment 5 Jean-Baptiste Mardelle 2015-07-27 18:01:20 UTC
Hi Paul,

There is a slightly similar profile downloadable from our website. In Kdenlive, go to: 
Configure > Download new Render Profile > VPM VP9 > Install

I just committed a fix that prevented the profile to work correctly, so update Kdenlive and download the profile again to test. I will be happy to include an updated profile with 15.08, just let me know what seems the best params for you - between your tests and the website version. I myself have no time to test.

Profile params from website:
f=webm acodec=libopus ar=48000 ab=%audiobitrate+'k' vcodec=libvpx-vp9 vb=%bitrate+'M' g=120 bf=2 rc_lookahead=16 quality=good speed=1 vprofile=0 qmax=51 qmin=11 slices=4 arnr_max_frames=7 arnr_strength=5 arnr_type=3

PS: To make threads adjustable, you must remove any "threads=" option and it will automatically add customizable threads