Sample application for encoding using VPU

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Sample application for encoding using VPU

跳至解决方案
1,186 次查看
dhavalvadhar
Contributor IV

Hi,

I am trying to develop a sample application to encode 720x480 raw YUV video to H.264. That raw video is in UYVY format. So before developing one of my own encoding application I tried to encode this raw video using 'mxc_vpu_test' application. For that I used following command:

$ ./mxc_vpu_test.out -E "-i capturedata.yuv -o encodedata.h264 -f 2 -c 60 -w 720 -h 480"

This has generate the encodedata.h264 file. But when I played it on VLC player, the video was corrupted (see following snapshot).

corrupt_encoded_video_snapshot.jpg

Am I doing something wrong?

Thanks,

Dhaval

标签 (1)
标记 (2)
0 项奖励
回复
1 解答
844 次查看
dhavalvadhar
Contributor IV

Hi Igorpadykov,

Thanks for your quick reply. No, it was not a header problem. But it was the problem of the input RAW file YUV format. It was expecting YUV420 and I was giving YUV422 as an input. After giving YUV420 as input file encoder works fine and the output file played perfectly with VLC media player.

Thanks,
Dhaval

在原帖中查看解决方案

0 项奖励
回复
2 回复数
844 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Dhaval

seems it is the same as below

H.264 encoder header problem

If one needs that file was played by all video players, it is necessary

to use gstreamer. Difference between gstreamer and unit test is that file created

with gstreamer has header while file encoded by the mxc_vpu_test.out is "raw" file

which  doesn't contain header file.

To play file created with mxc_vpu_test.out, its "raw" file should be converted

to the .mp4 format first. Some special tools such as, for example the following one:

http://www.rarewares.org/mp4.html reviewed below

MP4 FAQ [Archive] - Doom9's Forum

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
845 次查看
dhavalvadhar
Contributor IV

Hi Igorpadykov,

Thanks for your quick reply. No, it was not a header problem. But it was the problem of the input RAW file YUV format. It was expecting YUV420 and I was giving YUV422 as an input. After giving YUV420 as input file encoder works fine and the output file played perfectly with VLC media player.

Thanks,
Dhaval

0 项奖励
回复