cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.49k stars 1.77k forks source link

what's the difference between CAMERA_VIDEO_REAL_TIME and SCREEN_CONTENT_REAL_TIME? #3036

Open richardor opened 5 years ago

richardor commented 5 years ago

Hi, I want to use h264 to encode my screen share YUV data. So I use the the demo "welsenc" to find the best param of encoding screen content. I found the FPS is totally different between CAMERA_VIDEO_REAL_TIME and SCREEN_CONTENT_REAL_TIME. Does anyone knows the difference?

the iUsageType is CAMERA_VIDEO_REAL_TIME: h264enc.exe welsenc.cfg Width: 1920 Height: 1080 Frames: 179 encode time: 3.867245 sec FPS: 46.286180 fps

the iUsageType is SCREEN_CONTENT_REAL_TIME: h264enc.exe welsenc.cfg Width: 1920 Height: 1080 Frames: 190 encode time: 13.838448 sec FPS: 13.729863 fps

huili2 commented 5 years ago

The encoding strategy (or algorithms) of these two types are greatly different. For pure screen data (without video inside), SCREEN_CONTENT_REAL_TIME is suggested. It can achieve better compression ratio.