[Libav-user] EXTERNAL: Re: AV_CODEC_ID_SMPTE_KLV not recognized
nfxjfg at googlemail.com
Wed Aug 13 23:27:11 CEST 2014
On Wed, 13 Aug 2014 17:43:30 +0000
"Sears, Zachary" <zachary.sears at lmco.com> wrote:
> Thanks for the quick reply, I started down that path and do have code that generates valid TS packets with KLV data, from what you're saying it sounds like that was the right path to take. I guess the problem that I keep getting hung up on after that is how to create the additional stream to have a type of AVMEDIA_TYPE_VIDEO and at least an id of AV_CODEC_ID_SMPTE_KLV, from the output of ffprobe it certainly seems like this is recognized by ffmpeg but I can't figure out how to do it. For the video stream at least I do avformat_new_stream(avFormatContext, avCodec), but since there is no codec for the KLV data (NULL is returned from avcodec_find_encoder), I guess I am a little confused on how to get to that point. The end that I need to find eventually is getting down to av_interleaved_write_frame where the AVFormatContext has a valid data stream.
To me, it looks like this KLV thing is supported for muxing/demuxing
only (as in, libavformat can read and write raw packet data from/to
You're wondering what AVCodec to pass to avformat_new_stream()? It
seems the API allows passing NULL. Then you have to initialize the
codec fields (not sure which) yourself, though.
More information about the Libav-user