0

I've got a python project that, in a loop, writes strings to be interpreted by mpv and drop them in a terminal shell. MPV Player is called and reproduces the sequence of cuts with variables randomly chosen on python.

The thing is: I need to stream it.

I got it working by OBS Studio's screen capture with iShowU, for the audio. It's streamed to my twitch or youtube channel. But the final stage of this project is to put it on a virtual machine. And the big thing is: the free virtual machines I found ( RedHat and Heroku ) don't have a screen to be captured! So I'd have to find a way to stream it directly from mpv. Or use some kind of pipe or socket to get it from mpv's playback.

Is there a way to do so?

I'll probably have to create an automated docker with everything I need inside it. Is that it?

I'm running a high sierra mac and the docker would be linux, so coding should be the same.

Have someone already done something alike? Thanks a lot!

David Maze
  • 130,717
  • 29
  • 175
  • 215
Fitipe
  • 1
  • 1
  • 2
  • You are missing a step or two. OBS converts and encoded to RTMP, and Twitch/YouTube convert RTMP to HLS or DASH. Where do you plan on doing those conversions? – szatmary Jun 09 '20 at 22:13
  • Thanks for the quick reply (: I'm new to programing and even newer to streaming ... It's te first time I see these terms "RTMP", "HLS" and DASH. I'll search for what they are ... Do I need to do those conversions? Is what I'm trying to do clear? I maybe messed up with english aswell :P – Fitipe Jun 10 '20 at 15:09
  • My program does not generate files, it just launches a mpv playback fed by looply generated strings with random parameters ( speed, length .. ). Is there a way to sen this playback directly to OBS? If not, is there a way to convert this playback to RTMP and send it to Twitch/YT while its been played? Thanks again! – Fitipe Jun 10 '20 at 15:30

0 Answers0