You can use the exact same setup for RTMP. To provide multiple sources, you can use a sources parameter like so:
To enable quality switching, you’ll have to use a SMIL file for RTMP.
To enable automatic quality switching with HLS, you’ll have to build a manifest with multiple bitrates.
This question has received the maximum number of answers.