Open leksmax opened 1 year ago
Is it slow over USB?
cant connect via usb now. in logcat many mesages like this 04-21 14:00:53.020 849 849 I ThermalService: CPU temperatures: [56.500004] 04-21 14:00:53.036 3000 3023 D CCodecBuffers: [c2.android.opus.encoder#498:Output[N]] popFromStashAndRegister: output format changed to AMessage(what = 0x00000000) = { 04-21 14:00:53.036 3000 3023 D CCodecBuffers: int32_t bitrate = 128000 04-21 14:00:53.036 3000 3023 D CCodecBuffers: int32_t channel-count = 2 04-21 14:00:53.036 3000 3023 D CCodecBuffers: int32_t flac-compression-level = 10 04-21 14:00:53.036 3000 3023 D CCodecBuffers: int32_t max-bitrate = 128000 04-21 14:00:53.036 3000 3023 D CCodecBuffers: string mime = "audio/opus" 04-21 14:00:53.036 3000 3023 D CCodecBuffers: int32_t sample-rate = 48000 04-21 14:00:53.036 3000 3023 D CCodecBuffers: Buffer *csd-0 = 0xebb0fbd0 04-21 14:00:53.036 3000 3023 D CCodecBuffers: }
If you record (scrcpy --no-display --record=file.mp4
), is the recorded file "laggy"?
yes, the video recording is also delayed. But on the device itself there is no delay when navigating (up-down, left-right)
the video recording is also delayed
How do you observed that it is "delayed" when you play the recorded file?
Could you share such a recorded file (for a few seconds)?
If it is laggy, then the problem is on the device video capture.
Does it work better with a lower resolution? (for example scrcpy -m1024
)?
with lower resolution the speed is slightly faster https://drive.google.com/file/d/1JHeGEc1tGNEIGU7P7ygXPlKhfrshyokc/view?usp=share_link
OK so you have a low capture framerate. It's a problem on the device encoder.
Try with another encoder if several are available (scrcpy --list-encoders
).
scrcpy --list-encoders scrcpy 2.0 https://github.com/Genymobile/scrcpy /usr/local/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 177.6 MB/s (52867 bytes in 0.000s) [server] INFO: List of video encoders: --video-codec=h264 --video-encoder='c2.android.avc.encoder' --video-codec=h264 --video-encoder='OMX.google.h264.encoder' [server] INFO: List of audio encoders: --audio-codec=opus --audio-encoder='c2.android.opus.encoder' --audio-codec=aac --audio-encoder='c2.android.aac.encoder' --audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
with any codec it is also slowly displayed on the computer screen and fps is about 10
Is there any solution to this encoder problem? do i need to patch scrcpy or add another encoder to android tv box?
This is probably a hardware problem on the device itself (a tv box may not have an efficient encoder because this is not useful like when there is a camera).
Set the HDMI Resolution to 1080P or 720P then it works fast
Environment
very slow scrcpy. I connect via ip address.Adb latest version .