Encoder output Nalu

Hi,

I am using the Encoder to encode H264 and H265. I want to make multiple slices of one frame.

Is there a way to know the Nalu slice, whether it is the first or the last or within between of one frame?

Thanks

Hi,
You can try 01_video_encode sample and check the options:

        -slt <type>           Slice length type (1 = Number of MBs, 2 = Bytes) [Default = 1]
        -slen <length>        Slice length [Default = 0]
        --sle                 Slice level encode output [Default = disabled]

Be default slice length type is number of macroblocks. You can set slice length accordingly to separate the frames into slices. You can know the slice number from resolution.

Thanks DaneLLL,

I think the slice length is for encoded bitstream other than raw image data.

Hi,
Yes, encoded frames will be divided into several slices. Please refer to
Encode H264 by slice

How to calculate macroblocks:
How does slice mode video encoding work for Jetson?

Thanks a lot DaneLLL,

I saw the you mentioned

So, even there is several slices, the buffer dqued from capture_plane contains a whole frame, right? All the slices data are in the same buffer?

Hi,

It is for r28 releases. For r32 releases, please set

        --sle                 Slice level encode output [Default = disabled]