Open Uzver123 opened 1 month ago
How do you know what frame rate you actually get?
What is the console output if you add --print-fps
?
How do you know what frame rate you actually get?
Its recording the file i check fps then in mp4
What is the console output if you add
--print-fps
?
I am getting this error if i set --camera-fps to value less than 20
[server] INFO: Device: [OnePlus] OnePlus IN2023 (Android 13)
[server] INFO: Using camera '0'
INFO: Renderer: direct3d
INFO: Texture: 320x240
INFO: FPS counter started
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: Retrying...
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
INFO: 1 fps
[server] INFO: Retrying...
[server] ERROR: Encoding error: java.lang.IllegalStateException: null
[server] INFO: Retrying...
INFO: 1 fps
Did you try with another encoder? https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#encoder
Is screen mirroring working correctly?
Is screen mirroring working correctly?
Regular feed (not camera) is working okay
Did you try with another encoder? https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#encoder
Two of h.264 codecs are working with 15fps
15fps broken --video-codec=h264 --video-encoder='OMX.qcom.video.encoder.avc'
15fps working --video-codec=h264 --video-encoder='c2.android.avc.encoder'
15fps working --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
None of h.265 codecs are working with 15fps, wonder why?
15fps broken --video-codec=h265 --video-encoder='OMX.qcom.video.encoder.hevc'
15fps broken --video-codec=h265 --video-encoder='OMX.qcom.video.encoder.hevc.cq'
15fps broken --video-codec=h265 --video-encoder='c2.android.hevc.encoder'
My goal is to output 4000x3000 video feed at 15fps.
Problem is that two codecs that work with 15fps stop working at resolution higher than 2304x1728 giving this error:
[server] INFO: Device: [OnePlus] OnePlus IN2023 (Android 13)
[server] INFO: Using camera '0'
[server] ERROR: Encoding error: java.lang.IllegalArgumentException: null
[server] ERROR: Exception on thread Thread[video,5,main]
java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2215)
at android.media.MediaCodec.configure(MediaCodec.java:2131)
at com.genymobile.scrcpy.SurfaceEncoder.streamScreen(SurfaceEncoder.java:69)
at com.genymobile.scrcpy.SurfaceEncoder.lambda$start$0$com-genymobile-scrcpy-SurfaceEncoder(SurfaceEncoder.java:253)
at com.genymobile.scrcpy.SurfaceEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:1012)
INFO: Renderer: direct3d
INFO: Texture: 4000x3000
WARN: Device disconnected
Any of this commands will produce above error
scrcpy -b50M --no-audio-playback --video-source=camera --camera-id=0 --camera-fps=15 --camera-size=4000x3000 --video-codec=h264 --video-encoder='c2.android.avc.encoder'
or
scrcpy -b50M --no-audio-playback --video-source=camera --camera-id=0 --camera-fps=15 --camera-size=4000x3000 --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
while this one works fine
scrcpy -b50M --no-audio-playback --video-source=camera --camera-id=0 --camera-fps=15 --camera-size=640x480 --video-codec=h264 --video-encoder='c2.android.avc.encoder'
or
scrcpy -b50M --no-audio-playback --video-source=camera --camera-id=0 --camera-fps=15 --camera-size=640x480 --video-codec=h264 --video-encoder='OMX.google.h264.encoder'
Environment
Describe the bug --camera-id=0 (back, 4000x3000, fps=[15, 29, 30]) --camera-id=1 (front, 2328x1748, fps=[15, 30])
1.2fps full command
scrcpy -b1M --record-format=mp4 --no-audio-playback --video-source=camera --camera-id=0 --video-codec=h264 --camera-fps=15 --camera-size=320x240