Приветствую.
Есть usb камера
# v4l2-ctl --all -d 0
Driver Info (not using libv4l2):
Driver name : uvcvideo
Card type : CS-USB-IMX307: UVC Camera
Bus info : usb-1c1d000.usb-1
Driver version: 4.14.111
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : 'H264'
Field : None
Bytes per Line : 3840
Size Image : 4147200
Colorspace : sRGB
Transfer Function : Default
YCbCr Encoding : Default
Quantization : Default
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 1920, Height 1080
Default : Left 0, Top 0, Width 1920, Height 1080
Pixel Aspect: 1/1
Selection: crop_default, Left 0, Top 0, Width 1920, Height 1080
Selection: crop_bounds, Left 0, Top 0, Width 1920, Height 1080
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0
brightness (int) : min=0 max=100 step=1 default=50 value=50
contrast (int) : min=0 max=100 step=1 default=50 value=50
saturation (int) : min=0 max=100 step=1 default=50 value=50
hue (int) : min=0 max=100 step=1 default=50 value=50
error 5 getting ctrl White Balance Temperature, Auto
с такими потоками
# v4l2-ctl --list-formats-ext -d 0
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Index : 1
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Index : 2
Type : Video Capture
Pixel Format: 'H264' (compressed)
Name : H.264
Size: Discrete 640x360
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
есть ффмпег с поддержкой декодера на вдпау
# ./ffmpeg-ubrv -codecs | grep vdpau | grep 264
ffmpeg version git-2015-01-22-f86a076 Copyright (c) 2000-2014 the FFmpeg developers
built on Jul 18 2024 12:09:53 with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.12) 20160609
configuration: --prefix=/usr --enable-nonfree --enable-gpl --enable-version3 --enable-vdpau --enable-libx264 --enable-libv4l2 --disable-doc
libavutil 54. 6.100 / 54. 6.100
libavcodec 56. 0.101 / 56. 0.101
libavformat 56. 2.100 / 56. 2.100
libavdevice 56. 0.100 / 56. 0.100
libavfilter 5. 0.102 / 5. 0.102
libswscale 3. 0.100 / 3. 0.100
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 0.100 / 53. 0.100
DEV.LS h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (decoders: h264 h264_vdpau ) (encoders: libx264 libx264rgb cedrus264 )
пытаюсь проверить декодер как
# VDPAU_DRIVER=sunxi ./ffmpeg-ubrv -f v4l2 -input_format h264 -video_size 1920x1080 -pix_fmt yuyv422 -c:v h264_vdpau -i /dev/video0 -f null /dev/null
при поступлении опорного кадра падает с ошибкой
[video4linux2,v4l2 @ 0xf4c480] decoding for stream 0 failed
[video4linux2,v4l2 @ 0xf4c480] Could not find codec parameters for stream 0 (Video: h264 (Baseline), 1920x1080, -5 kb/s): unspecified pixel format
Consider increasing the value for the 'analyzeduration' and 'probesize' options
/dev/video0: could not find codec parameters
Input #0, video4linux2,v4l2, from '/dev/video0':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Baseline), 1920x1080, -5 kb/s, 30 fps, 30 tbr, 1000k tbn, 2000k tbc
[buffer @ 0x1157c00] Unable to parse option value "-1" as pixel format
Last message repeated 1 times
[buffer @ 0x1157c00] Error setting option pix_fmt to value -1.
[graph 0 input from stream 0:0 @ 0xf45620] Error applying options to the filter.
Error opening filters!
к слову использую
# ls -l /usr/lib/arm-linux-gnueabihf/vdpau/libvdpau_sunxi.so*
lrwxrwxrwx 1 root root 19 Jul 19 09:47 /usr/lib/arm-linux-gnueabihf/vdpau/libvdpau_sunxi.so -> libvdpau_sunxi.so.1
lrwxrwxrwx 1 root root 28 Jul 19 08:40 /usr/lib/arm-linux-gnueabihf/vdpau/libvdpau_sunxi.so.1 -> /home/pi/libvdpau_sunxi.so.1
но запрос не показывает какой либой пользуется
# vdpauinfo
vdpauinfo: cannot connect to X server