- SEI NALU数据格式
- NALU 类型 1 字节 0x06
- SEI 负载类型 1 字节 0x05 (用户自定义数据)
- 负载大小(uuid+自定义数据),如果大小 size 大于 255,前 int(size / 255) 个字节都是 FF,最后一个字节是剩余部分
- 负载的唯一标志 uuid 16 字节
- 自定义数据
- 完成 NALU 数据编码
替换 00 00 为 00 00 03
- ffmpeg 转封装
- avformat_open_input
avformat_alloc_output_context2
avformat_new_stream
avcodec_copy_context
avio_open
avformat_write_header
av_read_frame
av_grow_packet
av_interleaved_write_frame
av_free_packet
av_write_trailer
avformat_close_input
avio_close
avformat_free_context - 添加 SEI 使用 av_grow_packet 后在开头插入 SEI NALU 数据
- avformat_open_input