Skip to content
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

How to adjust the parameters to display colors correctly? #3760

Open
sgf opened this issue Jun 7, 2024 · 0 comments
Open

How to adjust the parameters to display colors correctly? #3760

sgf opened this issue Jun 7, 2024 · 0 comments

Comments

@sgf
Copy link

sgf commented Jun 7, 2024

动画0091

the left is encoded/decoded by OpenH264
the right is draw Raw Image from capture.

you can see the "button2"'s Border Color

I have tried these settings, but they don't seem to work.

    var param = encoder.GetDefaultParameters();

            param.iUsageType = EUsageType.CAMERA_VIDEO_REAL_TIME;
            param.iPicWidth = w; 
            param.iPicHeight = h;
            param.iTargetBitrate = 1000000;
            param.iTemporalLayerNum = 1;
            param.iSpatialLayerNum = 1;
            param.iRCMode = RC_MODES.RC_BITRATE_MODE;

            param.sSpatialLayers[0].iVideoWidth = 0;
            param.sSpatialLayers[0].iVideoWidth = 0;
            param.sSpatialLayers[0].fFrameRate = 60;
            param.sSpatialLayers[0].iSpatialBitrate = 1000000;
            param.sSpatialLayers[0].uiProfileIdc = EProfileIdc.PRO_HIGH;
            param.sSpatialLayers[0].uiLevelIdc = 0;
            param.sSpatialLayers[0].iDLayerQp = 0;
           

            param.iComplexityMode = ECOMPLEXITY_MODE.HIGH_COMPLEXITY;
            param.uiIntraPeriod = 300;
            param.iNumRefFrame = 0;
            param.eSpsPpsIdStrategy = EParameterSetStrategy.SPS_LISTING_AND_PPS_INCREASING;
            param.bPrefixNalAddingCtrl = false;
            param.bEnableSSEI = true;
            param.bSimulcastAVC = false;
            param.iPaddingFlag = 0;
            param.iEntropyCodingModeFlag = 1;
            param.bEnableFrameSkip = false;
            param.iMaxBitrate =0;
            param.iMinQp = 0;
            param.iMaxQp = 51;
            param.uiMaxNalSize = 0;
            param.bEnableLongTermReference = true;
            param.iLTRRefNum = 1;
            param.iLtrMarkPeriod = 180;
            param.iMultipleThreadIdc = 1;
            param.bUseLoadBalancing = true;
            
            param.bEnableDenoise = false;
            param.bEnableBackgroundDetection = true;
            param.bEnableAdaptiveQuant = true;
            param.bEnableSceneChangeDetect = true;
            param.bIsLosslessLink = false;
            param.bFixRCOverShoot = true;
            param.iIdrBitrateRatio = 400;
            param.fMaxFrameRate = 30;

openh264 version 2.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant