const modes = await DeviceAPI.modes('/dev/video20')
const List = modes.map(m=>({width: m.width, height: m.height, fps: m.maxFrameRate, inputFormat: avGetPixFmtName(m.pixelFormat)}))
log:
{ width: 1920, height: 1080, fps: 30, inputFormat: null },
{ width: 1280, height: 720, fps: 30, inputFormat: null },
{ width: 640, height: 480, fps: 30, inputFormat: null },
{ width: 640, height: 480, fps: 30, inputFormat: 'yuyv422' },
{ width: 352, height: 288, fps: 30, inputFormat: null },
{ width: 320, height: 240, fps: 30, inputFormat: null },
{ width: 320, height: 240, fps: 30, inputFormat: 'yuyv422' },
{ width: 176, height: 144, fps: 30, inputFormat: null },
{ width: 160, height: 120, fps: 30, inputFormat: null }
Describe the Bug
MJPG is a common format for USB cameras. Logically speaking, the AVPixelFormat field should not return NONE.
To Reproduce
exp:
v4l2-ctl --device=/dev/video20 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
const modes = await DeviceAPI.modes('/dev/video20')
const List = modes.map(m=>({width: m.width, height: m.height, fps: m.maxFrameRate, inputFormat: avGetPixFmtName(m.pixelFormat)}))
log:
{ width: 1920, height: 1080, fps: 30, inputFormat: null },
{ width: 1280, height: 720, fps: 30, inputFormat: null },
{ width: 640, height: 480, fps: 30, inputFormat: null },
{ width: 640, height: 480, fps: 30, inputFormat: 'yuyv422' },
{ width: 352, height: 288, fps: 30, inputFormat: null },
{ width: 320, height: 240, fps: 30, inputFormat: null },
{ width: 320, height: 240, fps: 30, inputFormat: 'yuyv422' },
{ width: 176, height: 144, fps: 30, inputFormat: null },
{ width: 160, height: 120, fps: 30, inputFormat: null }
Expected Behavior
Expected normal output: mjpeg
Code Sample
Relevant Log Output / Error Messages
Node.js Version
24.10.0
NodeAV Version
6.2.0-beta.12
Operating System
Armbian Linux 6.1.115-vendor-rk35xx
Installation Method
npm install
API Used
High-Level API
Hardware Acceleration
None
Additional Context
No response