Suggestion: improve setting for VP9 webm
It's simple, and my wording may not be quite precise, but you guys and gals will understand. So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too. In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*] I have no rendering, actually no Cinelerra opened right now, so, from memory: It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset. I did use b=0 (which would correspond to -b 0 in the VP9 wiki page (but I see only -b:v 0 in the page). And it did work I can tell you. However, see there around: "more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality" and there is -b:v 0 in the second pass. and around: "must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0." Also find: "FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch." which I find works great as well on my systems. They are relatively new: AMD Ryzen 7 PRO 4750G and also one: AMD Ryzen 7 5700G so if the above maybe would not work well on older machines, then, don't know... So, this is a suggestion to improve the VP9 webm presets in Cinelerra FFmpeg. While I am getting better at understanding the source code, I would still probably be to slow to find it and change it and send a patch myself. Too slow. And that would take me more time than I can set apart at this time. Regards! --- I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes): https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce... It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate. But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand. Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it. Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons) e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.: https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili... or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
From my quick read, it sounds like a thorough analysis and great suggestion. I will have to read and look at all of this more carefully so it can be updated accordingly. And hopefully, Andrew or Andrea will have time to comment too. ...Phyllis
On Sat, Sep 24, 2022 at 3:32 PM Miroslav Rovis via Cin < [email protected]> wrote:
It's simple, and my wording may not be quite precise, but you guys and gals will understand.
So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too.
In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*]
I have no rendering, actually no Cinelerra opened right now, so, from memory:
It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset.
I did use b=0 (which would correspond to -b 0 in the VP9 wiki page (but I see only -b:v 0 in the page). And it did work I can tell you.
However, see there around: "more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality" and there is -b:v 0 in the second pass. and around: "must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0."
Also find: "FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch." which I find works great as well on my systems. They are relatively new: AMD Ryzen 7 PRO 4750G and also one: AMD Ryzen 7 5700G so if the above maybe would not work well on older machines, then, don't know...
So, this is a suggestion to improve the VP9 webm presets in Cinelerra FFmpeg. While I am getting better at understanding the source code, I would still probably be to slow to find it and change it and send a patch myself. Too slow. And that would take me more time than I can set apart at this time.
Regards!
--- I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce... It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili... or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
I changed the subject line: 's/setting/presets/'. On 220924-17:55-0600, Phyllis Smith wrote:
From my quick read, it sounds like a thorough analysis and great suggestion. I will have to read and look at all of this more carefully so it can be updated accordingly. And hopefully, Andrew or Andrea will have time to comment too. ...Phyllis I'm not an expert, but I am an advanced user. Unfortunately, a slow user too. I'm probably correct (except for imprecise wordage) about this.
Because (see below)...
On Sat, Sep 24, 2022 at 3:32 PM Miroslav Rovis via Cin < [email protected]> wrote:
It's simple, and my wording may not be quite precise, but you guys and gals will understand.
So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too.
Because in this wiki page:
In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*] previously there were recommendation on VP9 that correspond with the current presets in Cinelerra. The current version of VP9 wiki page is, I believe, just a few months old.
With the presets that I find in current Cinelerra; I'm yet to open it today and work with it, but I choose preset that are recommended for 1920x1080 30fps and then edit it as below.
I have no rendering, actually no Cinelerra opened right now, so, from memory:
It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset.
I did use b=0 (which would correspond to -b 0 in the VP9 wiki page (but I see only -b:v 0 in the page). And it did work I can tell you.
However, see there around: "more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality" and there is -b:v 0 in the second pass. and around: "must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0."
Also find: "FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch." which I find works great as well on my systems. They are relatively new: AMD Ryzen 7 PRO 4750G and also one: AMD Ryzen 7 5700G so if the above maybe would not work well on older machines, then, don't know...
So, this is a suggestion to improve the VP9 webm presets in Cinelerra FFmpeg. While I am getting better at understanding the source code, I would still probably be to slow to find it and change it and send a patch myself. Too slow. And that would take me more time than I can set apart at this time.
Regards!
--- I have issues with motion plugin (or related to it). So I'll reuse this part below (which is missing a [*] at the start, as I meant the [*] above to refer to it) in a new, separate thread, not so much related to FFmpeg VP9 presets. I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce... It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili... or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
вс, 25 сент. 2022 г., 08:25 Miroslav Rovis via Cin < [email protected]>:
I changed the subject line: 's/setting/presets/'.
On 220924-17:55-0600, Phyllis Smith wrote:
From my quick read, it sounds like a thorough analysis and great suggestion. I will have to read and look at all of this more carefully so it can be updated accordingly. And hopefully, Andrew or Andrea will have time to comment too. ...Phyllis I'm not an expert, but I am an advanced user. Unfortunately, a slow user too. I'm probably correct (except for imprecise wordage) about this.
Because (see below)...
On Sat, Sep 24, 2022 at 3:32 PM Miroslav Rovis via Cin < [email protected]> wrote:
It's simple, and my wording may not be quite precise, but you guys and gals will understand.
So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too.
settings live in ${cin_src_root}/ffmpeg/video and yeah, no row-mt=1 there apart from av1 profile. I only have asymmetric arm 8 core in tablet, and two 4 x86-64 cores in desktop and laptop for testing....
Because in this wiki page:
In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*] previously there were recommendation on VP9 that correspond with the current presets in Cinelerra. The current version of VP9 wiki page is, I believe, just a few months old.
With the presets that I find in current Cinelerra; I'm yet to open it today and work with it, but I choose preset that are recommended for 1920x1080 30fps and then edit it as below.
I have no rendering, actually no Cinelerra opened right now, so, from memory:
It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset.
I did use b=0 (which would correspond to -b 0 in the VP9 wiki page (but I see only -b:v 0 in the page). And it did work I can tell you.
However, see there around: "more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality" and there is -b:v 0 in the second pass. and around: "must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0."
Also find: "FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch." which I find works great as well on my systems. They are relatively new: AMD Ryzen 7 PRO 4750G and also one: AMD Ryzen 7 5700G so if the above maybe would not work well on older machines, then, don't know...
So, this is a suggestion to improve the VP9 webm presets in Cinelerra FFmpeg. While I am getting better at understanding the source code, I would still probably be to slow to find it and change it and send a patch myself. Too slow. And that would take me more time than I can set apart at this time.
Regards!
--- I have issues with motion plugin (or related to it). So I'll reuse this part below (which is missing a [*] at the start, as I meant the [*] above to refer to it) in a new, separate thread, not so much related to FFmpeg VP9 presets. I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce...
It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili...
or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being:
https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key:
https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
On 220925-09:05+0300, Andrew Randrianasulu wrote:
вс, 25 сент. 2022 г., 08:25 Miroslav Rovis via Cin < [email protected]>:
I changed the subject line: 's/setting/presets/'.
On 220924-17:55-0600, Phyllis Smith wrote:
From my quick read, it sounds like a thorough analysis and great suggestion. [...]
On Sat, Sep 24, 2022 at 3:32 PM Miroslav Rovis via Cin < [email protected]> wrote: [...]
So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too.
settings live in ${cin_src_root}/ffmpeg/video
which read: $ cat /mnc/src_n0/Cin/cinelerra/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.webm webm libvpx-vp9 # 20171119-2100 # based on https://developers.google.com/media/vp9/settings/vod/ # for explanations reference the Cinelerra Manual # 1920x1080 (24, 25 or 30 frames per second) b=1800k minrate=900k maxrate=2610k tile-columns=2 g=240 threads=8 quality=good crf=31 speed=4 $ Yes, that's what I (in the render window) used to change to: $ cat /mnc/src_n0/Cin/cinelerra/cinelerra-5.1/ffmpeg/video/vp9_1920x1080_24or25or30fps.webm webm libvpx-vp9 # 20171119-2100 # based on https://developers.google.com/media/vp9/settings/vod/ # for explanations reference the Cinelerra Manual # 1920x1080 (24, 25 or 30 frames per second) b=0 tile-columns=2 g=40 threads=8 crf=31 speed=4 row-mt=1 $ (all the above still from memory, but I'm soon to work as I proposed.) I'm not sure speed=4 and tile-columns=2 help/hurt/make-no-differenc., but I usually leave them as they were.
and yeah, no row-mt=1 there apart from av1 profile. I only have asymmetric arm 8 core in tablet, and two 4 x86-64 cores in desktop and laptop for testing....
That's slow, I don't have a laptop, but I had desktops in such range. It's maybe half an order of magnitude more slowly to work motion plugins with such than what I have. (I went nearly broke, and with all of my savings gone to get me those, and I'm still recovering.)
Because in this wiki page:
In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*] previously there were recommendation on VP9 that correspond with the current presets in Cinelerra. The current version of VP9 wiki page is, I believe, just a few months old.
With the presets that I find in current Cinelerra; I'm yet to open it today and work with it, but I choose preset that are recommended for 1920x1080 30fps and then edit it as below.
I have no rendering, actually no Cinelerra opened right now, so, from memory:
It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset. [...]
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
I compared the old preset (1920*1080; 24-25-30fps) with the new one you proposed. I've Ryzen 3700X and 32 GB RAM. Old preset: ** rendered 1043 frames in 50.496 secs, 20.655 fps, size 6.6 MiB (CPU 20 - 23%) New preset with b=0 and row-mt=1: ** rendered 1043 frames in 64.259 secs, 16.231 fps, size 19.4 (CPU 50 - 70%) The difference in fps, despite the increased CPU usage, I think is explained by the higher quality achieved with your preset. The "threads=..." option should be used in conjunction with "token-parts=3," but I don't see much difference in results. The option "tile-columns=..." should be used in conjunction with "frame-parallel=1," but again I don't notice any difference... In my tests I find no difference using "Use HW device" in "none"; "vaapi" or "vdpau", I think it would take special presets. In general I find VP9 slow, heavy and not efficient on my CinGG (I have not tried ffmpeg from command line due to lack of time).
On 220925-15:28+0200, Andrea paz via Cin wrote:
I compared the old preset (1920*1080; 24-25-30fps) with the new one you proposed. I've Ryzen 3700X and 32 GB RAM.
Old preset:
** rendered 1043 frames in 50.496 secs, 20.655 fps, size 6.6 MiB (CPU 20 - 23%)
New preset with b=0 and row-mt=1:
** rendered 1043 frames in 64.259 secs, 16.231 fps, size 19.4 (CPU 50 - 70%)
The difference in fps, despite the increased CPU usage, I think is explained by the higher quality achieved with your preset. The "threads=..." option should be used in conjunction with "token-parts=3," but I don't see much difference in results. The option "tile-columns=..." should be used in conjunction with "frame-parallel=1," but again I don't notice any difference...
In my tests I find no difference using "Use HW device" in "none"; "vaapi" or "vdpau", I think it would take special presets.
In general I find VP9 slow, heavy and not efficient on my CinGG (I have not tried ffmpeg from command line due to lack of time). --
Interesting. It didn't look so to me, but I may have missed some points in my understanding. If I find time, how can your tests be reproduced? Regards! -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
If I find time, how can your tests be reproduced?
I used 3 free videos taken from: https://mixkit.co/free-stock-video/ I compressed them and you can find them in my dropbox: https://www.dropbox.com/s/9oclu8vb882xbz9/mixkit-.tar.gz?dl=0 I simply concatenated them on the timeline and did the rendering (they have no audio tracks).
On 220925-19:25+0200, Andrea paz wrote:
If I find time, how can your tests be reproduced?
I used 3 free videos taken from: https://mixkit.co/free-stock-video/
I compressed them and you can find them in my dropbox: https://www.dropbox.com/s/9oclu8vb882xbz9/mixkit-.tar.gz?dl=0
I simply concatenated them on the timeline and did the rendering (they have no audio tracks).
Well, that's free space there, not libre, no, that's the free beer kind of free space. Have a look: https://www.croatiafidelis.hr/foss/cap/cap-220925-cinelerra/Screen_220925_20... [*] Whatever else in that screencast, is I was just doing those other things, they were not meant for this discussion, I did not expect the "free space" would be so unfriendly without cookies and something else, God knows what... I did not know ahead of time that I would post that screencast. And in libre software, discussing for just the two of us, in public, makes little sense, whatever it be. [**] It should be either a method to use, and the videos the same for a number of (even different) tests, but easily available without some "free space" poking their nose into people's private territory, which operating systems and storage should be. Or some such. Like via this free space, where after a while so very likely you upload is no longer downloadable or even nonexistent, that's not the way, IMO. It'll be midly scary to look up the netwok conversations that "free space" was doing/trying to do to my box. I do trace the network wherever I go, and mostly I can decrypt what happened, but that is such complex affair, it's hard to even begin to tell... (Also, I might be running out of time, but I must stress *might be*.) Regards! ---- [*] Inaccessible from HTML of: https://www.croatiafidelis.hr/foss/cap/cap-220925-cinelerra/ just via that link, for now. [**] And so I created that https://www.croatiafidelis.hr/foss/cap/cap-220925-cinelerra/index.php because the discussion is public, and libre software is open about its own virtues and faults. -- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
Miroslav, Your ivp9 webm improvements/simplifications look good to me. After running some tests, I have checked into GIT a new vp9.webm with only the 3 lines of b=0, crf=31, row-mt=1. From Andrea's tests, it seems like the other option lines are maybe not needed. I ran with and without them and I only saw a small size difference in the resulting file and could not visually see any difference. As far as speed goes, I just got varying results and for me it is slow like Andrea report and since I only do testing, I have the need for speed. Also, I made the default for new configurations/users to be "vp9.webm" instead of "webm.webm". (Plus deleted old library versions of libvpx 1.11.0 and libaom 3.2.0 and their associated patches.) On Sat, Sep 24, 2022 at 3:32 PM Miroslav Rovis via Cin < [email protected]> wrote:
It's simple, and my wording may not be quite precise, but you guys and gals will understand.
So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too.
In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*]
I have no rendering, actually no Cinelerra opened right now, so, from memory:
It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset.
I did use b=0 (which would correspond to -b 0 in the VP9 wiki page (but I see only -b:v 0 in the page). And it did work I can tell you.
However, see there around: "more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality" and there is -b:v 0 in the second pass. and around: "must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0."
Also find: "FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch." which I find works great as well on my systems. They are relatively new: AMD Ryzen 7 PRO 4750G and also one: AMD Ryzen 7 5700G so if the above maybe would not work well on older machines, then, don't know...
So, this is a suggestion to improve the VP9 webm presets in Cinelerra FFmpeg. While I am getting better at understanding the source code, I would still probably be to slow to find it and change it and send a patch myself. Too slow. And that would take me more time than I can set apart at this time.
Regards!
--- I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce... It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili... or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
A note before some reply. I am both slow and busy. I also have the interesting and certainly useful email by Georgy to work by, but the above applies. Also (and that's why I've added Andrea), the samples (Andrea's and also the shaker that Georgy sent, because after say 1 year, try and find it searching emails within very short time! Not easy, unless you're the author and know exactly what you searching.) *should* be downloadable from a directory somewhere in https://www.cinelerra-gg.org/ and testing at least somewhat standardized, so anybody can reproduce it. Got to go now. Need more time. (but there is one more line or two of mine below). On 220926-14:14-0600, Phyllis Smith wrote:
Miroslav, Your ivp9 webm improvements/simplifications look good to me. After running some tests, I have checked into GIT a new vp9.webm with only the 3 lines of b=0, crf=31, row-mt=1. From Andrea's tests, it seems like the other option lines are maybe not needed. I ran with and without them and I only saw a small size difference in the resulting file and could not visually see any difference. As far as speed goes, I just got varying results and for me it is slow like Andrea report and since I only do testing, I have the need for speed.
Also, I made the default for new configurations/users to be "vp9.webm" instead of "webm.webm".
(Plus deleted old library versions of libvpx 1.11.0 and libaom 3.2.0 and their associated patches.) Because the FFmpeg folks are mostly experts and the current (updated not much longer than just a few months ago) VP9 Wiki wouldn't be there as it is if it weren't correct. I myself only tried to follow it.
I read all the above, and I wish to git pull the updated source, to see for myself. When time permits.
On Sat, Sep 24, 2022 at 3:32 PM Miroslav Rovis via Cin < [email protected]> wrote:
It's simple, and my wording may not be quite precise, but you guys and gals will understand.
So, when using the setting in the render window, I figured out that there are better settings to use than the presets that are offered. And they are simpler too.
In essence, the Wiki page for VP9 can tell you all: https://trac.ffmpeg.org/wiki/Encode/VP9 [*]
I have no rendering, actually no Cinelerra opened right now, so, from memory:
It's just b=0, then add crf=31 (or other number), and then row-mt=1, and remove the min and max settings from the preset.
I did use b=0 (which would correspond to -b 0 in the VP9 wiki page (but I see only -b:v 0 in the page). And it did work I can tell you.
However, see there around: "more contemporary CRF-style approach for the final pass to achieve a certain perceptual quality" and there is -b:v 0 in the second pass. and around: "must use a combination of -crf and -b:v 0. Note that -b:v MUST be 0."
Also find: "FFmpeg added support for row based multithreading in version 3.4, released on January 25th, 2018. As of libvpx version 1.7.0 this multithreading enhancement is not enabled by default and needs be manually activated with the -row-mt 1 switch." which I find works great as well on my systems. They are relatively new: AMD Ryzen 7 PRO 4750G and also one: AMD Ryzen 7 5700G so if the above maybe would not work well on older machines, then, don't know...
So, this is a suggestion to improve the VP9 webm presets in Cinelerra FFmpeg. While I am getting better at understanding the source code, I would still probably be to slow to find it and change it and send a patch myself. Too slow. And that would take me more time than I can set apart at this time.
Regards!
--- I've been using VP9 (previously VP8) webm a lot. E.g. anywhere you go from: https://www.croatiafidelis.hr/2022/ or, to take just one sample (4 minutes):
https://www.croatiafidelis.hr/2022/Jazovka/VID-2022-06-22-1034-Jazovka-proce... It's nothing but motion plugin set up, blur plugin in the bottom video at 100%, and go render. Then work the audio separately, mux and post. Of course, the stabilizing is slow, motion plugin takes long to calculate.
But all those people moving can be scrutinized in a lot of detail, as if I filmed with a mobile phone attached to a good stabilizer, and instead, the original was a shaky video as ever, because I held the mobile with just my hand.
Cinelerra can stabilize you videos well. It's worth the time-expensive learning curve to get to know how to do it.
Here are some comparison videos with both the shaky and stabilized video (however I've gotten better since then, these are all old, but I have no other comparisons)
e.g. from: https://www.croatiafidelis.hr/2019/ the videos e.g.:
https://www.croatiafidelis.hr/2019/Jaska/190824-Jaska-Vukovic-demo-1-stabili... or from: https://www.croatiafidelis.hr/2015/Macelj/Macelj-2-cmp.php the video being: https://www.croatiafidelis.hr/2015/Macelj/150607-Macelj-HebrangCOMP.webm
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- Miroslav Rovis Zagreb, Croatia https://www.CroatiaFidelis.hr my PGP-key: https://www.croatiafidelis.hr/FCF13245ED247DCE443855B7EA9884884FBAF0AE.asc
participants (4)
-
Andrea paz -
Andrew Randrianasulu -
Miroslav Rovis -
Phyllis Smith