New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using av1 #1408
Comments
Hello, You only need call setVideoCodec method to do it (this is valid with all clases that use RTMP or RTSP stream, no matter if you use camera1, camera2, display or fromfile): rtspCamera1.setVideoCodec(VideoCodec.AV1); You need call it before prepareVideo method. If your device can't encode using your prepareVideo parameters or your device hasn't AV1 encoder the prepareVideo method will return false. Remember that maybe your device can decode AV1 but maybe you can't encode using AV1. Currently AV1 encoding is only mandatory for devices with Android 14+ and in most of cases only software encoder is implemented. Maybe setVideoCodec to VideoCodec.H265 instead of VideoCodec.AV1 is recommended to get a better quality (it is not AV1 but it is better than H264) because it is more extended and supported in almost all devices. |
I see.
But in genericCamera2 we got restriction
Changing this method like this
Worked for me, but it seems that we should add if statement to srtClient in case of passing not H264 or H265. |
Hello, This is intentional for all generic classes. I did this because you can't set AV1 codec to a protocol that no support that codec. Keep in mind that your implementation of that method is configured to use different codecs depend of the stream protocol and this will produce errors depend of the protocol used. I recommend you use RtspCamera2 if you only want use RTSP protocol to avoid errors |
Hi pedro! Currently I'am running extended background example as a streaming option with H264 codec. My phone supports AV1 codec and I've seen that now RTSP supports av1 codec. Can I somehow implement av1 codec to my existing code or I should change to other example activity. Because as I see rn I can't use av1 in background activity.
The text was updated successfully, but these errors were encountered: