NANO encode error

HI , I use jetson_multimedia_api to encode yuv frame, but it doesn’t work well,the error is

./video_encode 1.yuv 1920 1080 H264 1.h264
Creating Encoder in blocking mode
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
H264: Profile = 66, Level = 51
Could not read complete frame from input file
File read complete.
[ERROR] (NvV4l2ElementPlane.cpp:178) Capture Plane:Error while DQing buffer: Broken pipe
Segmentation fault (core dumped)

the attach 1.yuv.log is NV12 frame ,please rename it 1.yuv

1.yuv.log (3.0 MB)

but in tx2 ,it’s OK!!

Hi,
Please send at least 10 frames in YUV420 to encoder. For testing, you can generate the YUV file by running:

$ gst-launch-1.0 videotestsrc num-buffers=10 ! video/x-raw,width=1920,height=1080,format=I420 ! filesink location=a.yuv

OK,I can try it ,but in tx2 , I use one frame ,it’s OK

Hi,
We would suggest use h264 encoding in continuous video frames. For single video frame, suggest use JPEG encoding.