question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(Re) implementing livestreaming feature

See original GitHub issue

This issue is mostly a reminder for myself, and a place to discuss about what we want and what we don’t.

First of all, livestreaming with manim looks very powerful to my eyes, as it looks like this : alt text This gif has been taken from a previous PR in 3b1b/manim, meant to fix this feature : https://github.com/3b1b/manim/pull/786. Unfortunalty, everything about livestreaming got broken at some point and was eventually removed, exepted streaming settings, ruins of the old world. Everything was removed in https://github.com/3b1b/manim/pull/985/, so if you want to see how it used to be implemented, go there.

TL;DR : how could it work ? Well, it is actually pretty simple as ffmpeg has lot of livestreaming features.

Proposal :

Here is what I propose to (re)implement, and how.

  • Launching manim --livestreaming will pop an interactive python shell dedicated to get manim play/wait/etc calls. Pretty much what is on the gif sent above.
  • The InteractiveShell will got for variables a special scene. Why ? because if it’s a regular Scene object, one has to write a Scene definition and a construct method in order to write play calls, and therefore it is not possible to live-render a play call. The best idea would be to have SpecialScene that would include ThreeDScene, GraphSCene, etc. Indeed, there won’t be no scene defintion in the shell so the user won’t be able to specify which type of scene does they want. See stream_starter.py in this PR here to see how it used to work (it was pretty much how I described except using the old ans ugly CONFIG dict.). So, it would be possible to do :
>>> SpecialScene.play(Transform(object))
 # Then it would appear on the live stream. 
  • I think there should be sort of “commands” of the live. For example, a command that would go back from x animations, render an existing scene (so, one would be able to keep working on a Scene while seeing changes in live), etc. I’m not sure how to implement that. The most obvious idea is to implement some methods to the SpecialScene (renamed here to manimlive). E.g :
>>> manimlive.go_back(animations = 2)
>>> manimlive.add_scene_from_file()

The problem is about variables. Going back in the video stream is fairly easy thanks to scene-caching ( 😉 ), but if we decide that when one goes back, all the variables are set to their original values, then it won’t be fairly easy. Same for adding an existing scene with all the variables that the new SCene will bring. (Note : for the last idea, it’s likely impossible but it is worth trying).

  • Speaking of config : it won’t change anything, the streaming will use a .cfg. The idea is to have a [streaming] section in the .cfg.
  • Speaking of scene-caching, I think it will be possible to use it, which is cool.
  • This will open the door to (re) implementing manim live-streaming on … twitch. Which is cool as well.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:16 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
leotrscommented, Nov 24, 2020

I’m sorry you are having trouble with this @NeoPlato. Unfortunately, git is far from intuitive and is definitely an (unavoidable) hurdle when contributing to manim.

Can you tell us how did you clone this fork? After cloning the fork, the directory where you cloned it should be a git repository, and the message you obtained should not have been shown. Are you sure you are running the commands from within the right directory?

Also, would you be able to tell us what part of this page gave you trouble, if any? This will help us improve our documentation for the future 🙂

0reactions
behacklcommented, May 15, 2021

Given there is https://github.com/NeoPlato/manim-livestream on the one hand, and the features for interactivity / render preview for rendering with OpenGL, this issue can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Your Plan to Implement Livestreaming - NextComputing
Which features are best for your streaming needs ... Every business should be using video for internal and external communications, marketing, training and ......
Read more >
The ultimate live streaming guide for beginners | Livestream
Don't pause your dreams to live stream. Check out our beginner's guide on how to live stream and the equipment you need to...
Read more >
How to Set Up a Live Streaming Website in 11 Simple Steps
Once your live-streams are over, you can repurpose them as video-on-demand content. This will open you up to three popular business models: Ad- ......
Read more >
Get started with live streaming - Android - YouTube Help
Live streaming lets you interact with your audience in real time with a video feed, chat, and more. Intro To Live Streaming on...
Read more >
How to Create Live Streaming App in 2022 - Uptech
You could have dozens of ideas that you'll want to implement in your live video streaming app, but the best way to test...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found