[Libav-user] AV_CODEC_ID_SMPTE_KLV not recognized
pross at xvid.org
Fri Sep 5 15:30:15 CEST 2014
On Tue, Sep 02, 2014 at 10:33:46PM -0400, Timothy Reed wrote:
> I?m attempting to do the exact same thing and I too am stuck on the next step. It appears to me that I will need to encode the KLV data into the packets but then how to mux them together?
Correct. FFmpeg has no 'KLV encoder'.
> Have you guys made any progress that you can share?
Before calling avformat_write_header(), you need to manually create a KLV stream.
st = avformat_new_stream(s, NULL)
st->id = _pick_a_number
st->codec->codec_type = AVMEDIA_TYPE_DATA
st->codec->codec_id = AV_CODEC_ID_SMPTE_KLV
Then to output klv frame, you need to create an AVPacket and call av_write_frame()
pkt.stream_index = _pick_a_number_
// load klv data into pkt.data
Note everything above is untested pseudo code. You probably also need to set stream and packet pts.
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 181 bytes
Desc: Digital signature
More information about the Libav-user