i.MX8x failed to convert H264 video to YUV video using mxc_v4l2_vpu_enc.out! MD5 check failed!

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

i.MX8x failed to convert H264 video to YUV video using mxc_v4l2_vpu_enc.out! MD5 check failed!

Jump to solution
2,679 Views
DRAVE
Contributor IV

Hi NXP,

We used the mxc_v4l2_vpu_enc.out tool to decode successfully, but the MD5 check failed!

mxc_v4l2_vpu_enc.out decode successfully:

/unit_tests/V4L2_VPU/mxc_v4l2_vpu_enc.out \

 parser --key 0 --name sp2_bt_b.h264 --fmt h264 \

decoder --key 1 --source 0 \

 convert --key 2 --source 1 --fmt I420 \

ofile --key 3 --source 2 --name output.dec.yuv

DRAVE_1-1732603515221.png

MD5 failed:

DRAVE_2-1732603584265.png

The following videos all have the same problem:

sp2_bt_b.zip
SP1_BT_A.zip

MR4_TANDBERG_C.zip

MR5_TANDBERG_C.zip

FM1_FT_E.zip

CVFC1_Sony_C.zip

h. 264 video source website: https://www.itu.int/wftp3/av-arch/jvt-site/draft_conformance/AVCv1/

Software version: Yocto Project LF5.15.32_2.0.0

Could you please help me see the cause of the problem?  Thank you very much!

All log files are attached:

 

 

 

0 Kudos
Reply
1 Solution
1,832 Views
joanxie
NXP TechSupport
NXP TechSupport

update: the next firmware would fix this issue, you can use MR5_TANDBERG_C with next firmware, would be release in the Q1 of 2025

View solution in original post

0 Kudos
Reply
12 Replies
2,658 Views
DRAVE
Contributor IV

Hi NXP,

I found that the profile for SP1_BT_A.zip and sp2_bt_b.zip are Extended profile. Is this SOC not supported?

But MR5_TANDBERG_C.zip, MR5_TANDBERG_C.zip, FM1_FT_E.zip are Baseline profile. Is SOC supported?

And CVFC1_Sony_C.zip is the Constrained Baseline Profile, which is supported by this SOC.

The configuration is shown in the following figure:

DRAVE_0-1732611115368.pngDRAVE_1-1732611237164.png

 

Tags (1)
0 Kudos
Reply
2,654 Views
joanxie
NXP TechSupport
NXP TechSupport

your title is imx8x, but refer to the log, you tested on the imx8qm,so what processor do you use?

refer to the I.MX8QM reference manual,

the VPU has two H.264 AVC Encoders which Constrained Baseline, Main and High profile @1080p30.

let me install this bsp and reproduce this then tell you the result later

0 Kudos
Reply
2,553 Views
DRAVE
Contributor IV

Hi @joanxie 

Thank you for your reply!I have used i.MX8QXP and i.MX8QM to test the decoding. Their situation is the same. So I think they all have the same VPU.

Tags (1)
0 Kudos
Reply
2,526 Views
joanxie
NXP TechSupport
NXP TechSupport

the below commands were tested by us, do you mind trying again?

unit_tests/V4L2_VPU/mxc_v4l2_vpu_enc.out \
        ifile --key 0 --name test.yuv  --fmt I420 --size 1920 1080 \
        convert --key 1 --source 0 --fmt nv12 \
        encoder --key 2 --source 1 --size 1920 1080 --framerate 30 \
        ofile --key 3 --source 2 --name test_.264

unit_tests/V4L2_VPU/mxc_v4l2_vpu_enc.out \
        ifile --key 0 --name test.yuv  --fmt I420 --size 1920 1080 \
        convert --key 1 --source 0 --fmt nv12 \
        encoder --key 2 --source 1 --crop 960 540 640 480 --size 640 480 --framerate 30 \
        ofile --key 3 --source 2 --name test_crop.264
