hi NXP
i have added x264 encoder to yocto file system (L4.9.51_imx8mq-ga - IMX8MQ) and able to encode the v42l source using MIPI camera
the pipeline used is
gst-launch-1.0 -vv v4l2src ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' \
! videoconvert ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! x264enc ! video/x-h264, profile=baseline ! fakesink
this pipeline is shooting the cpu to 390/4 % (appx 90% average) so, i have following questions
1. is software encdoing possible with IMX8MQ with less cpu usage ( i mean 20 to 30 % max?)
2. our requirement is 1080p30 at 10 mbps base profile ( current bitrate is 2mbps)
3. what is software encoder bitrate limitations on IMX8MQ ?
4. do we have any hw color space conversion plugins ? (imx6 support IPU)
5. do we have IPU similar support for IMX8MQ ? to convert color and resize the picture ?
the x264enc details for ref :
Factory Details:
Rank primary (256)
Long-name x264enc
Klass Codec/Encoder/Video
Description H264 Encoder
Author Josef Zlomek <josef.zlomek@itonis.tv>, Mark Nauwelaerts <mnauw@users.sf.net>
Plugin Details:
Name x264
Description libx264-based H264 plugins
Filename /usr/lib/gstreamer-1.0/libgstx264.so
Version 1.12.2
License GPL
Source module gst-plugins-ugly
Source release date 2017-07-14
Binary package GStreamer Ugly Plug-ins source release
Origin URL Unknown package origin
regards
Nagendra
Hi Nagendra,
Did you get camera capture or encoding worked? Can I get the commands for the same in imx8m?
Thanks in advance,
Regards,
Yashavantha
hello Yashavantha,
you can encode camera input as below
gst-launch-1.0 -vv v4l2src ! 'video/x-raw, format=(string)YUY2, width=(int)720, height=(int)480, framerate=(fraction)30/1' ! videoconvert ! 'video/x-raw, format=(string)I420, width=(int)720, height=(int)480, framerate=(fraction)30/1' ! x264enc pass=0 bitrate=2048 ! video/x-h264, profile=baseline ! < your h264 sink>
regards
Nagendra
Hi Nagendra,
So below command should work?
gst-launch-1.0 -vv v4l2src ! 'video/x-raw, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! videoconvert ! 'video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)30/1' ! x264enc pass=0 bitrate=2048 ! video/x-h264, profile=baseline ! filesink location=file.mp4
Regards,
Yashavantha
Hi nagendra,
We also use i.MX8M with L4.9.51_imx8mq-ga version for development.
I know there is no x264enc plugin installed by default.
I try to add the following setting into local.conf but still fail to get x264enc plugin.
Could you show me how to add it manually?
Thanks a lot !!
IMAGE_INSTALL_append = " gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
"
LICENSE_FLAGS_WHITELIST = "commercial"
Best Regards
Benson
hi Benson
please try this
1. create a file named "gstreamer1.0-plugins-ugly_%.bbappend"
in the path <build_dir>sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/
2. add the below lines and then save file
PACKAGECONFIG +="x264"
3. In local.conf file add the following
LICENSE_FLAGS_WHITELIST = "commercial" (for testing)
CORE_IMAGE_EXTRA_INSTALL += " \
gst-plugins-ugly-meta \
gst-plugins-bad-meta \
gst-plugins-base-meta \
"
4. and bitbake the file system
regards
Nagendra
for SW encoding, we don't offer any support and sample code, customer needs to poring the opensource by themselves, and for SW, the performance is worse than HW, for color space conversion, you can refe to the LCDIF, for imx8M, which has display controller and camera I/O, for more detailed information about these module, pls refer to the imx8M Reference Manual as below:
https://www.nxp.com/docs/en/reference-manual/IMX8MDQLQRM.pdf