For i.MX 8QuadMax MEK I am facing some issues while capturing videos and images.
I am using this image-
Problem-1: When I try to stream/dump h264 encoded data with v4lh264enc and gstreamer it stucks at PREROLLING state-
gst-launch-1.0 v4l2h264enc ! rtph264pay ! udpsink sync=false host=192.168.1.246 port=5000
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ..
.
gst-launch-1.0 v4l2h264enc ! rtph264pay ! autovideosink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
gst-launch-1.0 v4l2h264enc ! rtph264pay ! filesink location=test.h264
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
For all above v4l2h264enc commands corresponding dmesg log--
[ 158.930946] (null): mxc_isi_capture_open, No remote pad found!
[ 158.937326] (null): mxc_isi_capture_open, No remote pad found!
[ 158.943539] (null): mxc_isi_capture_open, No remote pad found!
[ 158.949821] (null): mxc_isi_capture_open, No remote pad found!
[ 159.187735] (null): mxc_isi_capture_open, No remote pad found!
[ 159.194115] (null): mxc_isi_capture_open, No remote pad found!
[ 159.200400] (null): mxc_isi_capture_open, No remote pad found!
[ 159.206710] (null): mxc_isi_capture_open, No remote pad found
!
Problem-2:
When i run v4l2-ctl --list-devices it gives--
vpu B0 (platform:):
/dev/video12
/dev/video13
mxc-isi (platform:58100000.isi.0):
/dev/video4
mxc-jpeg decoder (platform:58400000.jpegdec):
/dev/video5
mxc-jpeg decoder (platform:58450000.jpegenc):
/dev/video6
Logitech BRIO (usb-xhci-cdns3-1.3):
/dev/video7
/dev/video8
Failed to open /dev/video0: Invalid argument
Also -
v4l2-ctl --all
Failed to open /dev/video0: Invalid argument
corresponding dmesg log
[ 88.289844] (null): mxc_isi_capture_open, No remote pad found!
Problem-3 :
When i try to capture a jpeg image with v462src and gstreamer it gives a memory allcoation error .
gst-launch-1.0 v4l2src device=/dev/video4 num-buffers=1 ! jpegenc ! filesink location=a.jpg
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
../../../git/sys/v4l2/gstv4l2src.c(650): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.040333191
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
corresponding dmesg log-
[ 76.664041] (null): mxc_isi_capture_open, No remote pad found!
[ 76.669998] (null): mxc_isi_capture_open, No remote pad found!
[ 76.675952] (null): mxc_isi_capture_open, No remote pad found!
[ 76.681900] (null): mxc_isi_capture_open, No remote pad found!
[ 76.750236] mxc-isi 58100000.isi: mxc_isi_m2m_streamon Not support upscale
For video5 and video6 it say it is not a capture device
gst-launch-1.0 v4l2src device=/dev/video5 num-buffers=1 ! jpegenc ! filesink location=a.jpg
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video5' is not a capture device.
Additional debug info:
../../../git/sys/v4l2/v4l2_calls.c(676): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Capabilities: 0x4208000
Setting pipeline to NULL ...
Freeing pipeline ...
corresponding dmesg log--
[ 130.578240] (null): mxc_isi_capture_open, No remote pad found!
[ 130.584416] (null): mxc_isi_capture_open, No remote pad found!
[ 130.590708] (null): mxc_isi_capture_open, No remote pad found!
[ 130.596798] (null): mxc_isi_capture_open, No remote pad found!
Some additional info--
cat /etc/issue.net
NXP i.MX Release Distro 4.14-sumo %h
uname -a
Linux imx8qmmek 4.14.78-imx_4.14.78_1.0.0_ga+g66620c3 #1 SMP PREEMPT Tue Dec 4 03:16:42 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
df -H
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.9G 1.6G 214M 88% /
devtmpfs 2.6G 4.1k 2.6G 1% /dev
tmpfs 3.1G 0 3.1G 0% /dev/shm
tmpfs 3.1G 18M 3.0G 1% /run
tmpfs 3.1G 0 3.1G 0% /sys/fs/cgroup
tmpfs 3.1G 4.1k 3.1G 1% /tmp
tmpfs 3.1G 279k 3.1G 1% /var/volatile
/dev/mmcblk1p1 16G 2.9G 13G 19% /run/media/mmcblk1p1
/dev/mmcblk0p1 67M 26M 42M 38% /run/media/mmcblk0p1
tmpfs 604M 91k 604M 1% /run/user/0
free -h
total used free shared buff/cache available
Mem: 5.6G 413M 5.1G 16M 132M 5.1G
Swap: 0B 0B 0B
ls -l /dev/video*
crw-rw---- 1 root video 81, 0 Nov 25 2018 /dev/video0
crw-rw---- 1 root video 81, 1 Nov 25 2018 /dev/video1
crw-rw---- 1 root video 81, 7 Nov 25 2018 /dev/video12
crw-rw---- 1 root video 81, 8 Nov 25 2018 /dev/video13
crw-rw---- 1 root video 81, 2 Nov 25 2018 /dev/video2
crw-rw---- 1 root video 81, 3 Nov 25 2018 /dev/video3
crw-rw---- 1 root video 81, 4 Nov 25 2018 /dev/video4
crw-rw---- 1 root video 81, 5 Nov 25 2018 /dev/video5
crw-rw---- 1 root video 81, 6 Nov 25 2018 /dev/video6
Hello,
I have your same problem. Were you able to solve it? Thanks.
Regards,
Vincenzo
Hi Saiful
i.MX 8QM MEK uses the Amphion VPU, which adopted the V4L2 API for the VPU solutions.
[meta-freescale] Question about Hantro and Amphion hardware codecs
One can try:
gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! \
v4l2h264enc extra-controls="controls,h264_entropy_mode=0,video_bitrate=245000;" ! \
h264parse ! v4l2h264dec ! queue ! waylandsink sync=false
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------