live-stream-radio icon indicating copy to clipboard operation
live-stream-radio copied to clipboard

Look into Stream mirroring

Open torch2424 opened this issue 8 years ago • 11 comments

https://www.reddit.com/r/Twitch/comments/42a25b/streaming_to_twitch_and_youtube_gaming/

torch2424 avatar Sep 22 '17 23:09 torch2424

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

torch2424 avatar Sep 22 '17 23:09 torch2424

Actually it is because the required flag is broken with copy: https://trac.ffmpeg.org/ticket/3723

torch2424 avatar Sep 23 '17 00:09 torch2424

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/

torch2424 avatar Sep 23 '17 00:09 torch2424

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

torch2424 avatar Sep 23 '17 01:09 torch2424

Will also need this: https://www.nginx.com/resources/wiki/start/topics/examples/systemd/

torch2424 avatar Sep 23 '17 01:09 torch2424

Here is the required nginx systemctl service:

https://github.com/torch2424/dotFiles/blob/master/.files_templates/nginxstream.service

torch2424 avatar Sep 24 '17 20:09 torch2424

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

torch2424 avatar Oct 05 '18 22:10 torch2424

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.

torch2424 avatar Oct 07 '18 06:10 torch2424

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.

djeraseit avatar Nov 27 '18 17:11 djeraseit

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. 😄

torch2424 avatar Nov 27 '18 18:11 torch2424

Also if you are lazy, restream.io provides a free service that basically does this.

dropitlikecross avatar Sep 18 '19 00:09 dropitlikecross