Search code examples
sizeslicex264libx264h.265

x265 Set max NAL/slice size via libx265


I want to send my encoded NAL packets via UDP as a fast webcam streaming program. Because of the MTU size, I want to set the NAL packets to a max size of around 1390 bytes.

I've found another response on Stack Overflow explaining that one has to set the i_max_slice_size or something, but this was for x264. I've been trying to find the equivalent for x265 but I cannot see it anywhere.

I am using the libx265 (using x265.h) library for encoding.

Can anyone guide me in the right direction please? All help is greatly appreciated!


Solution

  • AFAIK there is no such thing in libx265 currently (it is in earlier stage of development and not all use cases are currently covered). Also as far as I looked it doesn't support more than one slice per frame at all currently not saying about size limited slices.