I am working on a testApp on Android platform using pjSIP media pipeline where I need to support dual video streams with following requirements.
- Main Video - 720p@30fps
- Content stream - 1080p@30fps.
I use openH264 (pjMedia has openH264 support). My test application without content stream, can achieve 720p@30fps. But as soon as I start content my main video fps drops to around 720p@7fps and content 1080p@4fps. I am not sure whether openH264 support 720p@30fps and 1080p@30fps simultaneously. Any help is highly appreciated.
Setup details -
- Android system has 8 cores
- Using openh264 for video and content
- Enabled openH264 8 encoding threads
- My offer has -
Main VIdeo - b=TIAS:1856000 a=rtpmap:97 H264/90000 a=fmtp:97 profile-level-id=42e01f; packetization-mode=1;max-mbps=108000;max-fs=3600;max-fps=3000
Content stream - b=TIAS:4856000 a=rtpmap:97 H264/90000 a=fmtp:97 profile-level-id=428028; packetization-mode=1;max-mbps=245760;max-fs=8192;max-fps=3000
- I get answer from network-
Main VIdeo - b=TIAS:1856000 a=rtpmap:97 H264/90000 a=fmtp:97 profile-level-id=42e01f; packetization-mode=1;max-mbps=108000;max-fs=3600;max-fps=3000
Content stream - b=TIAS:4856000 a=rtpmap:97 H264/90000 a=fmtp:97 profile-level-id=428028; packetization-mode=1;max-mbps=245760;max-fs=8192;max-fps=3000
I tried various H.264 encoding config option for video stream and content stream-
- iMaxQp = 40
- iMinQp = 16
- iRCMode = RC_BITRATE_MODE
- iUsageType = CAMERA_VIDEO_REAL_TIME // People video
- iUsageType = SCREEN_CONTENT_REAL_TIME // Content stream
- bEnableDenoise = 0
- bUseLoadBalancing = true
- bEnableAdaptiveQuant = 0
- iLoopFilterDisableIdc = 0
- iComplexityMode = LOW_COMPLEXIT
- iMultipleThreadIdc = 8 // My Android system has 8 cores
- uiSliceSizeConstraint = 1254
- uiSliceMode = SM_SIZELIMITED_SLICE
- uiSliceNum = 1
- uiSliceMbNum[0] = 960
Any suggestion is highly appreciated .....