-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Encoder Options? #328
Comments
Bitrate and definition (width × height), not framerate (fps). Framerate is not configurable: a new frame is produced every time the surface is updated on the device (
Fast (realtime) encoding cannot achieve the quality of slow encoding 😄
I'm not sure other codec parameters deserve to be exposed in scrcpy, but maybe I'm wrong.
Yes.
Then do that.
|
There is a lot of stuff in here... I don't know how much of that is available to you, but for instance, it does include the full/limited color range mode... I can't find a static list of encoders... it always seems to say use MediaCodecInfo to get what is available. Possibly different devices or different chip-sets have these hard-coded? The other option could be... (and I'm speaking with 0% confidence on this, no idea if it's possible haha) |
The default is "limited color range". It will not impact what you called "pretty harsh compression" 😉
This key has been added very recently (in API 28) to target a specific "quality" instead of a target bitrate.
We don't need the FFmpeg binary on Android, and not even a FFmpeg lib, since we use MediaCodec, the "native" Android API, which typically uses hardware acceleration, and does not require shipping additional stuff. |
True, it will not impact compression, but it was the first thing I noticed, that the color range was not reaching full black and white. It makes everything look muddy and grey. I think it would have a significant impact on image quality and doesn't involve the encoder/compression/bitrate issue at all. I wish I knew how to do it so I could test it :(
That is an interesting concept, but I see what you're saying. It would function essentially like the bitrate, the only difference being static quality, variable bitrate instead of static bitrate, variable quality. If the bitrate is limited arbitrarily, then it won't provide any benefit. 🤷♂️
I understand what you're saying about MediaCodec. The only reason I suggested it is if it offered more configuration, but yes, very likely it would be slower or offer very marginal improvement with a significant increase in size/complexity. |
Also, is it possible to change encoder? I have this |
@luisscripts It would require to support these codecs on the client. For now, everything is hardcoded for H.264. It will probably support AV1 or HEVC once devices have hardware encoders for them, but probably not old-generation codecs like H.263. |
Thanks for the reply! Oddly though, with a Kitkat cooked ROM in the same device i have H.264 Encoder/Decoder, even being able to record video through adb. I guess the Lollipop ROM doesn't have the needed driver for it, as it is cooked... |
is it possible to add a black & white option from command line parameter? |
Ref: #1226 (comment) |
Closed by #1325. |
Is it possible to view and/or edit the encoder settings beyond bitrate and fps? It seems like there is more available on the encoder (i.e. compression, format, color format, etc) from looking at the logs. I can't find anything related to this in adb. Really, I am trying to get a bit better quality. For instance, it appears to pass limited dynamic range (blacks appear gray), and the compression is pretty harsh. I have tried with bitrate at 100M etc, but it caps somewhere after 8M. I would rather have a smaller WxH with less compression for the same bitrate.
Just curious to know your thoughts about if it is possible. Here is some of the log relating to encoder. Thanks for this project 👍
The text was updated successfully, but these errors were encountered: