ws-scrcpy: Transferred resolution does not equal device resolution

I am trying to transfer the full device resolution (in a fork of your project), so I configured VideoSettings like this:

const currentSettings = new VideoSettings({
      lockedVideoOrientation: -1,
      bitrate: 524288,
      maxFps: 24,
      iFrameInterval: 1,
      bounds: new Size(3480, 3480),
      sendFrameMeta: false
    })
    
streamReceiver.sendMessage(CommandControlMessage.createSetVideoSettingsCommand(currentSettings))

I am expecting a resolution of 1080 x 2220 (Pixel 3A) and this is also what streamReceiver.on('displayInfo', this.onDisplayInfo) reports. BUT the decoded frames have a resolution of 1072 x 2208.

🤷‍♂️

It would be great to know why scrcpy decides to send a lower resolution. Do you know?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15

Most upvoted comments

@drauggres thanks so much for your help. I didn’t manage to solve the debugger issue, but I managed to compile and run the apk using JS. I also managed to introduce black bars in order to preserve aspect ratio and resolution of the video. See changes here: https://github.com/repeato-qa/scrcpy/commit/f2d21b8a2d1827f4fdebf7cfd0a412ec7411beff

Let me know if I can return a favor!