imx6 mxc_vpu_test.out can't display H264 video

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6 mxc_vpu_test.out can't display H264 video

Jump to solution
4,102 Views
GaoJianzhong
Contributor IV

Hi,

I want to use mxc_vpu_test.out to play H264 format video,

but there is a error. But i can play the same file with gplay application.

The error log is as bellow:

root@freescale /unit_tests$ ./mxc_vpu_test.out -D "-i test_ok.mp4 -f 2"

[INFO] VPU test program built on Sep 19 2012 10:18:55

[INFO]  Product Info: i.MX6Q/D/S

[INFO]  VPU firmware version: 2.1.7_r33576

[INFO]  VPU library version: 5.4.6

[INFO]  Format: STD_AVC

[INFO]  AVC

[INFO] Input file "test_ok.mp4" opened.

[INFO] bitstreamMode 0, chromaInterleave 1, mapType 0, tiled2LinearEnable 0

[ERR] vpu_DecGetInitialInfo failed, ret:-1, errorcode:16

[ERR] decoder parse failed

Is there anyone have confirm the /unit_tests/mxc_vput_test.out play H264 video?

I attach the video file i used to try.

Labels (2)
Tags (2)
0 Kudos
1 Solution
1,433 Views
jack_mao
NXP Employee
NXP Employee

Hi,

   Right, the ES is the raw data, the same meaning.

View solution in original post

0 Kudos
9 Replies
1,434 Views
jack_mao
NXP Employee
NXP Employee

Hi,

   Right, the ES is the raw data, the same meaning.

0 Kudos
1,433 Views
dukhwankim
Contributor I

Hi,

I have a question about making raw h264 file.

I want to know how to convert mp4 to raw video file(h264 or mpeg4).

I used command - "ffmpeg -i test.mp4 -an -vcodec copy -f rawvideo body.h264" by searching on the web.

It does not work.

0 Kudos
1,433 Views
LeonardoSandova
Specialist I

Not sure if your command is fine (ffmpeg is not supported by Freescale), but raw video is neither h264 not mpeg4. Raw video means uncompress video, which usually is some YUV format.

Leo

0 Kudos
1,433 Views
peterhale
Contributor I

I think what Dukhwan is trying to do is get the H264 data out of the Mp4 container, and trying to use the ffmpeg tool to do this, which I agree isn't right and will end up with raw video.  I'm actually asking the same question, what's the best way to get the H264 part of the Mp4 container?  Is there a tool?

Thanks.

0 Kudos
1,433 Views
LeonardoSandova
Specialist I

Peter, you can use gstreamer: filesrc location=... typefind=true ! aiurdemux name=demux demux.video ! filesink location=.... In case you want to have every frame in a separate file, use multifilesink instead of filesink.

0 Kudos
1,433 Views
claymontgomery
Contributor IV

I found a way to use ffmpeg to convert the Big Buck Bunny videos in mp4 and mov formats to elemental streams that the mxc_vpu_test.out unit test will play.  The procedure is:

      

    echo -n -e '\x00\x00\x01\x01\x00\x00\x01\x20\x00\x84\x40\xFA\x28\xD5\x21\xE0\xA2\x1F' > header_854_480

    ffmpeg -i big_buck_bunny_480p_mpeg4.avi -an -vcodec copy -f m4v big_buck_bunny_480p_mpeg4.es

    cat header_854_480 big_buck_bunny_480p_mpeg4.es > big_buck_bunny_480p_mpeg4.m4v

   

    ffmpeg -i big_buck_bunny_480p_h264.mov -vbsf h264_mp4toannexb -an -vcodec copy -f m4v big_buck_bunny_480p_h264.es

    cat header_854_480 big_buck_bunny_480p_h264.es > big_buck_bunny_480p_h264.m4v

Play these with:

    ./mxc_vpu_test.out -D "-f0 -x0 -i big_buck_bunny_480p_mpeg4.m4v"

    ./mxc_vpu_test.out -D "-f2 -x0 -i big_buck_bunny_480p_h264.m4v"

   

There is a good article on this subject at:

http://processors.wiki.ti.com/index.php/Extracting_MPEG-4_Elementary_Stream_from_MP4_Container

Regards, Clay

0 Kudos
1,433 Views
GaoJianzhong
Contributor IV

Hi

Thanks for your help.

I get this work now, The problem is that mxc_vpu_test.out only support the raw h264 data file without mp4 container.

I make a raw h264 file, and can play it with mxc_vpu_test.out.

0 Kudos
1,433 Views
jack_mao
NXP Employee
NXP Employee

mxc_vpu_test.out only support the ES stream playback, in your case , your playback file is mpeg4 format, the testcode need ES stream of mp4 file, so it will fail, by the way the command is not right,   it should be ./mxc_vpu_test.out -D "-i test_ok.mp4 -f 0"

1,433 Views
ChucoChe
NXP Employee
NXP Employee

Which BSP version are you using?

0 Kudos