LibRtmp-Client-for-Android icon indicating copy to clipboard operation
LibRtmp-Client-for-Android copied to clipboard

Send Metadata

Open midgard-as opened this issue 4 years ago • 1 comments

Hello,

I would like to send Metadata per frame through RTMP Muxer along my video frames ! Would you have an idea on how to implement a writeMetadata/ addMetadata function that allows me to send XML or string data ?

Thanks

midgard-as avatar Mar 17 '21 14:03 midgard-as

First define the metata attribute in xiecc_rtmp.c,like this

...  
static const AVal av_videoframerate = AVC("framerate");  
...

Then modify the length in the rtmp_open_for_write method and write the attributes

...
output = AMF_EncodeInt32(output, outend, 6);  
output = AMF_EncodeNamedNumber(output, outend, &av_videoframerate,30);
...

luohaohaha avatar Aug 20 '21 01:08 luohaohaha