在视频类型的源设备中找不到名称为 [integrated camera] 的视频设备

Coudl not find video device with name [integrated camera]amoung source devices of type video

在测试 aiortc 因为我想将网络摄像头音频和视频流式传输到浏览器但是当我尝试 运行 webcam.py 我得到 I/O 错误 I/O 错误:'video=Integrated Camera'

CODE IS HERE on github

Traceback (most recent call last):
  File "C:\Users\user\Desktop\New folder\env\lib\site-packages\aiohttp\web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "C:\Users\user\Desktop\New folder\env\lib\site-packages\aiohttp\web_app.py", line 499, in _handle
    resp = await handler(request)
  File "webcam.py", line 69, in offer
    audio, video = create_local_tracks(args.play_from)
  File "webcam.py", line 36, in create_local_tracks
    "video=Integrated Camera", format="dshow", options=options
  File "C:\Users\user\Desktop\New folder\env\lib\site-packages\aiortc\contrib\media.py", line 238, in __init__
    self.__container = av.open(file=file, format=format, mode="r", options=options)
  File "av\container\core.pyx", line 355, in av.container.core.open
  File "av\container\core.pyx", line 226, in av.container.core.Container.__cinit__
  File "av\container\core.pyx", line 258, in av.container.core.Container.err_check
  File "av\error.pyx", line 336, in av.error.err_check
av.error.OSError: [Errno 5] I/O error: 'video=Integrated Camera'


好的,如果您遇到此错误,您需要使用 ffmpeg 检查您的设备名称 windows

ffmpeg -list_devices true -f dshow -i dummy

linux

v4l2-ctl --list-devices

并为您的设备获取正确的名称并相应地更改它们