20240702在飞凌OK3588-C开发板上通过HDMI OUT输出USB3.0接口的热像仪的预览图像
 2024/7/2 18:19
 root@ok3588:/# 
 root@ok3588:/# 
 root@ok3588:/# lsusb
 Bus 005 Device 001: ID 1d6b:0002
 Bus 003 Device 001: ID 1d6b:0001
 Bus 001 Device 001: ID 1d6b:0002
 Bus 006 Device 001: ID 1d6b:0003
 Bus 004 Device 001: ID 1d6b:0001
 Bus 002 Device 001: ID 1d6b:0002
 root@ok3588:/# 
 插入热像仪:
[  147.241973] phy phy-fd5d4000.syscon:usb2-phy@4000.3: illegal mode
 [  147.241993] xhci-hcd xhci-hcd.9.auto: xHCI Host Controller
 [  147.242267] xhci-hcd xhci-hcd.9.auto: new USB bus registered, assigned bus number 7
 [  147.242428] xhci-hcd xhci-hcd.9.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x0000000002010010
 [  147.242485] xhci-hcd xhci-hcd.9.auto: irq 152, io mem 0xfc400000
 [  147.242825] usb usb7: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.10
 [  147.242835] usb usb7: New USB device strings: Mfr=3, Product=2, SerialNumber=1
 [  147.242844] usb usb7: Product: xHCI Host Controller
 [  147.242851] usb usb7: Manufacturer: Linux 5.10.66 xhci-hcd
 [  147.242859] usb usb7: SerialNumber: xhci-hcd.9.auto
 [  147.243441] hub 7-0:1.0: USB hub found
 [  147.243483] hub 7-0:1.0: 1 port detected
 [  147.243906] xhci-hcd xhci-hcd.9.auto: xHCI Host Controller
 [  147.244099] xhci-hcd xhci-hcd.9.auto: new USB bus registered, assigned bus number 8
 [  147.244116] xhci-hcd xhci-hcd.9.auto: Host supports USB 3.0 SuperSpeed
 [  147.244229] usb usb8: We don't know the algorithms for LPM for this host, disabling LPM.
 [  147.244357] usb usb8: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.10
 [  147.244367] usb usb8: New USB device strings: Mfr=3, Product=2, SerialNumber=1
 [  147.244374] usb usb8: Product: xHCI Host Controller
 [  147.244382] usb usb8: Manufacturer: Linux 5.10.66 xhci-hcd
 [  147.244389] usb usb8: SerialNumber: xhci-hcd.9.auto
 [  147.245172] hub 8-0:1.0: USB hub found
 [  147.245214] hub 8-0:1.0: 1 port detected
 [  148.844580] usb 8-1: new SuperSpeed Gen 1 USB device number 2 using xhci-hcd
 [  148.862507] usb 8-1: LPM exit latency is zeroed, disabling LPM.
 [  148.862881] usb 8-1: Int endpoint with wBytesPerInterval of 1024 in config 1 interface 0 altsetting 0 ep 130: setting to 64
 [  148.863394] usb 8-1: New USB device found, idVendor=04b4, idProduct=02f7, bcdDevice= 0.00
 [  148.863417] usb 8-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 [  148.863435] usb 8-1: Product: JKY
 [  148.863452] usb 8-1: Manufacturer: IRay
 [  148.872058] uvcvideo: Found UVC 1.10 device JKY (04b4:02f7)
 root@ok3588:/#

 root@ok3588:/# 
 root@ok3588:/# lsusb
 Bus 005 Device 001: ID 1d6b:0002
 Bus 003 Device 001: ID 1d6b:0001
 Bus 001 Device 001: ID 1d6b:0002
Bus 008 Device 002: ID 04b4:02f7
 Bus 008 Device 001: ID 1d6b:0003
 Bus 006 Device 001: ID 1d6b:0003
 Bus 004 Device 001: ID 1d6b:0001
 Bus 002 Device 001: ID 1d6b:0002
Bus 007 Device 001: ID 1d6b:0002
 root@ok3588:/# 


 root@ok3588:/# 
root@ok3588:/# v4l2-ctl -d /dev/video59 --list-formats-ext 
 ioctl: VIDIOC_ENUM_FMT
     Type: Video Capture
    [0]: 'YUYV' (YUYV 4:2:2)
         Size: Discrete 1280x1024
             Interval: Discrete 0.033s (30.000 fps)
 root@ok3588:/# 
 root@ok3588:/# 

 root@ok3588:/# 
 root@ok3588:/# 
 root@ok3588:/# 
