So, I use HAproxy to redirect rtmp. (or forward…not sure which one describes what I am doing?)
Currently I send rtmp as such: rtmp://“serverIP”:1935/stream HAproxy handles this properly.
However, now I want to send rtmp://“serverIP”:1935/stream/“stream key”. The stream key can be a name or number. My Media Server does not actually use the stream key. However, I want to use it as an identifier of who is sending the rtmp. So in HAproxy, I want to take the “stream key” and shove it in a variable that the bash shell can read. Then I use this variable to construct a file name when I create an mp4 out of a live stream. I hope what I am wanting to do this makes sense?
Can this be done? Can HAproxy take the incoming rtmp and grab what comes after /stream/ and save it in a variable that a shell script can read?