How to publish stream on to nginx RTMP server?

How to publish stream on to RTMP server after getting a response from HTTPoision. Here is sample code I am using:HTTPoison.post(url, xml, ["Content-Type": "application/x-www-form-urlencoded", "Authorization": "Basic #{Base.encode64("#{username}:#{password}")}", "SOAPAction": "http://www.w3.org/2003/05/soap-envelope"], [stream_to: self()]).

I tried to use stream_to for publishing stream but no luck.

Thanks!

I don’t quite understand, are you trying to post an RTMPT stream to nginx-rtmp through HTTP?

No, I want to post stream packets to Nginx rtmp.

I just get stream packets using HTTPoison post request and then want to post on to NGINX RTMP.

I think you might need an rtmp client to post stream packets to nginx-rtmp.

Any example? or rtmp client name?

There is one in elixir, https://github.com/KallDrexx/elixir-media-libs/tree/master/apps/gen_rtmp_client, you can also use ffmpeg, or pull the stream directly into nginx-rtmp.