Package: videogestalt
Video GestaltOne-Glance Overview of Any VideoVideo Gestalt displays a video in a summary form that shows the entire video at once as an array of moving video thumbnails.DescriptionVideo Gestalt presents a condensed video array, showing the entire video at once as moving video thumbnails.The above is an example of the Video Gestalt for a 50-second commercial for Vesta scooters. (Click the Video Gestalt to see the original video.)As you can see, it is a looping video with moving thumbnails of the original video. In one second, you can see every frame of the original video at a glance, without any discontinuities as it loops. This is done by arranging that each thumbnail slides over exactly its width in one loop so that the next thumbnail takes over seamlessly.Hence, the video gestalts can be read in two ways: 1- an overall quick glance shows all the scenes of the entire video, 2- by focusing on one animated thumbnail, we can watch the entire video, by starting in the upper left corner, and following to the right, then descending one block lower and moving from right to left, then descending one block and moving left to right again, etc.A longer explanation is available inthis blog post.InstallationSo far this has been tested on Linux, Chrome OS and Windows, but it will likely work on MacOS too.To install, simply usepip:pipinstall--upgradevideogestaltThis will also installMoviePy, which will automatically installFFmpegif necessary.If they are not already installed, you will need to installpython3and the corresponding Python package managerpipbeforehand.On Linux and friends you might be able to do this like so:sudoapt-getinstallpython3python3-pipIf you get an error, please ensure you are using the latestpipversion, as older versions may not support PEP517 Python packages:pipinstall--upgradepipUsageAn executable binaryvideogestaltis automatically installed in the local environment.To generate a video file:videogestalt-icountdown.mp4-ocountdown-gestalt--videoTo generate an animated GIF (warning, output can be large):videogestalt-icountdown.mp4-ocountdown-gestalt--gifThe application can also be used as a Python module:>>>fromvideogestaltimportvideogestaltasvg>>>vg.main('-i countdown.mp4 -o countdown-gestalt --gif')Note: if the repository is cloned, there is an examplecountdown.mp4video intests/examples.BuildingThe module can be built with PEP517 standard tools, such aspypa/build:python-sBmbuild.It can also be installed in development/editable mode after cloning this git repository:pipinstall--upgrade-e.Known issuesThere are a few known issues, due to the fact that moviepy, the library that we use to process videos, iscurrently not actively maintained as of August 2023 since at least December 2022. Here is a list of downstream issues:PILLOW 10.0.0 introduced a breaking change with moviepy, and althougha fixwas merged upstream into moviepy, there is no pypi release. Two solutions: cap PILLOW below 10, or install moviepy from github. Since the future of moviepy is uncertain, we chose to cap PILLOW, to ensure this tool continues to work in venvs.On Windows, after saving the output, the following exception may arise:Exception ignored in: <function FFMPEG_VideoReader.__del__ at 0x00000253011BF920>
Traceback (most recent call last):
  File "C:\Users\33632\miniconda3\Lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 199, in __del__
    self.close()
  File "C:\Users\33632\miniconda3\Lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 190, in close
    self.proc.terminate()
  File "C:\Users\33632\miniconda3\Lib\subprocess.py", line 1671, in terminate
    _winapi.TerminateProcess(self._handle, 1)
OSError: [WinError 6] Descripteur non valideAgain this wasfixedon github but not in the latest pypi release of MoviePy. This remain unfixed, it does not prevent usage of the tool, it is just inelegant.LicenseCreated by Eamonn O'Brien-Strain.Licensed under the Mozilla Public License 2.0