gstreamer cannot use vpuenc_h264

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

gstreamer cannot use vpuenc_h264

1,763 Views
Joshua2
Contributor II

Hi

My development platform is IMX8MP and the system is Ubuntu 20.04,

root@imx8mpevk:~# uname -a
Linux imx8mpevk 5.15.5-g5b66ad699836-dirty #4 SMP PREEMPT Tue Dec 17 16:19:09 CST 2024 aarch64 aarch64 aarch64 GNU/Linux

CMD:

gst-launch-1.0 videotestsrc ! video/x-raw, format=I420, width=640, height=480 ! vpuenc_h264 ! filesink location=test.mp4

////////////////////////////////////////////

 

Setting pipeline to PAUSED ...
====== VPUENC: 4.6.4 build on Jan 18 2022 09:10:37. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Feb 9 2022 01:58:18)
vpulib: 1.1.1
firmware: 1.1.1.43690
ERROR: from element /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0: Could not initialize supporting library.
Additional debug info:
../git/gst-libs/gst/video/gstvideoencoder.c(1781): gst_video_encoder_change_state (): /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0:
Failed to start encoder
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

 

I cannot use vpuenc_h264, can you help me analyze the problem?

 

Thanks,

Joshua

 

0 Kudos
Reply
9 Replies

1,744 Views
joanxie
NXP TechSupport
NXP TechSupport

could you use the command and tell me the result?

"gst-inspect-1.0 | grep vpuen_h264"

0 Kudos
Reply

1,727 Views
Joshua2
Contributor II

 

root@imx8:~# gst-inspect-1.0 | grep vpuen_h264
root@imx8:~#
root@imx8:~#
root@imx8:~# gst-inspect-1.0 |grep vpuenc_h264
vpu: vpuenc_h264: IMX VPU-based AVC/H264 video encoder

0 Kudos
Reply

1,713 Views
joanxie
NXP TechSupport
NXP TechSupport

this should be your image issue, I couldn't reproduce this issue, did you use nxp bsp? if you use your own bsp, pls compare with nxp bsp,

joanxie_0-1734591221157.png

 

0 Kudos
Reply

1,709 Views
Joshua2
Contributor II

Hi 

My BSP is sourced from a third party. If I want to obtain NXP's BSP, where can I download Ubuntu 20.04's BSP?

0 Kudos
Reply

1,693 Views
joanxie
NXP TechSupport
NXP TechSupport

one can find the demo images from official website, this is for nxp board, for bsp building, you can refer to the documents named yocto user guide

Embedded Linux for i.MX Applications Processors | NXP Semiconductors

0 Kudos
Reply

1,606 Views
Joshua2
Contributor II

Hi,

I recompiled the Ubuntu system with reference to these steps, but the problem persists. I need your help.

、、、、、、、、、、、、、、、、、、、、、、、、、、、

repo init -u https://github.com/nxp-imx/imx-manifest -b imx-linux-mickledore -m imx-6.1.55-2.2.0_desktop.xml
repo sync
DISTRO=imx-desktop-xwayland MACHINE=imx8mpevk source imx-setup-desktop.sh -b build-desktop
bitbake imx-image-desktop   

、、、、、、、、、、、、、、、、、、、、、、、、、、、

user@imx8mpevk:/home/root$ gst-launch-1.0 videotestsrc num-buffers=100 ! video/x-raw, format=I420, width=640, height=480 ! vpuenc_h264 ! filesink location=test.mp4
Setting pipeline to PAUSED ...
====== VPUENC: 4.8.2 build on Oct 10 2023 02:31:27. ======
wrapper: 3.0.0 (VPUWRAPPER_ARM64_LINUX Build on Sep 27 2023 02:10:15)
vpulib: 1.1.1
firmware: 1.1.1.43690
ERROR: from element /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0: Could not initialize supporting library.
Additional debug info:
../git/gst-libs/gst/video/gstvideoencoder.c(1797): gst_video_encoder_change_state (): /GstPipeline:pipeline0/vpuenc_h264:vpuenc_h264-0:
Failed to start encoder
ERROR: pipeline doesn't want to preroll.
Failed to set pipeline to PAUSED.
Setting pipeline to NULL ...
Freeing pipeline ...

 

Thanks,

Joshua

0 Kudos
Reply

1,600 Views
joanxie
NXP TechSupport
NXP TechSupport

imx-image-desktop  isn't nxp official tested image, try to test imx-image-multimedia or imx-image-full since you want to test vpu encoding

0 Kudos
Reply

1,591 Views
Joshua2
Contributor II

Hi ,

 

Thank you very much for your help!
We need to use ros, so we need to be based on ubuntu. H264 is just part of it.

By the way, we also tried to use the latest package, LF_v6.6.52-2.2.0_images_IMX8MPEVK, unzip imx-image-full-imx8mpevk.tar.zst file to get rootfs, and use uboot to load the NFS file system, I can't log in to the linux system with the serial port, and the account password is wrong (tried user, user)?

 

Thanks,

Joshua

Tags (1)
0 Kudos
Reply

1,578 Views
joanxie
NXP TechSupport
NXP TechSupport

try "root" as password

0 Kudos
Reply