Open selimsum opened 12 months ago
Does mirroring work?
Is simply running scrcpy supposed to launch mirroring? If yes, then it doesn't work.
C:\scrcpy>scrcpy
scrcpy v2.2 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (tcpip) 127.0.0.1:50132 device SM_S901E
C:\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 125.1 MB/s (64363 bytes in 0.000s)
[server] INFO: Device: [samsung] samsung SM-S901E (Android 11)
[server] ERROR: Could not create default audio encoder for opus
List of audio encoders:
--audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
[server] ERROR: Exception on thread Thread[audio-encoder,5,main]
java.lang.IllegalArgumentException: Failed to initialize audio/opus, error 0xfffffffe
at android.media.MediaCodec.native_setup(Native Method)
at android.media.MediaCodec.<init>(MediaCodec.java:1912)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:1875)
at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:292)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:184)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:124)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:923)
INFO: Renderer: direct3d
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Texture: 720x1280
Is simply running scrcpy supposed to launch mirroring?
Yes. Try with a real device.
Even if it does work with a real device, it doesn't help with my case. I need to make it work with an emulator. It doesn't have to be BlueStacks but it did work with BlueStacks before. See the previous issue I've filed: #4054
Does an older version of scrcpy work on your current bluestack? Does screenrecord work (adb shell screenrecord /sdcard/file.mp4
)?
Try with another encoder (scrcpy --list-encoders
).
Does an older version of scrcpy work on your current bluestack?
I've tried 2.1 and 2.0. They don't work. However, I remember that 2.0 worked with a previous version of BlueStacks. (Not sure which version.)
Does screenrecord work (
adb shell screenrecord /sdcard/file.mp4
)?
The output is a 4KB non-working file.
Try with another encoder (
scrcpy --list-encoders
).
These are the only encoders available in BlueStacks.
C:\scrcpy>scrcpy --list-encoders
scrcpy v2.2 <https://github.com/Genymobile/scrcpy>
INFO: ADB device found:
INFO: --> (tcpip) 127.0.0.1:59429 device SM_S901E
C:\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 175.2 MB/s (64363 bytes in 0.000s)
[server] INFO: Device: [samsung] samsung SM-S901E (Android 11)
[server] INFO: List of video encoders:
--video-codec=h264 --video-encoder='OMX.google.h264.encoder'
[server] INFO: List of audio encoders:
--audio-codec=aac --audio-encoder='OMX.google.aac.encoder'
I haven't used BlueStacks for the past few months but it's likely that a BlueStacks update have rendered scrcpy unusable.
Does screenrecord work (
adb shell screenrecord /sdcard/file.mp4
)?The output is a 4KB non-working file.
OK so it's definitely a problem in the ROM (or bluestack): even the native screenrecorder doesn't work.
Environment
I'm trying to record the screen from BlueStacks.
I've also tried the following but the result is a 1KB non-working file: