Hi Igorpadykov,
Thanks for your reply.
I also investigated the link i.MX6 GStreamer-imx Plugins - Tutorial & Example Pipelines you send before I starting construct the pipeline. But it still not helps.
For the attached file, it's a really updated version 4.1.15.
Currently I am using the older BSP (version 3.14.28), and the more supported plugins begin with vpuenc_(codec) are not there.
My only way is to use vpuenc and imxvpuenc_h264 for H.264 encoder.
For using examples pipeline from the reference link with imxvpuenc_h264, the pipeline I tried also output mp4 file, but I cannot view it via VLC application.
h264
h264 is a very popular encoding technology. It is most often used for HD content, such as Blu-rays and HDTV. See below for an example using the hardware accelerated h264 encoder:
# Take camera input /dev/video0, encode it to h264 at a bitrate of 10mbit/s (CBR) and save to a file.
gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! imxvpuenc_h264 bitrate=10000 ! filesink location=/tmp/file.mp4
Some cameras provide output that the vpu encoder can't handle, thus colorspace convert it first:
# Take camera input /dev/video0, colorspace convert it, encode it to h264 at a quant-param level of 25 (VBR) and save to a file
gst-launch-1.0 imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform ! imxvpuenc_h264 quant-param=25 ! filesink location=/tmp/file.mp4
And my pipeline is:
gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! video/x-raw, format=I420,width=1920, height=1080 ! imxvpuenc_h264 gop-size=30 bitrate=512 ! filesink location=/home/root/file.mp4