Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting live streaming like Manim #91

Open
freemin7 opened this issue Aug 14, 2020 · 8 comments · Fixed by #337
Open

Supporting live streaming like Manim #91

freemin7 opened this issue Aug 14, 2020 · 8 comments · Fixed by #337
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed To the Moon! Ideas that are out of this world amazing! But cannot be worked on... yet. :)

Comments

@freemin7
Copy link

freemin7 commented Aug 14, 2020

Manim has a python -m manim --livestream option and even options for Twitch python -m manim --livestream --to-twitch --with-key [streamkey] which allow to write the live rendered content to Twitch in real time.

It would be cool to be able to the same from Javis. This functionality might be better suited for a package on top of Javis.
As far as i understand ffmpeg provides that functionality.

@freemin7 freemin7 added the enhancement New feature or request label Aug 14, 2020
@TheCedarPrince TheCedarPrince added the To the Moon! Ideas that are out of this world amazing! But cannot be worked on... yet. :) label Aug 14, 2020
@freemin7
Copy link
Author

The related issue in Manim and how it was added is documented here: 3b1b/manim#335

@Wikunia
Copy link
Member

Wikunia commented Aug 15, 2020

Thanks for opening the issue. What I can see in the nearer future is the following:
We can directly display the current frame in a window instead of saving it into a file. Then we can use OBS to stream our screen. I know it's dull but at least we would not need to wait to create a gif or later mp4 but instead could see directly what gets animated.

In general I plan on using an images array instead of saving every frame to an image file as this is what currently slows down Javis.

@Wikunia Wikunia added the help wanted Extra attention is needed label Sep 12, 2020
@TheCedarPrince
Copy link
Member

Hey @freemin7, just following up here, any updates? I saw a post you made in the Julia Slack asking about ffmpeg regarding streaming:

ffmpeg -re -i input.mkv -c:v libx264 -preset veryfast -b:v 3000k -maxrate 3000k \
-bufsize 6000k -pix_fmt yuv420p -g 50 -c:a aac -b:a 160k -ac 2 \
-ar 44100 -f flv rtmp://live.twitch.tv/app/<stream key>

@freemin7
Copy link
Author

It might be interesting to have minimal examples like this:

  • A clock widget which streams the current system time (not a calculated time) and displays an image of an cuckoo between X:00:00 - X:00:59
  • If possible an interactive demo where you can set functions in a Julia shell to change what is displayed in real time

Both demos should work with OBS.

@TheCedarPrince
Copy link
Member

@freemin7 - the latter should be in our documentation. The former idea is being worked on in #345

I know you requested this feature a while ago but I would love to see what animations you should come up with! :)

@freemin7
Copy link
Author

I didn't find them a new one in https://wikunia.github.io/Javis.jl/dev/examples/#Examples .

https://wikunia.github.io/Javis.jl/dev/workflows/#Live-Streaming shows how to set it up with OBS. However i am unsure how to set up an background as 1:Inf seems dubious.

@Wikunia
Copy link
Member

Wikunia commented Jun 16, 2021

Hi @freemin7 ,
it's unfortunately not yet live streaming see #345
The animation is getting rendered before it is sent to obs.
As it's sent as a gif such that the animation is just getting repeated.

@Wikunia
Copy link
Member

Wikunia commented Jun 16, 2021

I would phrase the comment by @TheCedarPrince a bit differently about the interactive demo.
It is only possible in the sense that you can change your code and render it again with which it will replace the old animation.

@Wikunia Wikunia reopened this Jun 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed To the Moon! Ideas that are out of this world amazing! But cannot be worked on... yet. :)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants