Description
Environment
- OS: MacOS
- scrcpy version: 1.21 (last)
- installation method: Downloaded the last prebuild server (https://github.com/Genymobile/scrcpy/blob/master/BUILD.md#option-2-use-prebuilt-server)
- device model: Samsung Galaxy A40
- Android version: 11
Describe the bug
I was using for some time scrcpy 1.17 in order to retrieve frames from the device, and decided today to update to the last version. In the previous version, I was able in Python3, following a code a bit like this one https://github.com/DawningW/swy-bot/blob/main/scrcpy.py to:
- Push the server on my phone
- Launch the server
- Forward server port :
- Then get from the video socket the dummy byte, the device name, and the screen resolution
After that, I was able to receive all my frames from the video socket, and it was working perfectly fine.
In 1.21, I saw that the method to launch the server changed. In 1.17, I was using :
subprocess.Popen(
['adb', '-s', device_id, 'shell',
'CLASSPATH=/data/local/tmp/scrcpy-server',
'app_process', '/', 'com.genymobile.scrcpy.Server 1.17 verbose {} {} {} -1 true - false false 0 false false - -'.format(max_width, bitrate, max_fps)],
But in 1.21, there are now named parameters, and also new one, based on what I saw in the Server.java src code. I modified my code to something like :
['adb', '-s', device_id, 'shell',
'CLASSPATH=/data/local/tmp/scrcpy-server',
'app_process', '/',
'com.genymobile.scrcpy.Server {} log_level=verbose max_size=0 bit_rate=8000000 max_fps=0 lock_video_orientation=-1 tunnel_forward=true send_frame_meta=false control=false display_id=0 show_touches=false stay_awake=false power_off_on_close=false clipboard_autosync=false'],
cwd=SERVER_ROOT)
After launching the server, I'm still able to get access to the dummy byte, the device name, and the screen resolution from the socket, but then I don't receive any frame anymore. I have this error happening :
stack corruption detected (-fstack-protector) Aborted
My question is, is it still possible to retrieve frames this way ? And if it is the case, is there a parameter that is not working like that anymore, and that would explain why I have a problem retrieving the frames from the video socket now ?
Thanks a lot for your time.