Dafang-Hacks / Main

138 stars 63 forks source link

Allow selection of fixed qp, vbr, cbr or smart when starting v4l2rtsp… #4

Closed Dopeyr closed 6 years ago

Dopeyr commented 6 years ago

Hi,

I've been looking at the different options for the rcMode when running sample_encoder_init(). From the 'carrier sample' they allow vbr/cbr/smart/fixqp.

I've been playing around with the different options, and found the 'smart' setting works best for me, especially when playing with the qualityLvl property. But this isn't conclusive, it seems to vary, so I'll keep experimenting.

I was tired of recompiling each time (@EliasKotlyar thanks for making it so easy with the ./compile.sh!), so I think I've managed to allow the selection of this at runtime.

If you pass the -r param, you should be able to set the mode.

I don't know CPP, so this is largely copy/paste and hoping! It seems to work for me, but any feedback would be appreciated!

If this is accepted, I think a next step would be to set some of the other options via setconf (e.g. qualityLvl).

Thanks

nik0 commented 6 years ago

Nice ! I didn't know about the "smart" config. I am working around the bitrate configuration on the GUI. I will add the QP stuff Did you play with qualityLV1, does it change something ?

nik0 commented 6 years ago

Good !! @jmtatsch can you merge ? I don't have the rights ...

jmtatsch commented 6 years ago

I also don’t have merge rights. @EliasKotlyar can you please merge this?

EliasKotlyar commented 6 years ago

I have merged it.

@nik0 and @jmtatsch : I hope you now have the rights