NALU control in NVENC

I’m using Mac’s VideoToolbox to do decoding, and it requires AVCC instead of AnnexB. The difference between the two is simply the header, so any of the following would work:

  1. Only output single NALU units (or, only output single NALU units at predictable times
  2. Have some sort of details about where the NALU units are in a stream
  3. Use AVCC instead of AnnexB

For (1), it seems potentially possible. From a sample session, I found that the only non-single NALU blob was the first output from NVENC. Can I rely on this being the case? Or, is there a fast way without searching through the whole blob to know if this is the case? I’ve got zero intra-refresh, which could help.

Running NVENC for several minutes is showing me that all but the first output from NVENC only has one NALU. So that’s encouraging. Still looking for an answer that can give me more confidence.