Im trying to convert rtmp into an HLS stream using ffmpeg as the rtmp server. In the docs they mention that providing
-listen 1 makes ffmpeg act as an rtmp server yet the behaviour is very weird.
Example's I've tried (hls part changed to mp4 for readability):
ffmpeg -listen 1 -f flv -i rtmp://localhost:1935/live/appname -c copy -f mp4 ffmpeg -listen 1 -f mpegts -i rtmp://localhost:1935/live/appname -c copy -f mp4
All give me the following error:
RTMP_Connect0, failed to connect socket. 61 (Connection refused) rtmp://127.0.0.1:1935/live/app: Unknown error occurred
What does work for me is when I change rtmp into tcp and vice versa in OBS for a test stream; however I actually doubt its then using rtmp as its underlying protocol.
Are there certain flags I have to enable during compilation of ffmpeg? My version has librtmp enabled. I'm not entirely sure what I'm doing wrong here but it looks like ffmpeg is still going into client mode even though I specified the listen flag.
Some other details: I have tried with different outputs as well; with no luck, different placements of listen etc.