-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
I got SPS profile_idc 100, can I set profile_idc 66 (baseline)? #510
Comments
Or can I encode the screen data with another video format, that will be played in the browser? |
Is it sufficient: diff --git a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
index c946e99..0265f51 100644
--- a/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
+++ b/server/src/main/java/com/genymobile/scrcpy/ScreenEncoder.java
@@ -143,6 +143,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_PROFILE, MediaCodecInfo.CodecProfileLevel.AVCProfileBaseline);
// 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; ? |
We have resolved this problem, besides KEY_FROFILE, KEY_LEVEL is also needed to set. |
OK, thank you for your feedback. 👍 The need seems too specific for adding a command-line option to select the profile/level, and you solved the problem on your side, so I'm closing. |
@likezjuisee #1226, it seems to be the final solution. |
DRGGAM0850405292.zip
This is H.264 raw data, but Broadway can not parse profile_idc 100 data. Broadway supports profile_idc 66 (baseline). So how can I set the screen data to baseline?
The text was updated successfully, but these errors were encountered: