In a jetson nano, I’ve created a video loopback device with the command:
modprobe v4l2loopback exclusive_caps=1
and try to send to this device the result of decode an mp4 file, using the nvv4l2decoder element for gstreamer:
gst-launch-1.0 -v filesrc location=test.mp4 ! qtdemux ! h264parse ! nvv4l2decoder ! nvvidconv ! video/x-raw, format=I420 ! v4l2sink device=/dev/video0
however, it crashes with error:
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Caught SIGSEGV
#0 0x0000007faf08bd5c in __waitpid (pid=, stat_loc=0x7ffb0bb814, options=) at …/sysdeps/unix/sysv/linux/waitpid.c:30
#1 0x0000007faf0c72a0 in g_on_error_stack_trace ()
#2 0x0000005590279c3c in ()
#3 0x0000000000008600 in ()
Spinning. Please run ‘gdb gst-launch-1.0 15159’ to continue debugging, Ctrl-C to quit, or Ctrl-\ to dump core.
any hint ?
I’ve checked with a simple video producer:
gst-launch-1.0 -v videotestsrc ! v4l2sink device=/dev/video0
and consumer:
gst-launch-1.0 -v v4l2src device=/dev/video0 ! xvimagesink
and result is ok, a window with the video appears.
====
Additional info 1:
The complete call stack, as show by gdb is:
$ gdb gst-launch-1.0
…
(gdb) run -v filesrc location=test.mp4 qtdemux ! h264parse ! nvv4l2decoder ! nvvidconv ! videoconvert ! ‘video/x-raw, format=I420’ ! identity drop-allocation=true ! v4l2sink device=/dev/video0
Starting program: /usr/bin/gst-launch-1.0 -v filesrc location=test.mp4 qtdemux ! h264parse ! nvv4l2decoder ! nvvidconv ! videoconvert ! ‘video/x-raw, format=I420’ ! identity drop-allocation=true ! v4l2sink device=/dev/video0
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/aarch64-linux-gnu/libthread_db.so.1”.
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
[New Thread 0x7fb19161f0 (LWP 8394)]Thread 1 “gst-launch-1.0” received signal SIGSEGV, Segmentation fault.
0x0000007fb4e49090 in ?? ()
from /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
(gdb) bt
#0 0x0000007fb4e49090 in ()
at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#1 0x0000007fb4e49f9c in ()
at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#2 0x0000007fb4e488f8 in ()
at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#3 0x0000007fb4e486b8 in ()
at /usr/lib/aarch64-linux-gnu/libv4l/plugins/nv/libv4l2_nvargus.so
#4 0x0000007fb7017b20 in () at /usr/lib/aarch64-linux-gnu/libv4l2.so.0
#5 0x0000007fb70136c0 in v4l2_fd_open ()
at /usr/lib/aarch64-linux-gnu/libv4l2.so.0
#6 0x0000007fb4f2463c in ()
at /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so
#7 0x0000005555851b90 in ()
(gdb)
====
Additional info 2:
The result of v4l2-ctl after install module is:
$ v4l2-ctl -d /dev/video0 --all
Driver Info (not using libv4l2):
Driver name : v4l2 loopback
Card type : Dummy video device (0x0000)
Bus info : platform:v4l2loopback-000
Driver version: 4.9.201
Capabilities : 0x85208002
Video Output
Video Memory-to-Memory
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x85208002
Video Output
Video Memory-to-Memory
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Priority: 0
Video output: 0 (loopback in)
Format Video Output:
Width/Height : 0/0
Pixel Format : ‘BGR4’
Field : None
Bytes per Line : 0
Size Image : 0
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Streaming Parameters Video Capture:
Frames per second: 30.000 (30/1)
Read buffers : 8
Streaming Parameters Video Output:
Frames per second: 30.000 (30/1)
Write buffers : 8User 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