I am decoding and display a DVB-S2, H.265 stream containing Audio and Video. Data is from Es’hail 2 (aka QO-100). Some transmissions send video PTS out of sequence which I believe requires a frame reordering buffer.
Part 1: I see references to I, P and B pictures in online literature but an not sure how these correspond to the NAL header. I’m analysing and see NAL unit types as below:
AUD_NUT, VPS_NUT, SPS_NUT, PPS_NUT, PREFIX_SEI_NUT, PREFIX_SEI_NUT, IDR_W_RADL
AUD_NUT, PREFIX_SEI_NUT, TRAIL_R
AUD_NUT, PREFIX_SEI_NUT, TRAIL_N
…
AUD_NUT, PREFIX_SEI_NUT, TRAIL_N
AUD_NUT, PREFIX_SEI_NUT, TRAIL_R
AUD_NUT, PREFIX_SEI_NUT, TRAIL_N
…
AUD_NUT, PREFIX_SEI_NUT, TRAIL_N
Part 2: Buffers with TRIAL_N have a PTS before the previous TRIAL_R. Should I apply any frame buffering, if so what’s the correct logic to use?
- If I display in the order the buffers are received the video is fine but the interval between frames is not constant (as one could expect).
- If I use buffering and display in PTS order then it’s clearly wrong, very jerky, obviously frames out of order.
Part 3: I’ll attack the audio & video synchronisation when I know what buffer reordering I should apply. I currently assume I just use the PTS for each.
I’ve read everything I can find, even printed out all the relevant specifications but just don’t see what’s happening here.