[FFmpeg-user] How to publish new MetaData while transcoding for a RTMP stream?

Wang Yun me at mogita.com
Sat Jul 2 20:40:24 CEST 2016


Hello,

I’m using FFmpeg as  a transcoder to do some conversion on an incoming RTMP stream (served on my own server with nginx-rtmp-module), and then publish the result to another RTMP service. My publishing client is written in ActionScript 3.

In a graph it’s like:

Client app 
	|
publishes to
	|
FFmpeg on my own server which
	|
does the needed transcoding then publishes to
	|
upstream RTMP server.

This process can be easily done with “ffmpeg -i rtmp://localhost/app/id -map_metadata 0 -c:v copy -c:a aac -f flv rtmp://other.server/app/id”. It works well.

But then I met a problem: This command only transfers the first-time metadata to the upstream server, which successfully showed up on the audience side. But what if I want to send new metadata from my Client app during the live streaming, and make them reach to the audiences through FFmpeg? It seemed that new metadata were “dropped”, they never triggered the onMetaData() method on the audience side. I’ve tried a bunch of combinations of params for -map_metadata according to its documentation, but none of them worked.

Someone got ideas on this?

Any help is appreciated! Thank you!

mogita


More information about the ffmpeg-user mailing list