v4l2src appends wrong frame height caps
zakhar.khadanovich
zakhar.khadanovich at sorama.eu
Sun Oct 18 20:57:46 UTC 2020
I have /dev/video1 mipi csi device connected to Jetson Nano. I have
configured it to have 2 modes with frame size 64x9600 and 64x4096. Frame
size is stranges because it's actually not video data and I use toshiba
tc358746 to create mipi frames. And I have a problem with making gstreamer
to use second mode.
I can see my devices supports 2 frame sizes:
root at jetson-nano-emmc:~# v4l2-ctl --list-formats-ext --device=/dev/video1
ioctl: VIDIOC_ENUM_FMT
Type: Video Cap
[0]: 'AR24' (32-bit BGRA 8-8-8-8)
Size: Discrete 64x9600
Interval: Discrete 0.040s (25.000 fps)
Size: Discrete 64x4096
Interval: Discrete 0.040s (25.000 fps)
If I use v4l2-ctl it works fine:
v4l2-ctl --verbose --device /dev/video1 --stream-mmap --stream-to=/dev/null
--set-fmt-video=width=64,height=9600
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture:
Width/Height : 64/9600
Pixel Format : 'AR24' (32-bit BGRA 8-8-8-8)
Field : None
Bytes per Line : 256
Size Image : 2457600
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
But if I use gstreamer it anyway uses 64x4096. It shows caps as
width=(int)64, heigh=(int)9600, height=(int)4096. So it appends 4096 and
overwrites whatever I specified as height. Why it appends height=(int)4096
to my caps?
gst-launch-1.0 -v v4l2src device=/dev/video1 !
video/x-raw,width=64,heigh=9600 ! videoconvert ! appsink name=mysink
caps=video/x-raw,format=ABGR,width=64,heigh=9600
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw,
width=(int)64, heigh=(int)9600, height=(int)4096, framerate=(fraction)25/1,
format=(string)BGRA, colorimetry=(string)sRGB,
interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps =
video/x-raw, width=(int)64, heigh=(int)9600, height=(int)4096,
framerate=(fraction)25/1, format=(string)BGRA, colorimetry=(string)sRGB,
interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps =
video/x-raw, width=(int)64, heigh=(int)9600, height=(int)4096,
framerate=(fraction)25/1, interlace-mode=(string)progressive,
format=(string)ABGR
/GstPipeline:pipeline0/GstAppSink:mysink.GstPad:sink: caps = video/x-raw,
width=(int)64, heigh=(int)9600, height=(int)4096, framerate=(fraction)25/1,
interlace-mode=(string)progressive, format=(string)ABGR
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps =
video/x-raw, width=(int)64, heigh=(int)9600, height=(int)4096,
framerate=(fraction)25/1, format=(string)BGRA, colorimetry=(string)sRGB,
interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps =
video/x-raw, width=(int)64, heigh=(int)9600, height=(int)4096,
framerate=(fraction)25/1, format=(string)BGRA, colorimetry=(string)sRGB,
interlace-mode=(string)progressive
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list