media/gpu/media_foundation_video_encode_accelerator_win.cc use SW H264 encoder
Reported by
f...@bebo.com,
Nov 3 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: 1. Select H.264 as codec on Windows 10 with NVIDIA card 2. Stream 1080p@60 fps 3. C:\Program Files\NVIDIA Corporation\NVSMI>.\nvidia-smi.exe encodersessions What is the expected behavior? We should see an active encoder session and close to zero CPU What went wrong? Chromium by default uses the Microsoft H.264 MFT Encoder which according to the documentation delegates to hardware encoders. When running the Micosoft H.264 MFT Encoder with only hardware encoders enabled on NVIDIA hardware we noticed: * higher CPU usage and stack traces consistent with SW encoder * no encoder sessions on the hardware when using nvidia-smi * nvidia hardware MFT DLL isn't loaded NVIDIA H.264 Encoder MFT We implemented an async MFT client and tested this with the NVIDIA H.264 Encoder MFT. This generally seems to work well. AMD H.264 Encoder MFT Works reasonable as well - less tested on our side. Needed some special things, such as draining the encoder to run stable. QuickSync H.264 Encoder MFT The quicksync MFT does not seem to react to changing the bitrate - this makes it not usable with webrtc at the moment Some additional notes: * The NVIDIA encoder only outputs the correct bitrate if the FPS is set correct. * added codecImplementationName * You can find our code here (we use nw.js which follows chromium): https://github.com/bebo/chromium.src/blob/master/media/gpu/media_foundation_video_encode_accelerator_win.cc Did this work before? N/A Does this work in other browsers? N/A Chrome version: 61.0.3163.100 Channel: n/a OS Version: 10.0 Flash Version:
,
Nov 3 2017
,
Nov 4 2017
Thanks for the detailed report. We landed the initial MFT with only sync API support. If NVIDIA doesn't enumerate there or Intel HD card enumerates before that, that HW encoder wouldn't be picked. We can enable NVIDIA/AMD as you suggested. I should still verify we have that Hw in our perf/testing bots as well. Thanks a lot for your findings about the bitrate, skipping QuickSync makes sense. I took a look at your changes and they look good. I can definitely review and help you land your changes in Chrome, see the guidelines below. https://www.chromium.org/developers/contributing-code
,
Nov 7 2017
Friendly ping for fpn@bebo.com. Let me know if you would like to contribute code or prefer me to take it over.
,
Nov 7 2017
If you guys can take it over that would be great! We'll keep an eye on this ticket for any questions. if you need any help from us feel free to message us Thanks for the quick responses
,
Nov 9 2017
I will get the contributor agreement going tomorrow, so you can use any of the code we wrote. I won't have time to make a patch against head at the moment.
,
Nov 10 2017
We signed the contributor agreement, please ping me if you have questions or that didn't go through. Thank you! |
||||
►
Sign in to add a comment |
||||
Comment 1 by ligim...@chromium.org
, Nov 3 2017