dkrivoruchko / ScreenStream

ScreenStream Android App
https://screenstream.io
MIT License
1.7k stars 337 forks source link

Small stream image when streaming Samsung DeX desktop #188

Closed maklimcz closed 2 years ago

maklimcz commented 2 years ago

Hi, I'm getting a very small image when streaming from Samsung DeX environment. The both screens are fullHD (1920x1080)

Screenshot_20211024-232736_ScreenStream Zrzut ekranu 2021-10-24 232903

By the way, I want to say thanks for such a great app!

dkrivoruchko commented 2 years ago

Hi. Couple simple questions. What app version? Can you open http://192.168.1.45:8080/stream.jpeg. This will give you a single image. Please check this image size.

maklimcz commented 2 years ago

Hi, Version 3.8.2 the jpg is of size 1080×2220 px stream

I've noticed that size is set to be screen resolution in regular phone mode - not Samsung DeX mode (there is just FHD).

Screenshot_20211025-110906_Settings

dkrivoruchko commented 2 years ago

Well, Android cast feature allow capturing only default screen. No ways to capture any other. For me it's kind of strange why it behaves so. What shows phone screen when you have a DEX on and ScreenStream is streaming?

In any way the only workaround is to set up image cropping in ScreenStream to cut 1080:2220 to 1080:1920.

And I'm curious what will be the DEX screen resolution and ScreenStream, if you select 1480:720 or 2960:1440?

maklimcz commented 2 years ago

The setup is Galaxy S8 connected via HDMI adapter to a FHD monitor. The phone screen is off, so I have an image only on the external screen. I can turn phone screen on but unfortunately the screen of my device is badly damaged. However it seems to be displaying the default phone view - nothing special with DeX. So it captures the DeX screen, not the phone one.

I am afraid the cropping to 1080x1920 won't give satisfying result as the effective desktop image on last stream.jpeg is 1080x607, which is low.

The DEX screen resolution can be configured independently form phone screen resolution. Phone resolution can be obraz while DEX resolution can be Screenshot_20211025-182404_Samsung DeX home the largest resolution is surely disabled due to conntected screen which is FHD. I have no bigger screen to test that option.

From my test the DEX resolution has no effect on */stream.jpg resolution. However, setting phone resolution has. The */stream.jpg resolution is the same as the phone screen resolution.

dkrivoruchko commented 2 years ago

Yes. That's true. One more idea - rotate phone sheen to landscape mode. This will give stream.jpeg size 2220:1080 and crop it in app to 1920:1080.

maklimcz commented 2 years ago

Yeah it works!! So to get a proper fullHD stream with DeX on Galaxy S8 (and probably other ones), one need to do the following:

  1. set device screen resolution to 2220x1080
  2. get into landscape mode, by setting autorotate and opening some app (ie. SMS app). i think that home screen is always in portrait mode and cannot be in landscape
  3. get into Samsung DeX, by choosing it from notifications
  4. run ScreenStream app and in settings set crop image 150px from both left and right, which will take 300px from 2220px so we get 1920px of width :)
dkrivoruchko commented 2 years ago

Great! Thanks!