을 사용하여 H.264 비디오에 KLV 패킷을 인코딩하는 방법 현재 libav *를 사용하여 H.264 비디오를 인코딩하고 있습니다. 비트 스트림에 KLVPackets를 추가하고 싶지만 어디에서 구현해야하는지 모르겠습니다.libav *
av_register_all();
pOutputFormat = av_guess_format(NULL, fileName, NULL);
pFormatCtx=avformat_alloc_context();
pVideoStream = av_new_stream(pFormatCtx,0);
pCodecCtx=pVideoStream->codec;
...
av_dump_format(pFormatCtx, 0, fileName,1);
pCodec = avcodec_find_encoder(pCodecCtx->codec_id);
avio_open(&pFormatCtx->pb, fileName, AVIO_FLAG_READ_WRITE)
avformat_write_header(pFormatCtx, &pDict);
...
avcodec_encode_video(pCodecCtx,outbuf,outbuf_size,ppicture);
...
int ret = av_interleaved_write_frame(pFormatCtx, &pkt);
사람 :이 avcodec 내에서 구조체는,하지만 난 (단지 관련 코드를 왼쪽) 프레임 메타 데이터
typedef struct {
UID key;
int64_t offset;
uint64_t length;
} KLVPacket;
현재 FFMPEG 코드를 그것을 작성하는 방법이 확실하지
내가 일할 수있는 모든 예를 알고 있습니까?