Hi,
I'm attempting to encode a video from within a c++ app using the VPU and H.264 codec. Before writing the code, I've attempted to use the existing mxc_vpu_test to see the quality and size of the output. When the encoded file is played using ffplay it runs over the frames very quickly and freezes on the last frame. Similar behavior was seen on other video players with this file.
Any ideas?
Thanks,
Mickey.
Encoding output:
$ ./mxc_vpu_test -E "-i 1mp.yuv -o 1mp.h264 -w 1152 -h 864 -f 2"
[INFO] VPU test program built on Jun 18 2013 14:34:56
[INFO] Product Info: i.MX6Q/D/S
[INFO] VPU firmware version: 2.1.5_r32515
[INFO] VPU library version: 5.4.6
[INFO] Format: STD_AVC
[INFO] AVC
[INFO] Input file "1mp.yuv" opened.
[INFO] Output file "1mp.h264" opened.
[INFO] chromaInterleave 1, mapType 0, linear2TiledEnable 0
[INFO] Finished encoding: 119 frames
[INFO] enc fps = 78.48
[INFO] total fps= 46.79
Playback output:
$ ffplay -f h264 1mp.h264
avplay version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2003-2013 the Libav developers
built on Apr 2 2013 17:02:36 with gcc 4.6.3
[h264 @ 0x7fd84c0008c0] Estimating duration from bitrate, this may be inaccurate
Input #0, h264, from '1mp.h264':
Duration: N/A, bitrate: N/A
Stream #0.0: Video: h264 (Constrained Baseline), yuv420p, 1152x864, 25 fps, 25 tbr, 1200k tbn, 2400k tbc
0.10 A-V: 0.000 s:5.7 aq= 0KB vq= 0KB sq= 0B f=0/0 0/0
Original Attachment has been moved to: 1mp.h264.zip
解決済! 解決策の投稿を見る。
Sorry initially, I thought the problem was with vpu_test not encoding all the frames.
ffmpeg is not using the VPU. The comparison with the vpu_test is not fair, since this is video-accelerated while ffmpeg test is not.
As mentioned by varsmoltayou should try using gstreamer instead which will make use of the VPU (Video accelerator).
If not possible make sure your application use the vpu APIs as the vpu_test does.
Would you share the input file 1mp.yuv, please?
I will try with another yuv file meanwhile.
have you looked at gstreamer appsrc plugin? https://community.freescale.com/message/345514#345514
Sorry initially, I thought the problem was with vpu_test not encoding all the frames.
ffmpeg is not using the VPU. The comparison with the vpu_test is not fair, since this is video-accelerated while ffmpeg test is not.
As mentioned by varsmoltayou should try using gstreamer instead which will make use of the VPU (Video accelerator).
If not possible make sure your application use the vpu APIs as the vpu_test does.