I am using mxc_vpu_test from FSL Yocto 3.10.17 with a i.MX6Q device. I can do both encode and decode correctly using "-E" and "-D" options correctly.
However, the transcoder function (-T) seems not easy to use. Is there a working sample cmd line to transcode an input .mp4 file to a .264 output file using "-T" option of the mxc_vpu_test program?
Below is my usage on a headless i.MX6Q device, it doesn't work:
yf@imx6x-std:~/test$ ./mxc_vpu_test.out -T "-i akiyo.mp4 -o /tmp/akiyo.264"
[INFO] VPU test program built on Apr 2 2016 08:16:20
[INFO] Product Info: i.MX6Q/D/S
[INFO] VPU firmware version: 3.1.1_r46056
[INFO] VPU library version: 5.4.23
[INFO] Format: STD_MPEG4
[INFO] MPEG4 class: MPEG4
[INFO] Input file "akiyo.mp4" opened.
[INFO] Output file "/tmp/akiyo.264" opened.
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
[INFO] Mpeg4 Profile: 0 Level: 3 Interlaced: 0
[INFO] Aspect Ratio Table index: 1
[INFO] Decoder: width = 176, height = 144, frameRateRes = 15, frameRateDiv = 4294967295, count = 4
[INFO] CROP left/top/right/bottom 0 0 0 0
[INFO] v4l output to /dev/video17
[INFO] Display to 640 640, top offset 0, left offset 0
[INFO] Display: NV12
[INFO] Display fps will be 30
[INFO] Capture/Encode fps will be 30
[ERR] Encoder open failed -3
Guess my usage is incorrect for "-T" option. The Encoder open failure "-3" means invalid parameter but I don't know where the problem is according to the command line help.
Hi Janfeng
only video codec can be transcoded, not image.
example can be found on p.52 presentation :
Q&A: MX6 VPU H.264 Dual Stream Encode Limits
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Igor,
Thank you for the pointers. I retried with the "akiyo.mp4" and found it still doesn't work --- I copied the runtime log above.
The samples on p.52 of the slides just used a different input file:
/unit_tests/mxc_vpu_test.out -T "-i /home/linaro/mount_sd/Coral_Reef_Adventure_720_video.wmv3 -f 3 -t 1 -x 0 -y 0 -a 60 -w 1280 -h 720 -o /dev/shm/transcode.264 -q 25 -g 30"
It seems not working here either:
yf@imx6x-std:~/test$ ./mxc_vpu_test.out -T "-i akiyo.mp4 -f 0 -t 1 -x 0 -y 0 -a 60 -
o /tmp/akiyo.264 -q 25 -g 30"
[INFO] VPU test program built on Apr 2 2016 08:16:20
[INFO] Product Info: i.MX6Q/D/S
[INFO] VPU firmware version: 3.1.1_r46056
[INFO] VPU library version: 5.4.23
[INFO] Display through V4L2
[INFO] Format: STD_MPEG4
[INFO] MPEG4 class: MPEG4
[INFO] Input file "akiyo.mp4" opened.
[INFO] Output file "/tmp/akiyo.264" opened.
[INFO] bitstreamMode 1, chromaInterleave 1, mapType 0, tiled2LinearEnable 0
[INFO] Mpeg4 Profile: 0 Level: 3 Interlaced: 0
[INFO] Aspect Ratio Table index: 1
[INFO] Decoder: width = 176, height = 144, frameRateRes = 15, frameRateDiv = 4294967295, count = 4
[INFO] CROP left/top/right/bottom 0 0 0 0
[INFO] v4l output to /dev/video17
[INFO] Display to 640 640, top offset 0, left offset 0
[INFO] Display: NV12
[INFO] Display fps will be 60
[INFO] Capture/Encode fps will be 60
[ERR] Encoder open failed -3
Regards,
yanfeng
akiyo.mp4 is not a standard mp4 file