live-stream-radio
live-stream-radio copied to clipboard
Look into Stream mirroring
https://www.reddit.com/r/Twitch/comments/42a25b/streaming_to_twitch_and_youtube_gaming/
I think trying to use ffmpeg parallel processing is too hard for a pi:
https://trac.ffmpeg.org/wiki/Creating%20multiple%20outputs#Teepseudo-muxer
Which is why i was getting errors. The nginx solution may be the best / easiest
Actually it is because the required flag is broken with copy: https://trac.ffmpeg.org/ticket/3723
Actually, nginx is the best option, see the reddit and this: https://obsproject.com/forum/resources/how-to-set-up-your-own-private-rtmp-server-using-nginx.50/
Nginx totally works. Gets installed to /usr/local however. And would need a systemd script running it. Also the entire config is in nginx.conf
Will also need this: https://www.nginx.com/resources/wiki/start/topics/examples/systemd/
Here is the required nginx systemctl service:
https://github.com/torch2424/dotFiles/blob/master/.files_templates/nginxstream.service
Actually found out node media server can do this yay! 🎉
https://github.com/illuspas/Node-Media-Server/issues/57
See the paint with bob project, can even start serving your own stream from an flv:
https://github.com/PaintWithBob/paint-with-bob/blob/master/videoservice/lib/server.js
Tried doing this with tee muxing, but didn't work with node fluent ffmpeg. Thus, there is logic for this in the form of "stream_outputs" in the config.json.
what is the best way to do this on a pi? Node-Media-Server? I'm used to nginx way but think it will be heavy. Need benchmarks.
Honestly, if you know how to set up the nginx way, that is definitely going to be the best / fastest. But I think keeping the project JS only, and using node media server, would be most convenient for users. 😄
Also if you are lazy, restream.io provides a free service that basically does this.