Post

Replies

Boosts

Views

Activity

Reply to Help decoding H264 with Video Toolbox
Well, I finally found the answer so I'm going to leave it here for posterity. It turns out that the Video Toolkit decode function expects the NAL blocks that all belong to the same frame to be copied into a single SampleBuffer. The older Mac is providing the app with single keyframes that are split into separate NAL blocks which the app then sends individually across the network. Unfortunately this means that the first NAL block will be processed, in may case less than a quarter of the picture, and the rest will be discarded. What you need to do is work out which NALs are part of the same frame, and bundle them together. Unfortunately this requires you to partially parse the PPS and the frames themselves, which is not trivial. Many thanks to the post  here - https://developer.apple.com/forums/thread/14212?answerId=66185022#66185022 which put me on the right track.
Topic: Media Technologies SubTopic: Video Tags:
Feb ’21