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
  [...]
  avformat_write_header(s);

Then to output klv frame, you need to create an AVPacket and call 
av_write_frame()

  AVPacket pkt
  av_new_packet(&pkt, _data_size_)
  pkt.stream_index = _pick_a_number_
  // load klv data into pkt.data
  av_write_frame(s, &pkt)

Note everything above is untested pseudo code. You probably also need to set 
stream and packet pts.

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to