AW: Why is connecting vaapi decoder to v4l2sink stuttering?
Christian Hattenberger
christian.hattenberger at gmail.com
Sun Nov 6 15:22:26 UTC 2022
If I use vaapipostproc in the chain with vaapisink it seems ok, so I think it does dmabuff,
but when I use io-mode=dmabuf-import with v4l2sink I get “Failed to allocated required memory”
gst-launch-1.0 filesrc location=/mnt/DATA/tearing.mp4 ! decodebin ! v4l2sink io-mode=dmabuf-import device=/dev/video10
…
0:00:00.376954941 18843 0x7f4d44041460 ERROR v4l2allocator gstv4l2allocator.c:740:gst_v4l2_allocator_start:<v4l2sink0:pool1:sink:allocator> error requesting 2 buffers: Invalid argument
0:00:00.377023310 18843 0x7f4d44041460 ERROR v4l2bufferpool gstv4l2bufferpool.c:920:gst_v4l2_buffer_pool_start:<v4l2sink0:pool1:sink> we received 0 buffer from device '/dev/video10', we want at least 2
0:00:00.377052711 18843 0x7f4d44041460 ERROR bufferpool gstbufferpool.c:559:gst_buffer_pool_set_active:<v4l2sink0:pool1:sink> start failed
…
v4l2-ctl -d /dev/video0 --all
Driver Info:
Driver name : v4l2 loopback
Card type : Dummy video device (0x0000)
Bus info : platform:v4l2loopback-000
Driver version : 5.15.49
Capabilities : 0x85208003
Video Capture
Video Output
Video Memory-to-Memory
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05208003
Video Capture
Video Output
Video Memory-to-Memory
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (loopback: ok)
Video output: 0 (loopback in)
Format Video Output:
Width/Height : 1920/1080
Pixel Format : 'NV12' (Y/CbCr 4:2:0)
Field : None
Bytes per Line : 1920
Size Image : 3110400
Colorspace : Rec. 709
Transfer Function : sRGB
YCbCr/HSV Encoding: ITU-R 601
Quantization : Limited Range
Flags :
Streaming Parameters Video Capture:
Frames per second: 30.000 (30/1)
Read buffers : 2
Streaming Parameters Video Output:
Frames per second: 30.000 (30/1)
Write buffers : 2
User Controls
keep_format 0x0098f900 (bool) : default=0 value=0
sustain_framerate 0x0098f901 (bool) : default=0 value=0
timeout 0x0098f902 (int) : min=0 max=100000 step=1 default=0 value=0
timeout_image_io 0x0098f903 (bool) : default=0 value=0
Von: Nicolas Dufresne <nicolas at ndufresne.ca>
Gesendet: Sonntag, 6. November 2022 14:32
An: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Cc: Christian Hattenberger <christian.hattenberger at gmail.com>
Betreff: Re: Why is connecting vaapi decoder to v4l2sink stuttering?
Le sam. 5 nov. 2022, 13 h 16, Christian Hattenberger via gstreamer-devel <gstreamer-devel at lists.freedesktop.org <mailto:gstreamer-devel at lists.freedesktop.org> > a écrit :
When I connect a vaapi decoder to v4l2sink the result is not as expected, same happens if I use autovideosink, I know for this I have to use vaapisink and it is working as expected, but is there a solution for v4l2sink? Can someone explain me the reason, is there a solution?
gst-launch-1.0 filesrc location=/tmp/video.mp4 ! decodebin ! vaapipostproc ! video/x-raw,format=YUY2 ! v4l2sink device=/dev/video10
Its experimental, and I am not sure if vaapipostproc does produce dmabuf in this case, but you can enable dmabuf-import on v4l2sink with property io-mode=dmabuf-import . By default, the frames are cpu copied from VA allocated memory into V4L2 allocated memory.
Nicolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20221106/eeda0827/attachment-0001.htm>
More information about the gstreamer-devel
mailing list