Skip to content
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

Can't set camera to record when connected to scrcpy.exe or ADB #498

Closed
Fine-Tune opened this issue Apr 12, 2019 · 6 comments
Closed

Can't set camera to record when connected to scrcpy.exe or ADB #498

Fine-Tune opened this issue Apr 12, 2019 · 6 comments
Labels

Comments

@Fine-Tune
Copy link

Hi,

When connected to scrcpy everything works fine, except I can't enable the camera app to record video or take a picture. I'm using open camera but with the default camera I have the same issue.

I'm trying to record a video while my phone is on a tripod and connected through USB to my desktop. I would like to set the camera in recording mode while monitoring what I'm filming on one of my desktop monitors.

When I press record, it doesn't stay in rec mode, yet a VID file is written on my sd card but has 0 data.

I tried cat-log to see what's wrong but it shows no errors at all.

Any suggestions would be welcome, thanks!

@Fine-Tune
Copy link
Author

I should have mentioned, the phone is a Samsung S5Neo running Android 6.1

@kkarakk
Copy link

kkarakk commented Apr 15, 2019

works just fine for me on native camera on samsung a50 running Android pie v9.0 and a samsung s5 running(6.0.1) . have you tried recording the screen with camera open (scrcpy --record file.mp4) instead of recording with the camera. bad workaround i know but atleast you'll have SOME output...

@rom1v rom1v added the camera label Apr 17, 2019
@rom1v
Copy link
Collaborator

rom1v commented Apr 17, 2019

Both scrcpy and your camera needs to encode the video with your hardware encoder. It may or may not support to do both simultaneously.

Can you start several scrcpy instances for the same device?

Does it work with a lower definition (scrcpy -m800 + record your camera)?

@Fine-Tune
Copy link
Author

Hi, thanks for the replies.

When starting a second scrcpy instance it gives the following lines...

ERROR: Could not open video stream
ERROR: Exception on thread Thread[main,5,main]
android.media.MediaCodec$CodecException: Error 0xffffec77
at android.media.MediaCodec.native_configure
at INFO: Initial texture: 1080x1920
android.media.MediaCodec.configureMediaCodec.java:1778
at com.genymobile.scrcpy.ScreenEncoder.configure<ScreenEncoder.java157>
at com.genymobile.scrcpy.ScreenEncoder.streamscreen<ScreenEncoder.java68>
at com.genymobile.scrcpy.Scrcpy.Server.scrcpy<Server.java28>
at com.genymobile.scrcpy.Scrcpy.Server.main<Server.java110>
at com.android.internal.osRuntimeInit.nativeFinishInit
at com.android.internal.osRuntimeInit.mainRuntimeinit.java:257

I tried the suggested method scrcpy -m800 but this also doesn't work.

@kkarakk: I do have same issue on the stock camera app aswell.

For now I'm using Screen Stream app as wokarround, extremally laggy but atleast I can see what I'm doing.

Thanks!

@SuperUserNameMan
Copy link

Hello,

Same issue here with an Android 5.1 running on an "Archos 50d Helium" and Srcpy 1.11 from #944 running under Windows 8.1 x64.

Taking picture works for me, but recording video fails :
java.lang.IllegaleStateException : failed to get surface

@SuperUserNameMan
Copy link

SuperUserNameMan commented Dec 4, 2019

PS : it works if scrcpy -m 480 :-)
PS: actually, it also works with -m set to native resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants