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).
Am I doing something wrong?
Thanks,
Dhaval
已解决! 转到解答。
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
Hi Dhaval
seems it is the same as below
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!
-----------------------------------------------------------------------------------------------------------------------
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