Incorrect color representation of Samsung J7 2017
Happens both over WiFi and USB.
Running commands from #177:
adb shell screenrecord /sdcard/test.mp4
adb pull /sdcard/test.mp4
results in correct video.
Broken commands:
scrcpy -b10K -m360
scrcpy -b2M -m600
scrcpy
adb shell screenrecord --output-format=h264 - | ffplay -
The video is ultra-smooth, but it looks as if everything below some level of luminosity is interpreted as gray:
Here is screenshot of Samsung Settings:

Here is screenshot of scrcpy:

Android 7.0 (stock, but installed custom kernel) Samsung Experience 8.1 Kernel 3.18.14-Refined_Kernel-v2.8-Stable-J730F-G (custom kernel) Model SM-J730F
Thank you for your report.
Could you test with a forced full/limited color range, please?
diff --git a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
index 0419dc5..83dc606 100644
--- a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
+++ b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
@@ -145,6 +145,7 @@ public class ScreenEncoder implements Device.RotationListener {
format.setInteger(MediaFormat.KEY_FRAME_RATE, frameRate);
format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, iFrameInterval);
+ format.setInteger(MediaFormat.KEY_COLOR_RANGE, MediaFormat.COLOR_RANGE_FULL);
// display the very first frame, and recover from bad quality when no new frames
format.setLong(MediaFormat.KEY_REPEAT_PREVIOUS_FRAME_AFTER, MICROSECONDS_IN_ONE_SECOND * REPEAT_FRAME_DELAY / frameRate); // µs
return format;
or
diff --git a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
index 0419dc5..f9949cb 100644
--- a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
+++ b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
@@ -145,6 +145,7 @@ public class ScreenEncoder implements Device.RotationListener {
format.setInteger(MediaFormat.KEY_FRAME_RATE, frameRate);
format.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatSurface);
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, iFrameInterval);
+ format.setInteger(MediaFormat.KEY_COLOR_RANGE, MediaFormat.COLOR_RANGE_LIMITED);
// display the very first frame, and recover from bad quality when no new frames
format.setLong(MediaFormat.KEY_REPEAT_PREVIOUS_FRAME_AFTER, MICROSECONDS_IN_ONE_SECOND * REPEAT_FRAME_DELAY / frameRate); // µs
return format;
Sorry for not replying for a week. Could you send me a binary with this patch? I've spent last hour dealing with Java, Android SDK (which doesn't work OOB with Java 10, as it turns out) and I still cannot get ninja to see I did accept all the licenses I could find...
@pzmarzly: v1.6 + patch: scrcpy-server.jar
SHA256: 81b7215f4ed3cb031b656745b28518be1a755a0df3774f9626f02250f042e920
Sadly, nothing changed. I also tried changing resolution, setting Display mode to Basic, turning blue light filter on and off, changing screen brightness etc. If it helps, this app works, but it uses Android screen sharing API.
I'm not sure if seeing this in log is normal:
~/scrcpy on 446c682 $ ./run x -b2M
x/server/scrcpy-server.jar: 1 file pushed. 1.2 MB/s (19350 bytes in 0.015s)
error: more than one device/emulator
ERROR: "adb reverse" returned with value 1
WARN: 'adb reverse' failed, fallback to 'adb forward'
INFO: Initial texture: 1080x1920
~/scrcpy on 446c682 $ adb devices
List of devices attached
192.168.254.102:5555 device
~/scrcpy on 446c682 $
@rom1v Can we test that via cli? All my devices (samsung) and emulator show different color than real, thought it was a samsung thing, but I scrcpy to my android emulator (copy/paste works better). and the color is less saturated