root@ok3588:/# v4l2-ctl -d /dev/video59 -D
 Driver Info:
     Driver name      : uvcvideo
     Card type        : JKY: JKY
     Bus info         : usb-xhci-hcd.9.auto-1
     Driver version   : 5.10.66
     Capabilities     : 0x84a00001
         Video Capture
         Metadata Capture
         Streaming
         Extended Pix Format
         Device Capabilities
     Device Caps      : 0x04200001
         Video Capture
         Streaming
         Extended Pix Format
 Media Driver Info:
     Driver name      : uvcvideo
     Model            : JKY: JKY
     Serial           : 
     Bus info         : usb-xhci-hcd.9.auto-1
     Media version    : 5.10.66
     Hardware revision: 0x00000000 (0)
     Driver version   : 5.10.66
 Interface Info:
     ID               : 0x03000002
     Type             : V4L Video
 Entity Info:
     ID               : 0x00000001 (1)
     Name             : JKY: JKY
     Function         : V4L2 I/O
     Flags         : default
     Pad 0x01000007   : 0: Sink
       Link 0x02000010: from remote pad 0x100000a of entity 'Extension 3': Data, Enabled, Immutable
 root@ok3588:/# 
 root@ok3588:/# 
root@ok3588:/# v4l2-ctl -d /dev/video59 --get-fmt-video
 Format Video Capture:
     Width/Height      : 1280/1024
     Pixel Format      : 'YUYV' (YUYV 4:2:2)
     Field             : None
     Bytes per Line    : 2560
     Size Image        : 2621440
     Colorspace        : Default
     Transfer Function : Default (maps to Rec. 709)
     YCbCr/HSV Encoding: Default (maps to ITU-R 601)
     Quantization      : Default (maps to Limited Range)
     Flags             : 
 root@ok3588:/# 
 root@ok3588:/# 
root@ok3588:/# v4l2-ctl -d /dev/video59 --get-dv-timings
 VIDIOC_G_DV_TIMINGS: failed: Inappropriate ioctl for device
 root@ok3588:/# 
 root@ok3588:/# 
root@ok3588:/# v4l2-ctl -d /dev/video59 --query-dv-timings
 VIDIOC_QUERY_DV_TIMINGS: failed: Inappropriate ioctl for device
     Active width: 0
     Active height: 0
     Total width: 0
     Total height: 0
     Frame format: progressive
     Polarities: -vsync -hsync
     Pixelclock: 0 Hz
     Horizontal frontporch: 0
     Horizontal sync: 0
     Horizontal backporch: 0
     Vertical frontporch: 0
     Vertical sync: 0
     Vertical backporch: 0
     Standards: 
     Flags: 
 root@ok3588:/# 
 root@ok3588:/# 



root@ok3588:/# lsusb
 Bus 008 Device 002: ID 04b4:02f7
v4l2-ctl --list-devices
v4l2-ctl --list-formats-ext -d /dev/video0
预览
 gst-launch-1.0 v4l2src device=/dev/video59 ! videoconvert ! video/x-raw,format=NV12,width=1280,height=1024 !  waylandsink
ts录像
 gst-launch-1.0 v4l2src device=/dev/video59 ! videoconvert ! video/x-raw,format=NV12,width=1280,height=1024 ! queue ! mpph264enc ! queue ! h264parse ! mpegtsmux ! filesink location=./h264.ts
mp4录像
 gst-launch-1.0 -e v4l2src device=/dev/video59 ! videoconvert ! video/x-raw,format=NV12,width=1280,height=1024 ! queue ! mpph264enc ! queue  ! h264parse ! mp4mux ! filesink location=file.mp4

 参考资料:
 百度:gst-launch-1.0 v4l2src device=/dev/video59 num-buffers=300!video/x-raw,format=UYVY,width=1280,height
https://www.ebaina.com/articles/140000017061
 rk3399pro gstreamer常用推拉流命令及现象

 https://blog.csdn.net/nb124667390/article/details/132069651
 ArmSoM-W3开发板 (RK3588) 之 USB摄像头图像预览
 gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100000 ! video/x-raw,format=NV12, width=1920,height=1080 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! qtmux ! filesink location=fpga10000-9500.mp4 t. ! queue ! waylandsink
 gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100000 ! video/x-raw,format=NV12, width=1920,height=1080 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! qtmux  t. ! queue ! waylandsink
 gst-launch-1.0 v4l2src device=/dev/video59 ! video/x-raw,format=NV12, width=1920,height=1080 ! tee name=t ! queue ! mpph264enc ! queue ! h264parse ! qtmux  t. ! queue ! waylandsink

