Log in

View Full Version : Encoder parameters for wireless streaming


koliva
18th December 2012, 15:18
Hi all,

I am using x264 encoder to encode my captured frames at about 30fps with:

x264_param_default_preset(&param, "ultrafast", "zerolatency");

The encoded bitstream is sent over wireless network and will be decoded at the other side, then shown on the screen. My code runs perfect over network but sucks a bit when it comes to wireless. I have a test video (res: 1600x900) and when I am testing my setup with this video, naturally the bitrate jumps sometimes to 13 Mbps which is beyond the limit of my wireless network bandwidth which is abput 7 Mbps in my case. I have tried to use vbv parameters to limit it,

param.rc.i_vbv_max_bitrate = 4500;
param.rc.i_vbv_buffer_size = 4500;

and also I set

param.i_keyint_min = 9999;
param.i_keyint_max = 9999;

but the problem now is that quality is dropped reasonably. When I encode the stream with

x264_param_default_preset(&param, "superfast", "zerolatency");

a small delay occurs which is not much of a problem for now. The peak point drops from 13 Mbps to 3 Mbps, which is perfect. However the bitrate also drops to about 13 fps from 30 fps which I don't want. Could you please tell me what settings should I set for this? Apparently I have a little bit room in bit-rate if I choose superfast. How can I say that increase the frame rate and compromise from the bitrate?

koliva
19th December 2012, 09:37
No help? Any comment?

Blue_MiSfit
19th December 2012, 23:59
Why did you set keyint min and max to 9999???


The peak point drops from 13 Mbps to 3 Mbps, which is perfect. However the bitrate also drops to about 13 fps from 30 fps which I don't want

This makes no sense.

koliva
21st December 2012, 11:22
Why did you set keyint min and max to 9999???


This makes no sense.

I set them to "infinite" just to be able to use i_vbv_max_bitrate and i_vbv_buffer_size. Otherwise they don't work.
I could also set b_intra_refresh =1; instead. How should I have done? What else parameters do I need to set?

Thank you.

Asmodian
21st December 2012, 23:21
Doesn't setting "param.i_keyint_min = 9999" effectively disable I frames? That cannot be what you want, is it? You cannot have to set it this way to get VBV working.

However the bitrate also drops to about 13 fps from 30 fps which I don't want. Could you please tell me what settings should I set for this?

Please try restating your question, we don't understand what you are asking. How does the FPS change when changing bit-rate (or how does bitrate have units of FPS)?