This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Gstreamer vpe plugin error

Part Number: AM5728


We have a custom board with AM5728 and SDK 06.03 running. I'm currently testing gstreamer features from software-dl.ti.com/.../Foundational_Components_Multimedia_IVAHD.html


The pipeline that captures and encodes video are failing. The problem seems to be somehow related to the 'vpe' plugin. If I simply change vpe to videoconvert then the pipelines are working fine.

The CMA size has been increased to 256MB, but it didn't help.

=> setenv optargs cma=256MiB
=> saveenv
[ 0.000000] cma: Reserved 256 MiB at 0x00000000efc00000

Example of the failing pipeline:


root@am57xx-evm:~# /etc/init.d/weston stop
Stopping Weston
root@am57xx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video1 io-mode=2 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1' ! vpe num-input-buffers=8 ! tee name=t ! queue ! ducatimpeg4enc bitrate=4000 ! queue ! mpeg4videoparse ! qtmux ! filesink location=x.mp4 t. ! queue ! kmssink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1280
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 1024
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTee:t.GstTeePad:src_0: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTee:t.GstTeePad:src_1: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTee:t.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVpe:vpe0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:4:5:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstDucatiMPEG4Enc:ducatimpeg4enc0.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/GstQueue:queue1.GstPad:src: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/GstMpeg4VParse:mpeg4vparse0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt601, chroma-site=(string)jpeg
/GstPipeline:pipeline0/GstDucatiMPEG4Enc:ducatimpeg4enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstVpe:vpe0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTee:t.GstTeePad:src_0: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstDucatiMPEG4Enc:ducatimpeg4enc0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1

** (gst-launch-1.0:1001): CRITICAL **: 15:27:33.882: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

** (gst-launch-1.0:1001): CRITICAL **: 15:27:33.882: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

** (gst-launch-1.0:1001): CRITICAL **: 15:27:33.882: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed

** (gst-launch-1.0:1001): CRITICAL **: 15:27:33.882: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
/GstPipeline:pipeline0/GstTee:t.GstTeePad:src_1: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstQueue:queue2.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstTee:t.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1

** (gst-launch-1.0:1001): CRITICAL **: 15:27:33.889: gst_fd_memory_get_fd: assertion 'GST_IS_FD_ALLOCATOR (mem->allocator)' failed
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
../../../../gstreamer-1.14.4/libs/gst/base/gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.462899394
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...



The dmesg log is  attached.

6332.boot.log
Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.19.94-gbe5389fd85 (fominykh@fominykh-P67A-UD3-B3) (gcc version 8.3.0 (GNU Toolchain for the A-profile Architecture 8.3-2019.03 (arm-rel-8.36))) #76 SMP PREEMPT Tue Dec 15 17:41:04 MSK 2020
[ 0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[ 0.000000] OF: fdt: Machine model: Akkord Sitara ARM (TI AM5728)
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
[ 0.000000] OF: reserved mem: initialized node ipu2-memory@95800000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
[ 0.000000] OF: reserved mem: initialized node dsp1-memory@99000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created DMA memory pool at 0x000000009d000000, size 32 MiB
[ 0.000000] OF: reserved mem: initialized node ipu1-memory@9d000000, compatible id shared-dma-pool
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
[ 0.000000] OF: reserved mem: initialized node dsp2-memory@9f000000, compatible id shared-dma-pool
[ 0.000000] cma: Reserved 256 MiB at 0x00000000efc00000
[ 0.000000] OMAP4: Map 0x00000000ffd00000 to (ptrval) for dram barrier
[ 0.000000] On node 0 totalpages: 465920
[ 0.000000] DMA zone: 1728 pages used for memmap
[ 0.000000] DMA zone: 0 pages reserved
[ 0.000000] DMA zone: 139008 pages, LIFO batch:31
[ 0.000000] HighMem zone: 326912 pages, LIFO batch:63
[ 0.000000] DRA752 ES2.0
[ 0.000000] random: get_random_bytes called from start_kernel+0xb4/0x470 with crng_init=0
[ 0.000000] percpu: Embedded 15 pages/cpu s32396 r8192 d20852 u61440
[ 0.000000] pcpu-alloc: s32396 r8192 d20852 u61440 alloc=15*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 464192
[ 0.000000] Kernel command line: console=ttyS2,115200n8 cma=256MiB root=PARTUUID=32cff79e-02 rw rootfstype=ext4 rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 1435492K/1863680K available (10240K kernel code, 338K rwdata, 2828K rodata, 2048K init, 268K bss, 34972K reserved, 393216K cma-reserved, 1045504K highmem)
[ 0.000000] Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xf0800000 - 0xff800000 ( 240 MB)
lowmem : 0xc0000000 - 0xf0000000 ( 768 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0x(ptrval) - 0x(ptrval) (12256 kB)
.init : 0x(ptrval) - 0x(ptrval) (2048 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 339 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 269 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] OMAP clockevent source: timer1 at 32786 Hz
[ 0.000000] arch_timer: cp15 timer(s) running at 6.14MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
[ 0.000006] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
[ 0.000019] Switching to timer-based delay loop, resolution 162ns
[ 0.000293] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[ 0.000303] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.000749] Console: colour dummy device 80x30
[ 0.000792] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
[ 0.000807] pid_max: default: 32768 minimum: 301
[ 0.000927] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000943] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.001503] CPU: Testing write buffer coherency: ok
[ 0.001538] CPU0: Spectre v2: using ICIALLU workaround
[ 0.001752] /cpus/cpu@0 missing clock-frequency property
[ 0.001772] /cpus/cpu@1 missing clock-frequency property
[ 0.001785] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX