Hi,
I have been testing mfw_vpuencoder on MX51/Linux board.
Firstly, mfw_vpuencoder does not produce correct result with videotestsrc, but without any error message.
gst-launch-0.10 -v videotestsrc is-live=1 ! 'video/x-raw-yuv,format=(fourcc)I420,width=176,height=144,framerate=25/1' ! mfw_vpuencoder codec-type=std_avc width=176 height=144 framerate=25 ! filesink location=test_1.264
The generated output file (test_1.264) is quite different from the input test video.
However, if I firstly generate a test.yuv using videotestsrc, and encode the test.yuv with mfw_vpuencoder, it works well.
gst-launch-0.10 -v videotestsrc is-live=1 ! 'video/x-raw-yuv,format=(fourcc)I420,width=176,height=144,framerate=25/1' ! filesink location=test.yuv
gst-launch -v filesrc location=./test.yuv ! mfw_vpuencoder codec_type=std_avc width=176 height=144 gopsize=10 framerate=25 ! filesink location=test.264
This time, the output file (test.264) is almost the same as the input file, test.yuv, which means that mfw_vpuencoder works well as desired.
Anything wrong with my videotestsrc + mfw_vpuencoder encoding pipeline?
FYI, my kernel is 2.6.31, imx-lib-10.04, gst-fsl-plugin-1.7.3.
And the imx-test/mxc_vpu_test.out works correctly with config_enc file.
Regards,
Robbie
解決済! 解決策の投稿を見る。
Try this pipeline
gst-launch-0.10 -v videotestsrc is-live=1 blocksize=38016 ! \
'video/x-raw-yuv,format=(fourcc)I420,width=176,height=144,framerate=25/1' ! \
mfw_vpuencoder codec-type=2 width=176 height=144 framerate=25 ! \
filesink location=test_1.264
where blocksize= width * height * 1.5. Also, please try with other codecs. In case the camera is working, you can also try a real live source with the following pipeline
gst-launch mfw_v4lsrc fps-n=15 capture-width=$WIDTH capture-height=$HEIGHT ! \
queue ! \
mfw_vpuencoder codec-type=0 ! \
avimux ! \
filesink location=output.avi sync=false
In case you dont have the documentation, please refer to https://www.freescale.com/webapp/Download?colCode=IMX51_1011_MMDOCS_BUNDLE&location=null&fpsp=1&WT_T...
Leo
This test was run with i.MX51, with your first pipeline, so you are using the correct pipeline, you might be missing some plugin or patch.
You can download the linux patches here:
BSP 10.11.01
kernel 2.6.35
10.11.01 patches from web page applied.
MM codecs 10.11 -> fsl plugin and gst plugin 1.9.5
Selected Gstreamer "Good" package.
Hi Francisco,
Thank you.
I finally passed the test by setting the "peer_alloc" property of videotestsrc to false.
What is the effect you are seeing?
With your first pipeline I had to remove the framerate from the mfw_vpuenc , since it caused error, but after that, it generated this video.
and this is my result
Here is my result:
And what's your kernel version, imx-lib version and gst-fsl-plugins version?
Try this pipeline
gst-launch-0.10 -v videotestsrc is-live=1 blocksize=38016 ! \
'video/x-raw-yuv,format=(fourcc)I420,width=176,height=144,framerate=25/1' ! \
mfw_vpuencoder codec-type=2 width=176 height=144 framerate=25 ! \
filesink location=test_1.264
where blocksize= width * height * 1.5. Also, please try with other codecs. In case the camera is working, you can also try a real live source with the following pipeline
gst-launch mfw_v4lsrc fps-n=15 capture-width=$WIDTH capture-height=$HEIGHT ! \
queue ! \
mfw_vpuencoder codec-type=0 ! \
avimux ! \
filesink location=output.avi sync=false
In case you dont have the documentation, please refer to https://www.freescale.com/webapp/Download?colCode=IMX51_1011_MMDOCS_BUNDLE&location=null&fpsp=1&WT_T...
Leo
Hi Leo,
Finally I managed to do this with the following pipeline:
gst-launch-0.10 -v videotestsrc is-live=1 peer_alloc=false ! \
'video/x-raw-yuv,format=(fourcc)I420,width=176,height=144,framerate=25/1' ! \
mfw_vpuencoder codec-type=2 width=176 height=144 framerate=25 ! \
filesink location=test_1.264
Note that "peer_alloc" must be sest to "false". I don't know why, but it did work for me.
And this is very different from what I have done on MX27 (on MX27, no need to change peer_alloc. the default value is OK.), and also quite different from your pipeline.
gst-inspect videotestsrc:
peer-alloc | : Ask the peer to allocate an output buffer |
flags: readable, writable | |
Boolean. Default: true Current: true | |
The default value of peer_alloc is true, which requires mfw_vpuencoder allocate an output buffer.
Perhaps something is different for MX27 VPU and MX51 VPU?
I have been also able to get mfw_vpuencoder work with ov7725 camera without any problem.
Thank you.