H.265 stream - codec private data information

Completed

Comments

8 comments

  • DJI Developer Support
    Information about how to access codec private data in V5. This metadata is included in Sequence Parameter Set (SPS), Picture Parameter Set (PPS) and Video Parameter Set (VPS) frames. This part can refer to the standard H.265 format for analysis and collection. There is no documentation describing how to parse it. In V4, the H.264 data in DJI format can be obtained through **getPrimaryVideoFeed**, which needs to be sent to **DJICodecManager** for framing, and then the standard H.264 data after framing can be obtained from the provided **TranscodedVideoFeed**.
    0
    Comment actions Permalink
  • DroneControl

    Hello DJI!

    Does that mean that when calling addStreamDataListener to get the standard H.265 video stream data, the SPS, PPS and VPS frames are only sent at the beginning of the stream when we subscribe to data listener? Or are they sent in between the whole time?

    0
    Comment actions Permalink
  • DJI Developer Support
    send at the beginning
    0
    Comment actions Permalink
  • DroneControl

    Thank you, we managed to extract the SPS, PPS and VPS from the stream.

    0
    Comment actions Permalink
  • DJI Developer Support
    You're welcome, you can try it
    0
    Comment actions Permalink
  • DroneControl

    Hello DJI Developer Support!

    Could you please confirm that the following is indeed correct data for CPD:

    00 00 00 01 40 01 0c 01 ff ff 01 40 00 00 03 00 
    80 00 00 03 00 00 03 00 78 ac 0c 00 00 0f a0 00 
    01 d4 c2 00 fa 28 00 00 00 01 42 01 01 01 40 00 
    00 03 00 80 00 00 03 00 00 03 00 78 a0 03 c0 80 
    10 e7 fa 2e ec 91 77 a2 5d 58 10 00 00 3e 80 00 
    07 53 0c 40 00 00 00 01 44 01 c1 ad f0 13 64

    Based on the data structure it should be, as it consists of Sequence Parameter Set (SPS), Picture Parameter Set (PPS) and Video Parameter Set (VPS) frames, each starting with start bytes 00 00 00 01. Also could you confirm that:

    • stream is in Annex-B delimited format for NALUs
    • Can CPD change during streaming?
    0
    Comment actions Permalink
  • DJI Developer Support
    The data you gave is the correct data of CPD, which starts with 00 00 00 01 stream is in Annex-B delimited format for NALUs? --> yes Can CPD change during streaming? --> Can't
    1
    Comment actions Permalink
  • DroneControl

    Hello DJI Developer Support!

    VideoDecoder class has the following methods available, but they are not present in the documentation:

    public byte[] getSps() {
    return null;
    }

    public byte[] getPps() {
    return null;
    }

    Does this return the SPS & PPS information for the current VideoDecoder, which is producing decoded H265 video stream?

    0
    Comment actions Permalink

Please sign in to leave a comment.