prismarine-viewer icon indicating copy to clipboard operation
prismarine-viewer copied to clipboard

Stream to twitch

Open louis030195 opened this issue 4 years ago • 8 comments

Who needs human streamers when you can have bots ?

  1. Stream to twitch a bot (Twitch API intregation)
  2. Make him do some random stuff (outside of the scope of this repo)
  3. Make him talk on the stream through text to speech based on its actions (outside of the scope of this repo)

louis030195 avatar Dec 25 '20 14:12 louis030195

is it really required for viewer to be able to stream to twitch? It sounds like a use case and not a feature.

wvffle avatar Dec 25 '20 14:12 wvffle

yeah maybe not in the core lib but it could be an interesting example indeed! https://github.com/PrismarineJS/prismarine-viewer/blob/master/examples/core/headless.js + some twitch lib

rom1504 avatar Dec 25 '20 15:12 rom1504

seems there's currently no npm package to stream to twitch, however here's an example https://github.com/pion/example-webrtc-applications/tree/master/twitch

rom1504 avatar Dec 25 '20 15:12 rom1504

There is this feature in ffmpeg, so starting from the headless example this should be a 1 line change

https://wiki.archlinux.org/index.php/Streaming_to_twitch.tv#FFmpeg

Karang avatar Dec 25 '20 15:12 Karang

Ah yeah indeed, that's convenient. https://wiki.archlinux.org/index.php/Streaming_to_twitch.tv#FFmpeg has information on this

On Fri, Dec 25, 2020, 16:45 Karang [email protected] wrote:

There is this feature in ffmpeg, so starting from the headless example this should be a 1 line change

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/prismarine-viewer/issues/103#issuecomment-751264944, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAR437RA3AYXDNA5JPJSCRTSWSXSRANCNFSM4VJFN6OA .

rom1504 avatar Dec 25 '20 16:12 rom1504

Has this been solved? I’m interested in allowing the bot first person point of view. Even it can be played through a viewer then I can obs that source

joggerjoel avatar Mar 31 '21 14:03 joggerjoel

Has this been solved? I’m interested in allowing the bot first person point of view. Even it can be played through a viewer then I can obs that source

@joggerjoel didn't try yet

louis030195 avatar Mar 31 '21 15:03 louis030195

This is done now, we have an example to show how to: https://github.com/PrismarineJS/prismarine-viewer/blob/master/examples/twitch.js

However this might need more testing to find the best parameters for here: https://github.com/PrismarineJS/prismarine-viewer/blob/master/lib/headless.js#L40

And maybe try to optimize the process to improve the framerate and video quality.

Karang avatar Mar 31 '21 16:03 Karang