Closed Panha-VTechs closed 7 months ago
Hello,
If you only have that blur in the stream result you can try using a higher bitrate in prepareVideo method but if the blur is also in the preview you will need check your cameraX code because maybe the problem is related with your autofocus.
You have a guide about bitrate here: https://support.google.com/youtube/answer/2853702?hl=en
I have this problem only while streaming. So if i'm try using higher bitrate in prepareVideo method, it mean that it required fast internet connection. While I used high bitrate, streaming video output blur when internet connection is slow.
Thank
You can't solve it. This is the way an encoder works. If you have a low bitrate you will have that blur or pixelate while moving device.
setBitrateOnFly is used to avoid skip video frames using slow connections because lose a bit of quality is better than lose frames producing freezing. The main idea about the bitrate is maintain all time as possible a good bitrate and reduce bitrate if the internet speed is slow to avoid freezing the stream. While you have a low bitrate you can notify to the user that internet connection is poor to know that the quality is reduced and should go to a site with good connection
You can reduce the bitrate using with H265 or AV1 (recommended H265 because AV1 is not available in most of devices) because this codec need a lower bitrate to get a good quality (you can reduce like 20-30% the bitrate and get a similar quality than H264 depend of you device codec implementation)
Okay thank you @pedroSG94. So If there're a way to choose encoder H265 as I use StreamBase Class? The idea is that we want to choose H265 if it's available if not we choose H264.
Thank
You can use H265 like this:
rtmpCamera?.setVideoCodec(VideoCodec.H265)
If your device can't use H265 prepareVideo method return false
Remember that your media server need support H265
Okay thank you so much @pedroSG94.
Hello there,
May I know if there're any possible way to prevent streaming video output blur when moving camera with cameraX api?
Thank