[Feature request] Implementing RTMP for live streaming to Twitch etc.
Is your feature request related to a problem? Please describe. Not really related to a problem, but it would be great if we could directly live stream from a Switch.
Describe the solution you'd like Adding an RTMP mode similar to the RTSP mode. I have tried using ffmpeg binaries on a separate device that converts RTSP to RTMP, where the video is copied as is and the audio is transcoded from Raw to AAC or similar. Maybe the audio transcoding could be left out if too taxing as a sysmodule.
Describe alternatives you've considered One alternative could be a separate sysmodule that runs in parallel to SysDvr but that could lead to performance issues. Another alternative would be to have a low power device like RPi do the transcoding, but then it won't be just the Switch anymore.
Additional context I did try implementing some of this myself but it is hard to debug a sysmodule. I would be happy to discuss, and given some pointers in the right direction for debugging / dev setup more than willing to contribute in the this feature's development!
So you mean streaming directly from a switch to youtube or twitch? that would be interesting (although not sure how practical).
I have a few concerns here. Most importantly audio encoding, sysmodules run only on core 3 and if we hog that core the whole console will become unresponsive, we'd need a software audio encoder that's fast enough.
Then there's memory usage, I think we're at the limit already, the more we increase that the more sysdvr will become not compatible with other sysmodules and that is undesirable. We'd need an extra buffer for the encoded audio as well as an RTMP client, note that sysdvr builds without most of libc and most notably without malloc so like bringing in curl could add a major memory overhead, libavcodec is defeintely not an option.
As for writing a custom rtmp client i did some googling and the protocol is not simple like rtsp (and even for that the current impl is barely compliant). Do you have any minimal rtmp streaming example?
Considering also the bad wifi performances of switch, I think this feature is probably more trouble that it's worth. I'll leave this open for further discussion and if someone actually wants to give this a shot but currently it's not something i'm personally interested in.
So you mean streaming directly from a switch to youtube or twitch? that would be interesting (although not sure how practical).
I have a few concerns here. Most importantly audio encoding, sysmodules run only on core 3 and if we hog that core the whole console will become unresponsive, we'd need a software audio encoder that's fast enough.
Then there's memory usage, I think we're at the limit already, the more we increase that the more sysdvr will become not compatible with other sysmodules and that is undesirable. We'd need an extra buffer for the encoded audio as well as an RTMP client, note that sysdvr builds without most of libc and most notably without malloc so like bringing in curl could add a major memory overhead, libavcodec is defeintely not an option.
As for writing a custom rtmp client i did some googling and the protocol is not simple like rtsp (and even for that the current impl is barely compliant). Do you have any minimal rtmp streaming example?
Considering also the bad wifi performances of switch, I think this feature is probably more trouble that it's worth. I'll leave this open for further discussion and if someone actually wants to give this a shot but currently it's not something i'm personally interested in.
maybe it could meet in the middle by having the program itself support streaming directly to twitch with the raw output or even a small low resource requirement program that lets it do the work with a rasberry Pi to stream over USB without the need for good Specs to stream from