Error using ffmpeg

I have issue with ffmpeg, after hours of debug, I try to bring it out

  1. Environment: Window 10 64bit, install using pip3, run use hass --open-ui
  2. ffmpeg installed, set path, test running stand alone ok
  3. Now add a very simple ffmpeg like this to configuration
camera:
  - platform: ffmpeg
    input: https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_480_1_5MG.mp4
    name: valies
  1. Add picture entity card, thumb image show up
  2. Play video, get error
2020-04-29 21:48:27 DEBUG (MainThread) [haffmpeg.core] Start FFmpeg with ['ffmpeg', '-i', 'https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_480_1_5MG.mp4', '-an', '-c:v', 'mjpeg', '-pred', '1', '-f', 'mpjpeg', '-']
2020-04-29 21:48:27 ERROR (MainThread) [homeassistant.core] Error doing job: Exception in callback _ProactorReadPipeTransport._loop_reading()
Traceback (most recent call last):
  File "c:\users\XX\appdata\local\programs\python\python37\lib\asyncio\proactor_events.py", line 274, in _loop_reading
    self._read_fut = self._loop._proactor.recv(self._sock, 32768)
  File "c:\users\XXX\appdata\local\programs\python\python37\lib\asyncio\windows_events.py", line 423, in recv
    self._register_with_iocp(conn)
  File "c:\users\XXX\appdata\local\programs\python\python37\lib\asyncio\windows_events.py", line 650, in _register_with_iocp
    _overlapped.CreateIoCompletionPort(obj.fileno(), self._iocp, 0, 0)
OSError: [WinError 87] The parameter is incorrect

You can see above ffmpeg command I dump out, I have tested this in cmd and everything run fine, return ton of raw data

ffmpeg -i https://file-examples.com/wp-content/uploads/2017/04/file_example_MP4_480_1_5MG.mp4 -an -c:v mjpeg -pred 1 -f mpjpeg -

So issue is somewhat handling data return form ffmpeg, dont know what s problem. I never code python before so have no clue what s going on, just guess asyncio is like something similar to ajax call in javascript or socket call with ton of await async. Also confirm https of above mp4 do nothing to error because I have tested other url, my camera rtsp, etc…

Could anyone help. Tks

To add more information, I successfully install using vmdk with vmware, docker on window, these install version could play video using ffmpeg, however can not get thumbnail like window one.
I still want to use window version, not vmware or docker.

A clean installation on another PC, error still happen. So it must be an issue, I will make report

Did you find a solution for this? I’m running into the same error. Thanks!