yuv422\RGB565 to H264 encode is not working

I tried to convert yuv422 to H264 using below steps but created H264 video is corrupted.

Step 1:
export LIBVA_DRIVER_NAME=iHD
chmod +x /usr/lib64/dri/iHD_drv_video.so
cd /usr/share/mfx/samples

Step 2: Converting raw yuv file
./sample_encode h264 -hw -i /home/uos/Downloads/Kimono1_176x144_24_10bit_422.yuv -o /home/uos/Downloads/test5_422.h264 -h 144 -w 176 -n 100 -f 25 -u balanced -num_slice 1 -async 7

hi @shivasku sorry to hear you’re having trouble. Can you let me know if you see error messages during the conversion? Does the conversion run at all?

I am able to run encode script successfully and there was not error during encoding

Please find below logs for encoding

root@clear /usr/share/mfx/samples # ./sample_encode h264 -hw -i /home/clear/Downloads/Kimono1_352x288_24_y210.yuv -o /home/clear/Downloads/test1.h264 -h 288 -w 352 -n 100 -f 25 -u balanced -num_slice 1 -async 7
Encoding Sample Version 8.3.26.

Input file format YUV420
Output video AVC
Source picture:
Resolution 352x288
Crop X,Y,W,H 0,0,352,288
Destination picture:
Resolution 352x288
Crop X,Y,W,H 0,0,352,288
Frame rate 25.00
Bit rate(Kbps) 620
Gop size 0
Ref dist 0
Ref number 0
Idr Interval 0
Target usage balanced
Memory type system
Media SDK impl hw
Media SDK version 1.28

Processing started
Frame number: 100

Processing finished