errors when decode H.264 frames using ffmpeg

后端 未结 3 816
盖世英雄少女心
盖世英雄少女心 2021-01-30 13:18

I am getting the following errors when decoding H.264 frames received from the remote end of a H.264 based SIP video call. Appreciate any help in understanding there errors.

3条回答
  •  隐瞒了意图╮
    2021-01-30 13:53

    you need to add frames sps and pps information. ffmpeg needs these information to make decoding. You can find these values in SDP file.

    In SDP file, you should look NAL units, you can see something like that z0IAHukCwS1xIADbugAzf5GdyGQl, aM4xUg

    these values based64 encoded you should convert it to hex format. I am using wireshark and wireshark converts itself these values for you. After that you have sps and pps values.

    Now you have to add these Nal information before data frame.

    00 00 00 01 sps 00 00 00 01 pps 00 00 00 01 data

    for h264 these format i have been using to decode.

提交回复
热议问题