FFMpeg 在 OSX Mojave 上访问 AVFoundation usb 子设备相机
FFMpeg access AVFoundation usb subdevice camera on OSX Mojave
我有一个用于 VR 的双 USB 摄像头:两个摄像头,一个 USB 接口。在 linux 上,它出现在 /dev/video0 和 /dev/video1 中,我可以使用 ffmpeg -i /dev/video0
进行捕获
在 Mojave 上,我可以在 USB 集线器中看到两个设备:
USB 2.0 Hub:
Product ID: 0x0101
Vendor ID: 0x1a40 (TERMINUS TECHNOLOGY INC.)
Version: 1.11
Speed: Up to 480Mb/sec
Location ID: 0x14200000 / 8
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
Stereo Vision 2:
Product ID: 0x9901
Vendor ID: 0x0ac8 (Z-Star Microelectronics Corporation)
Version: 27.02
Serial Number: SN0099
Speed: Up to 480Mb/sec
Manufacturer: SHENZHEN RERVISION TECHNOLOGY
Location ID: 0x14220000 / 10
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
Stereo Vision 2:
Product ID: 0x9902
Vendor ID: 0x0ac8 (Z-Star Microelectronics Corporation)
Version: 27.02
Serial Number: SN0100
Speed: Up to 480Mb/sec
Manufacturer: SHENZHEN RERVISION TECHNOLOGY
Location ID: 0x14210000 / 9
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
但是当我列出设备时,我只能看到一个 [0]:
ffmpeg -f avfoundation -list_devices true -i ""
[AVFoundation input device @ 0x7fae5b501a80] AVFoundation video devices:
[AVFoundation input device @ 0x7fae5b501a80] [0] Stereo Vision 2
[AVFoundation input device @ 0x7fae5b501a80] [1] FaceTime HD Camera
[AVFoundation input device @ 0x7fae5b501a80] [2] Capture screen 0
从该设备捕获从其中一个摄像头捕获。
如何让 ffmpeg 也检测到第二个 USB 设备?
一年后我重温了这篇文章。 ffmpeg 的更新导致两个设备都可以正常看到。
==> Upgrading 1 outdated package:
ffmpeg 4.1.4_2 -> 4.3.1
..
ffmpeg -f avfoundation -list_devices true -i ""
[AVFoundation indev @ 0x7f85b2e00380] AVFoundation video devices:
[AVFoundation indev @ 0x7f85b2e00380] [0] Stereo Vision 2 #2
[AVFoundation indev @ 0x7f85b2e00380] [1] Stereo Vision 2
[AVFoundation indev @ 0x7f85b2e00380] [2] FaceTime HD Camera
[AVFoundation indev @ 0x7f85b2e00380] [3] Capture screen 0
我有一个用于 VR 的双 USB 摄像头:两个摄像头,一个 USB 接口。在 linux 上,它出现在 /dev/video0 和 /dev/video1 中,我可以使用 ffmpeg -i /dev/video0
进行捕获在 Mojave 上,我可以在 USB 集线器中看到两个设备:
USB 2.0 Hub:
Product ID: 0x0101
Vendor ID: 0x1a40 (TERMINUS TECHNOLOGY INC.)
Version: 1.11
Speed: Up to 480Mb/sec
Location ID: 0x14200000 / 8
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
Stereo Vision 2:
Product ID: 0x9901
Vendor ID: 0x0ac8 (Z-Star Microelectronics Corporation)
Version: 27.02
Serial Number: SN0099
Speed: Up to 480Mb/sec
Manufacturer: SHENZHEN RERVISION TECHNOLOGY
Location ID: 0x14220000 / 10
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
Stereo Vision 2:
Product ID: 0x9902
Vendor ID: 0x0ac8 (Z-Star Microelectronics Corporation)
Version: 27.02
Serial Number: SN0100
Speed: Up to 480Mb/sec
Manufacturer: SHENZHEN RERVISION TECHNOLOGY
Location ID: 0x14210000 / 9
Current Available (mA): 500
Current Required (mA): 500
Extra Operating Current (mA): 0
但是当我列出设备时,我只能看到一个 [0]:
ffmpeg -f avfoundation -list_devices true -i ""
[AVFoundation input device @ 0x7fae5b501a80] AVFoundation video devices:
[AVFoundation input device @ 0x7fae5b501a80] [0] Stereo Vision 2
[AVFoundation input device @ 0x7fae5b501a80] [1] FaceTime HD Camera
[AVFoundation input device @ 0x7fae5b501a80] [2] Capture screen 0
从该设备捕获从其中一个摄像头捕获。
如何让 ffmpeg 也检测到第二个 USB 设备?
一年后我重温了这篇文章。 ffmpeg 的更新导致两个设备都可以正常看到。
==> Upgrading 1 outdated package:
ffmpeg 4.1.4_2 -> 4.3.1
..
ffmpeg -f avfoundation -list_devices true -i ""
[AVFoundation indev @ 0x7f85b2e00380] AVFoundation video devices:
[AVFoundation indev @ 0x7f85b2e00380] [0] Stereo Vision 2 #2
[AVFoundation indev @ 0x7f85b2e00380] [1] Stereo Vision 2
[AVFoundation indev @ 0x7f85b2e00380] [2] FaceTime HD Camera
[AVFoundation indev @ 0x7f85b2e00380] [3] Capture screen 0