Open Ryan2009 opened 1 year ago
Same problem as you, in Kubuntu 22.04 LTS.
It seems there is no OPUS encoder on your device.
scrcpy --list-encoders
scrcpy --audio-encoder=aac
It seems there is no OPUS encoder on your device.
scrcpy --list-encoders
scrcpy --audio-encoder=aac
It's ok in redroid. but other exception in my phone. android 12.
[server] INFO: Device: vivo V2055A (Android 12)
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getOpPackageName()' on a null object reference
at android.media.VivoAudioRecordImpl.isSupportSubMixRecording(VivoAudioRecordImpl.java:133)
at android.media.AudioRecord.<init>(AudioRecord.java:497)
at android.media.AudioRecord.<init>(AudioRecord.java:91)
at android.media.AudioRecord$Builder.build(AudioRecord.java:935)
at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58)
at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:922)
INFO: Recording started to matroska file: file.mkv
INFO: Renderer: direct3d
WARN: Demuxer 'audio': stream explicitly disabled by the device
WARN: Audio stream recording disabled
INFO: Initial texture: 1080x2400
INFO: Recording complete to matroska file: file.mkv
Yes, for this vivo phone it does not work. See https://github.com/Genymobile/scrcpy/pull/3757#issuecomment-1454326127
can i help in any way to solve this issue?
Same on Nvidia Shield Android TV 9.1.1(33.2.0.157)...
C:\adbLink>scrcpy.exe -s 192.168.2.181:5555
scrcpy 2.0 <https://github.com/Genymobile/scrcpy>
C:\adbLink\adbfiles\scrcpy\scrcpy-... file pushed, 0 skipped. 10.6 MB/s (52867 bytes in 0.005s)
[server] INFO: Device: NVIDIA SHIELD Android TV (Android 11)
[server] ERROR: Exception on thread Thread[Thread-4,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:2117)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.AudioEncoder.createMediaCodec(AudioEncoder.java:278)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:174)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:923)
INFO: Renderer: direct3d
ERROR: Demuxer 'video': stream disabled due to connection error
WARN: Demuxer 'audio': stream explicitly disabled by the device
ERROR: Demuxer error
[server] ERROR: Exception on thread Thread[main,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.createPackageContext(java.lang.String, int)' on a null object reference
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)
at android.media.MediaCodec.isSupported(MediaCodec.java:1892)
at android.media.MediaCodec.checkAppForAutoFrc(MediaCodec.java:1922)
at android.media.MediaCodec.configureCodecParams(MediaCodec.java:2084)
at android.media.MediaCodec.<init>(MediaCodec.java:2118)
at android.media.MediaCodec.createEncoderByType(MediaCodec.java:2042)
at com.genymobile.scrcpy.ScreenEncoder.createMediaCodec(ScreenEncoder.java:209)
at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:64)
at com.genymobile.scrcpy.Server.scrcpy(Server.java:133)
at com.genymobile.scrcpy.Server.main(Server.java:381)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:399)
WARN: Killing the server...
@Lautsprecher #3801
@Ryan2009 Could you please test whether https://github.com/Genymobile/scrcpy/issues/3801#issuecomment-1468897171 also fixes your issue?
@Lautsprecher #3801
@Ryan2009 Could you please test whether #3801 (comment) also fixes your issue?
With --no-audio scrcpy will start, Thanks for the Link
@Lautsprecher and with audio, scrcpy --audio-codec=aac
and https://github.com/Genymobile/scrcpy/issues/3801#issuecomment-1468897171 ?
@Lautsprecher and with audio,
scrcpy --audio-codec=aac
and #3801 (comment) ?
Wow, with replaced scrcpy-server file i also got Audio :) Thank You!
audio is still not working with the new file #3801 on My Vivo smartphone.
@A-viral-dev OK thank you. So no solution for vivo phones (#3805)… :disappointed:
Could you please adb pull /system/framework/framework.jar
from your Vivo device and post your framework.jar
(similar to https://github.com/Genymobile/scrcpy/issues/3801#issuecomment-1468362200), to check what android.media.VivoAudioRecordImpl.isSupportSubMixRecording()
is doing.
Here's the file link
Thank you. Could you please paste the full error you have in the console. Is it exactly the same as #3805 ?
Yes, same error.
OK (of course, you are the author of #3805 :smile: )
at android.media.VivoAudioRecordImpl.isSupportSubMixRecording(VivoAudioRecordImpl.java:133)
I could not find any VivoAudioRecordImpl
, only VivoAudioRecord
.
Any idea @yume-chan?
Maybe it's in another jar.
What is the result of adb shell ls /system/framework
?
QPerformance.jar QXPerformance.jar UxPerformance.jar WfdCommon.jar abx.jar am.jar android.hardware.wifi.supplicant-V1.0-java.jar android.hardware.wifi.supplicant-V1.1-java.jar android.hardware.wifi.supplicant-V1.2-java.jar android.hardware.wifi.supplicant-V1.3-java.jar android.hidl.base-V1.0-java.jar android.hidl.manager-V1.0-java.jar android.test.base.jar android.test.mock.jar android.test.runner.jar appwidget.jar arm arm64 bmgr.jar boot-QPerformance.vdex boot-UxPerformance.vdex boot-WfdCommon.vdex boot-core-icu4j.vdex boot-ext.vdex boot-framework-adapter.vdex boot-framework-graphics.vdex boot-framework.vdex boot-ims-common.vdex boot-qcom.fmradio.vdex boot-soc-framework.vdex boot-tcmiface.vdex boot-telephony-common.vdex boot-telephony-ext.vdex boot-vivo-framework.vdex boot-vivo-media.vdex boot-vivo-vgcclient.vdex boot-voip-common.vdex bu.jar com.android.future.usb.accessory.jar com.android.location.provider.jar com.android.media.remotedisplay.jar com.android.mediadrm.signer.jar com.android.wm.shell.jar com.novatek.framework.jar content.jar ext.jar framework-adapter.jar framework-graphics.jar framework-res.apk framework.jar hid.jar ims-common.jar incident-helper-cmd.jar javax.obex.jar locksettings.jar monkey.jar oat org.apache.http.legacy.jar org.apache.http.legacy.jar.prof qcom.fmradio.jar requestsync.jar services-adapter.jar services.jar services.jar.bprof services.jar.prof sm.jar soc-framework.jar soc-services.jar svc.jar tcmclient.jar tcmiface.jar telecom.jar telephony-common.jar telephony-ext.jar uiautomator.jar uinput.jar vendor.qti.hardware.radio.qtiradio-V1-java.jar vivo-framework.jar vivo-media.jar vivo-priv-telephony-common.jar vivo-res.apk vivo-services.jar vivo-telephony-common-platform-ex.jar vivo-telephony-common.jar vivo-telephony-ext.jar vivo-vgcclient.jar voip-common.jar vr.jar wapicertstore.jar wmshellapp.apk
Maybe:
adb pull /system/framework/vivo-framework.jar
adb pull /system/framework/vivo-media.jar
@Lautsprecher #3801
@Ryan2009 Could you please test whether #3801 (comment) also fixes your issue?
Please test (replace this binary in the v2.0 release):
scrcpy-server SHA-256: 4f40f140ddf14f62c0ff47c47071471a4d3adef827126388b5cd064c7b919d8d
[server] INFO: Device: vivo V2055A (Android 12)
[server] ERROR: Exception on thread Thread[Thread-4,5,main]
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getOpPackageName()' on a null object reference
at android.media.VivoAudioRecordImpl.isSupportSubMixRecording(VivoAudioRecordImpl.java:133)
at android.media.AudioRecord.<init>(AudioRecord.java:497)
at android.media.AudioRecord.<init>(AudioRecord.java:91)
at android.media.AudioRecord$Builder.build(AudioRecord.java:935)
at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58)
at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90)
at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183)
at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120)
at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2)
at java.lang.Thread.run(Thread.java:922)
INFO: Renderer: direct3d
WARN: Demuxer 'audio': stream explicitly disabled by the device
INFO: Initial texture: 1080x2400
I use the scrcpy-server , met the same issue. this jar get from myphone
@Lautsprecher #3801 @Ryan2009 Could you please test whether #3801 (comment) also fixes your issue?
Please test (replace this binary in the v2.0 release):
scrcpy-server SHA-256: 4f40f140ddf14f62c0ff47c47071471a4d3adef827126388b5cd064c7b919d8d
[server] INFO: Device: vivo V2055A (Android 12) [server] ERROR: Exception on thread Thread[Thread-4,5,main] java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getOpPackageName()' on a null object reference at android.media.VivoAudioRecordImpl.isSupportSubMixRecording(VivoAudioRecordImpl.java:133) at android.media.AudioRecord.<init>(AudioRecord.java:497) at android.media.AudioRecord.<init>(AudioRecord.java:91) at android.media.AudioRecord$Builder.build(AudioRecord.java:935) at com.genymobile.scrcpy.AudioCapture.createAudioRecord(AudioCapture.java:58) at com.genymobile.scrcpy.AudioCapture.start(AudioCapture.java:90) at com.genymobile.scrcpy.AudioEncoder.encode(AudioEncoder.java:183) at com.genymobile.scrcpy.AudioEncoder.lambda$start$0$com-genymobile-scrcpy-AudioEncoder(AudioEncoder.java:120) at com.genymobile.scrcpy.AudioEncoder$$ExternalSyntheticLambda0.run(Unknown Source:2) at java.lang.Thread.run(Thread.java:922) INFO: Renderer: direct3d WARN: Demuxer 'audio': stream explicitly disabled by the device INFO: Initial texture: 1080x2400
I use the scrcpy-server , met the same issue. this jar get from myphone
Did the above and met with the same issue. Attached is the jar from my phone. vivo-media_framework.zip Thanks.
we should merge #3805 and all other Vivo issues in one thread
Environment
Describe the bug A clear and concise description of what the bug is.
adb logcat :