0 Kudos
Reply
2,522 Views
DRAVE
Contributor IV

Hi @joanxie 

I have a feeling you misunderstood what I meant. I need to convert H.264 video to YUV video. 

My test steps are as follows:
1. Download MR5_TANDBERG_C.zip and unzip it

2. cd MR5_TANDBERG_C directory

DRAVE_0-1732694431133.png

3.  convert H.264  to YUV:

/unit_tests/V4L2_VPU/mxc_v4l2_vpu_enc.out \

 parser --key 0 --name MR5_TANDBERG_C.264 --fmt h264 \

decoder --key 1 --source 0 \

 convert --key 2 --source 1 --fmt I420 \

ofile --key 3 --source 2 --name output.dec.yuv

DRAVE_2-1732694517853.png

 

4. The md5sum command compares the MD5 checksum:

DRAVE_3-1732694584142.png

The check value of the YUV video is the same after the correct conversion. However, the MD5 checksum is different now.

We can use ffmpeg to achieve the conversion, the command:

ffmpeg -i MR5_TANDBERG_C.264-pix_fmt yuv420p output.yuv

DRAVE_4-1732694971585.png

 

So we want to find out why the VPU failed to convert this video. Thank you very much! 

0 Kudos
Reply
2,463 Views
joanxie
NXP TechSupport
NXP TechSupport

ok, I know what you mean, I just send the command example to you for reference,  so could you open the  output.dec.yuv correctly? my understanding is that you can open this yuv file correctly, but the MD5 checksum is different, then you use ffmpeg to convert, the MD5 checksum is same, right? if yes, do you mind using decode unit test to test again?

case 1: decode h264 stream to test.yuv
    ./mxc_v4l2_vpu_dec.out ifile decode.264 ifmt 1 ofmt 1 ofile test.yuv

besides of testing by decode, do you mind upgrading the bsp to the latest version? must you use 5.15 bsp version? 

0 Kudos
Reply
2,430 Views
DRAVE
Contributor IV

Hi @joanxie 

We use Linux 6.6.36_2.1.0 firmware. The conversion of CVFC1_Sony_C.zip was successful. However, the conversion of MR5_TANDBERG_C.zip, MR5_TANDBERG_C.zip, FM1_FT_E.zip still fails. But MR5_TANDBERG_C.zip, MR5_TANDBERG_C.zip, FM1_FT_E.zip are Baseline profile. Is SOC supported?

 

/unit_tests/V4L2_VPU/mxc_v4l2_vpu_enc.out \

 parser --key 0 --name CVFC1_Sony_C.jsv --fmt h264 \

decoder --key 1 --source 0 \

 convert --key 2 --source 1 --fmt I420 \

ofile --key 3 --source 2 --name output.dec.yuv

DRAVE_0-1732862006214.png

DRAVE_1-1732862048081.png

 

 

 

 

0 Kudos
Reply
2,423 Views
joanxie
NXP TechSupport
NXP TechSupport

confirmed that this issue isn't related to the profile, this is current vpu firmware couldn't support this streaming, because recorder depth of this streaming is bigger than the max size which is calculated by the vpu firmware, so the result md5sum isn't correct, you can use MR3_TANDBERG_B

0 Kudos
Reply
2,415 Views
DRAVE
Contributor IV

Hi @joanxie

Thank you for your reply!So is there a solution to this? 

0 Kudos
Reply
1,833 Views
joanxie
NXP TechSupport
NXP TechSupport

update: the next firmware would fix this issue, you can use MR5_TANDBERG_C with next firmware, would be release in the Q1 of 2025

0 Kudos
Reply
2,395 Views
joanxie
NXP TechSupport
NXP TechSupport

no solution for this yet even you upgrade to the latest bsp, you can consider current bsp couldn't support this

0 Kudos
Reply
2,042 Views
DRAVE
Contributor IV

Hi @joanxie ,

Ok, I see. Thank you for your reply!

0 Kudos
Reply