Re: Getting VP8 to respect bitrate limit in CBR / Realtime

491 views
Skip to first unread message

jacobh...@gmail.com

unread,
Nov 2, 2014, 7:31:40 AM11/2/14
to webm-d...@webmproject.org, jaha...@gmail.com
have you managed to get libvpx to respect the bitrate  ? how ?

On Tuesday, February 19, 2013 11:33:38 PM UTC+2, jaha...@gmail.com wrote:
We've tried using VP8 in CBR / Realtime mode, and we can't get it to respect the target bitrate, even with the undershoots set to 0.  At a target bitrate of 200kbps, when the input video has large movements (we're a screen sharing application, so an example of a large movement would be scrolling a webpage), we routinely see output bitrates of 1900kbps.  At a target of 1000kbps, we've even seen output bitrates of 6000kbps.

The only option seems to be dropframe threshold, but that results in a low frame rate.

We want the framerate to be untouched, but we want VP8 to do whatever else it can (drop quality) to respect the target bitrate.  Is this possible?

J

p.s. This is a TL;DR version of my previous post.

Debargha Mukherjee

unread,
Nov 3, 2014, 1:48:08 PM11/3/14
to WebM Discussion, jaha...@gmail.com
Try adding these two parameters: --undershoot-pct=x --overshoot-pct=x
Default values are 100 for each.
With x = 25, bit-rate control should be sufficiently tight for most applications. Make it smaller to get even tighter.

Debargha.

--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss...@webmproject.org.
To post to this group, send email to webm-d...@webmproject.org.
Visit this group at http://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.



--
Debargha Mukherjee, Ph.D.
Staff Software Engineer,
Google, Inc.
Phone: 650-253-0775 (desk), 408-234-5956 (cell)

Jacob S

unread,
Nov 4, 2014, 3:42:18 AM11/4/14
to webm-d...@webmproject.org, jaha...@gmail.com
I tried with low undershoot and overshoot ( I tried 15,25,5 ) , but if I set high max-q then the bitrate is low and the quality is also very low ( even when video has no movement at all ) and if I set lower max-q ( 40 ) the quality is good but the bitrate goes much higher than target-bitrate.

I am testing with v1.3.0, ( is this fixed on master ? ) , vp8, on android arm.
these are my configurations:
--end-usage=cbr , --deadline=1 , --target-bitrate=400 , --buf-sz=1000 ,  --buf-initial-sz=500,  --buf-optimal-sz=600 , --overshoot-pct=10 , --undershoot-pct=10 , --kf-max-dist=999999

Harald Alvestrand

unread,
Nov 4, 2014, 9:10:42 AM11/4/14
to webm-d...@webmproject.org, jaha...@gmail.com
Setting max-q tells the optimizer that you think good quality is more important than keeping the bitrate low, so you should expect overshoots in that case. If you think low bitrate is important, don't set max-q.

What is the input resolution and the kind of material (large movement? Lots of details?) ie how realistic is it to get to 400k at any sort of decent quality?

You may want to experiment with --drop-frames=1, so that the encoder can drop frames when it can't find any other way to keep the bitrate as specified. Also try with removing the --undershoot-pct limitation - that will allow the encoder more flexibility.

Jacob S

unread,
Nov 4, 2014, 9:27:00 AM11/4/14
to webm-d...@webmproject.org
2014-11-04 16:10 GMT+02:00 'Harald Alvestrand' via WebM Discussion <webm-d...@webmproject.org>:
Setting max-q tells the optimizer that you think good quality is more important than keeping the bitrate low, so you should expect overshoots in that case. If you think low bitrate is important, don't set max-q.

What is the input resolution and the kind of material (large movement? Lots of details?) ie how realistic is it to get to 400k at any sort of decent quality?


I am doing screen mirroring usually 960x600 10fps, some times its large movement and lots of details and some times very static, that is why I need the quality to vary according to screen content, that is if there is allot of movement the quality should be low, but when the screen is still it should correct ( enhance ) the image. I am limited to the network speed ( and on many cases when allot of traffic and packet loss I wont have more than 300/400kbps ) is this part of vp8 capabilities ?
 
You may want to experiment with --drop-frames=1, so that the encoder can drop frames when it can't find any other way to keep the bitrate as specified. Also try with removing the --undershoot-pct limitation - that will allow the encoder more flexibility.


Would changing to vp9 give me better results for realtime encoding with low bitrate ? ( with android device cpu capabilities )
 

Debargha Mukherjee

unread,
Nov 4, 2014, 1:01:31 PM11/4/14
to WebM Discussion
Actually - the parameters I mentioned were for VP9. Did not see that you were actually asking about VP8.

For real-time low delay VP9, try --codec=vp9 --end-usage=cbr --rt --cpu-used=5

Johann Koenig

unread,
Nov 4, 2014, 1:05:42 PM11/4/14
to webm-d...@webmproject.org
On Tue, Nov 4, 2014 at 6:26 AM, Jacob S <jacobh...@gmail.com> wrote:
> Would changing to vp9 give me better results for realtime encoding with low
> bitrate ? ( with android device cpu capabilities )

vp9 needs some arm optimizations before it will work well for this
situation. We will be working on them soon and patches are always
welcome.

For your question about 1.3.0 vp8 - there have been improvements since
then and I would recommend using the latest git. We are planning a new
release soon.
Reply all
Reply to author
Forward
0 new messages