In order to capture video output, the capture_video magic searches for the video location in an HTML string.
It works, but it is not pretty.
It would be much better to directly access the IPython.core.display.Video object to read the video location.
Here is the corresponding code:
@maartenbreddels, @krassowski : Maybe you might be interested in this challenge, I saw that you already worked with videos in Jupyter widgets at ipywebrtc and jupyter-manim.
In order to capture video output, the
capture_video
magic searches for the video location in an HTML string. It works, but it is not pretty. It would be much better to directly access theIPython.core.display.Video
object to read the video location. Here is the corresponding code:https://github.com/kolibril13/jupyter-capture-output/blob/249538534630dee8a08acdb4a1268d59cc40fd57/jupyter_capture_output/co_cellmagic.py#L91-L117
@maartenbreddels, @krassowski : Maybe you might be interested in this challenge, I saw that you already worked with videos in Jupyter widgets at ipywebrtc and jupyter-manim.