Issues with Multimedia API on Xavier NX

Hi,

I’m having some issues with the encoding example for the multi-media API (01_video_encode).

When encoding with lossless settings I use the following pipeline:

sudo ./video_encode file.rgb 1440 1080 H264 file.h264 -tt 0 --max-perf --elossless -fps 60 1

the output file, I then encode with ffmpeg for viewing with:

ffmpeg -i file.h264 -c:v libx264 -preset ultrafast -crf 0 -r 60 out.mkv

The output file (out.mkv) has the correct framerate, but had only half of the frames from the original file. Original file had 420 frames, but ffmpeg shows only 210 frames.

If I try a lossy encoding method:

sudo ./video_encode file.rgb 1440 1080 H264 file.h264 -tt 0 --max-perf -l 50 -fps 60 1

The output file from ffmpeg is now twice the length of the orignal one (it went from an 8s file to a 16s file).

Am I doing something wrong with the multimeda API or with ffmpeg?

Hi,
Is file.h264 YUV420 or YUV444? It supports only YUV444 in lossless encoding.

Hi @DaneLLL

Ah that makes sense, I was using YUV420 for both lossless and lossy encoding.

I did try to use YUV444 before, but noticed that encoding YUV420 files was much faster.

I am working with a monochrome camera, so I have to convert to YUV before using the multimedia api encoder.

Hi,
If you need to encode faster and can accept little loss, can try to encode all YUV420 frames with qp value=0.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.