-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from pyrva/useful-multimedia-manipulation
Useful multimedia manipulation
- Loading branch information
Showing
441 changed files
with
263 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
PYTHON[[:space:]]PRESENTATION[[:space:]]RVA[[:space:]]2020[[:space:]]JULY.key filter=lfs diff=lfs merge=lfs -text | ||
*ppts filter=lfs diff=lfs merge=lfs -text | ||
PYTHON[[:space:]]PRESENTATION[[:space:]]RVA[[:space:]]2020[[:space:]]JULY.pptx filter=lfs diff=lfs merge=lfs -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
figures | ||
abstract | ||
*.html | ||
mailmap |
3 changes: 3 additions & 0 deletions
3
lectures/useful-multimedia-manipulation/PYTHON PRESENTATION RVA 2020 JULY.key
Git LFS file not shown
Binary file added
BIN
+3.58 MB
lectures/useful-multimedia-manipulation/PYTHON PRESENTATION RVA 2020 JULY.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions
3
lectures/useful-multimedia-manipulation/PYTHON PRESENTATION RVA 2020 JULY.pptx
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Python for Quick, Useful Multimedia Manipulation: Anecdotes from a Python Programmer | ||
===================================================================================== | ||
|
||
One of Python's many killer features is that a programmer can create snippets of code, and organically and coherently join them into larger collections of module code. In this presentation, I describe and demonstrate relatively simple Python tools -- for image, video, and audio manipulation -- that I use every day at work and outside work. | ||
|
||
* automatically cropping out whitespace in images (surprisingly easy to do). | ||
|
||
* creating movies from a sequence of generated images. | ||
|
||
* conversion of movie clips, either files or YouTube clips, into animated GIFs (useful where the online service does not allow for video animations from movie files, such as GitHub_ or `Read the Docs`_). | ||
|
||
If there's time or interest, I can even describe and demonstrate how to retrieve and label music you might find, all within Python. | ||
|
||
Demonstrations live in the ``demonstrations`` subdirectory, and each demonstration is its own directory within ``demonstrations``, and each demonstration has its own ``README.rst``. Here are the four demonstration directories with description. | ||
|
||
1. ``autocropping_images``: autocropping a PNG image and a PDF image. | ||
|
||
2. ``movie_image_demos``: converting a sequence of images into an MP4 file. | ||
|
||
3. ``movie_gif_demos``: converting an MP4 file and a YouTube clip into animated GIFs. | ||
|
||
4. ``making_music_youtube``: using a tool, `plex_music_songs`_, that takes metadata from MusicBrainz_ and the YouTube clip using `youtube-dl`_, into an M4A file. | ||
|
||
.. _GitHub: https://github.com | ||
.. _`Read the Docs`: https://www.readthedocs.io | ||
.. _CloudConvert: https://cloudconvert.com | ||
.. _`plex_music_songs`: https://plexstuff.readthedocs.io/plex-music/cli_tools/plex_music_cli.html?highlight=plex_music_songs#plex-music-songs | ||
.. _MusicBrainz: https://musicbrainz.org | ||
.. _`youtube-dl`: https://rg3.github.io/youtube-dl |
2 changes: 2 additions & 0 deletions
2
lectures/useful-multimedia-manipulation/demonstrations/autocropping_images/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
iwanttobelieve_cropped.png | ||
cumulative_plot_emission_cropped.pdf |
29 changes: 29 additions & 0 deletions
29
...es/useful-multimedia-manipulation/demonstrations/autocropping_images/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
INSTRUCTIONS | ||
============= | ||
|
||
1. Go to these locations: | ||
|
||
a. autocropping lossy images: `nprstuff.core.autocrop_image.autocrop_image <autocrop_image_>`_ | ||
|
||
b. autocropping PDFs: `nprstuff.core.autocrop_image.crop_pdf_singlepage <autocrop_image_pdf_>`_ | ||
|
||
2. Cropping a PNG image: | ||
|
||
.. code-block:: console | ||
autoCropImage --input=iwanttobelieve_uncropped.png --output=iwanttobelieve_cropped.png | ||
Compare ``iwanttobelieve_uncropped.png`` and ``iwanttobelieve_cropped.png`` in a browser. | ||
|
||
3. Cropping a PDF image: | ||
|
||
.. code-block:: console | ||
autoCropImage --input=cumulative_plot_emission_uncropped.pdf --output=cumulative_plot_emission_cropped.pdf | ||
Compare ``cumulative_plot_emission_uncropped.pdf`` and ``cumulative_plot_emission_cropped.pdf`` in a PDF viewer. | ||
|
||
|
||
.. _`autocrop_image`: https://github.com/tanimislam/nprstuff/blob/f67e719ba4f2ca7120774937d27cb1adbb51c933/nprstuff/core/autocrop_image.py#L25 | ||
|
||
.. _`autocrop_image_pdf`: https://github.com/tanimislam/nprstuff/blob/f67e719ba4f2ca7120774937d27cb1adbb51c933/nprstuff/core/autocrop_image.py#L193 |
Binary file added
BIN
+18.8 KB
...ia-manipulation/demonstrations/autocropping_images/cumulative_plot_emission_uncropped.pdf
Binary file not shown.
Binary file added
BIN
+116 KB
...ia-manipulation/demonstrations/autocropping_images/iwanttobelieve_uncropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions
1
lectures/useful-multimedia-manipulation/demonstrations/making_music_youtube/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.m4a |
34 changes: 34 additions & 0 deletions
34
...s/useful-multimedia-manipulation/demonstrations/making_music_youtube/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
INSTRUCTIONS | ||
============= | ||
|
||
1. Go to these locations: | ||
|
||
a. showing Musicbrainz_ getting metadata (given an artist, all the albums + all songs of artist): `plexstuff.plexmusic.plexmusic.get_music_metadata <get_music_metadata_>`_ | ||
|
||
b. showing choose the correct YouTube clip: `plexstuff.plexmusic.plexmusic.youtube_search <youtube_search_>`_ | ||
|
||
c. showing part of downloading from `youtube-dl`: `plexstuff.plexmusic.plexmusic.get_youtube_file <get_youtube_file_>`_ | ||
|
||
2. ``plex_music_songs`` documentation at `this website`_. | ||
|
||
3. Show animation of getting songs, ``plex_music_songs_download_artist_songs.mp4``, with video viewer. | ||
|
||
4. Show how to get ``All I Need`` by ``Air`` | ||
|
||
.. code-block:: console | ||
plex_music_songs -a Air -s "All I Need" --musicbrainz | ||
Which can take a bit of time. | ||
|
||
.. _MusicBrainz: https://musicbrainz.org | ||
|
||
.. _`get_music_metadata`: https://github.com/tanimislam/plexstuff/blob/37cfb9f9e52864d8bdd6a2e154dc93b48ff2c908/plexstuff/plexmusic/plexmusic.py#L411 | ||
|
||
.. _`youtube_search`: https://github.com/tanimislam/plexstuff/blob/37cfb9f9e52864d8bdd6a2e154dc93b48ff2c908/plexstuff/plexmusic/plexmusic.py#L888 | ||
|
||
.. _`youtube-dl`: https://rg3.github.io/youtube-dl | ||
|
||
.. _`this website`: https://plexstuff.readthedocs.io/plex-music/cli_tools/plex_music_cli.html?highlight=plex_music_songs#plex-music-songs | ||
|
||
.. _`get_youtube_file`: https://github.com/tanimislam/plexstuff/blob/37cfb9f9e52864d8bdd6a2e154dc93b48ff2c908/plexstuff/plexmusic/plexmusic.py#L848 |
1 change: 1 addition & 0 deletions
1
...nipulation/demonstrations/making_music_youtube/plex_music_songs_download_artist_songs.mp4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../figures/plex_music_songs_download_artist_songs.mp4 |
1 change: 1 addition & 0 deletions
1
lectures/useful-multimedia-manipulation/demonstrations/movie_gif_demos/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.gif |
37 changes: 37 additions & 0 deletions
37
lectures/useful-multimedia-manipulation/demonstrations/movie_gif_demos/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
INSTRUCTIONS | ||
============= | ||
|
||
1. Go to these locations in `nprstuff.core.convert_image <convert_image_>`_. | ||
|
||
a. mp4togif: `nprstuff.core.convert_image.mp4togif <mp4togif_>`_ | ||
|
||
b. youtube2gif: `nprstuff.core.convert_image.youtube2gif <youtube2gif_>`_ | ||
|
||
2. Lower level FFMPEG_ command comes from `this website`_. | ||
|
||
3. MP4 to animated GIF: | ||
|
||
.. code-block:: console | ||
convertImage movie -f covid19_conus_cases_04072020.mp4 | ||
Creates animated GIF ``covid19_conus_cases_04072020.gif``, open in browser. | ||
|
||
4. YouTube Clip to GIF: | ||
|
||
.. code-block:: console | ||
convertImage youtube -u "https://www.youtube.com/watch?v=R-pmYwr8zbU" -o "lucas_bros.gif" -q high | ||
Creates animated GIF ``lucas_bros.gif``, open in browser. | ||
|
||
|
||
.. _`convert_image`: https://github.com/tanimislam/nprstuff/blob/master/nprstuff/core/convert_image.py | ||
|
||
.. _mp4togif: https://github.com/tanimislam/nprstuff/blob/807a3cba7e8bfd6ded70cdea3083cd9c9494e438/nprstuff/core/convert_image.py#L150 | ||
|
||
.. _youtube2gif: https://github.com/tanimislam/nprstuff/blob/807a3cba7e8bfd6ded70cdea3083cd9c9494e438/nprstuff/core/convert_image.py#L135 | ||
|
||
.. _`this website`: http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | ||
|
||
.. _FFMPEG: https://ffmpeg.org |
Binary file added
BIN
+1.77 MB
...l-multimedia-manipulation/demonstrations/movie_gif_demos/covid19_conus_cases_04072020.mp4
Binary file not shown.
1 change: 1 addition & 0 deletions
1
lectures/useful-multimedia-manipulation/demonstrations/movie_image_demos/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.mp4 |
26 changes: 26 additions & 0 deletions
26
...ures/useful-multimedia-manipulation/demonstrations/movie_image_demos/README.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
INSTRUCTIONS | ||
============= | ||
|
||
1. Go to this gist: `demo_create_movie_sequence.py`_. | ||
|
||
2. Instructions on the FFMPEG_ syntax to make an MP4 movie from a sequence of images come from `this website`_. | ||
|
||
3. MP4 movie of MCMC demo: | ||
|
||
.. code-block:: console | ||
python3.7 demo_create_movie_sequence.py --prefix=img --output="mcmc_images.mp4" --dirname="mcmc_animation_images" --fps=10 | ||
Open ``mcmc_images.mp4`` with a video viewer. This is 10 frames per second. | ||
|
||
4. MP4 movie of cumulative COVID-19 cases in continental United States: | ||
|
||
.. code-block:: console | ||
python3.7 demo_create_movie_sequence.py --prefix="covid19_conus_cases_04072020." --output="covid19_conus_cases_04072020.mp4" --dirname="covid19_conus_cases_04072020_imagefiles" --fps=5 | ||
Open ``covid19_conus_cases_04072020.mp4`` with a video viewer. This is 5 frames per second. | ||
|
||
.. _`demo_create_movie_sequence.py`: https://gist.github.com/tanimislam/406a1379e746c9882c101f656a6da949 | ||
.. _FFMPEG: https://ffmpeg.org | ||
.. _`this website`: https://hamelot.io/visualization/using-ffmpeg-to-convert-a-set-of-images-into-a-video/ |
Binary file added
BIN
+699 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+699 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+700 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+700 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.003.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+700 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.004.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+702 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.005.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+702 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.006.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+702 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.007.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+703 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.008.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+702 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.009.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+703 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.010.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+703 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.011.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.012.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.013.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+703 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.014.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.015.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.017.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.019.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.020.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+704 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.021.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.022.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.024.png
Oops, something went wrong.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.025.png
Oops, something went wrong.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.026.png
Oops, something went wrong.
Binary file added
BIN
+705 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.027.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.028.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.029.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.030.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.031.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.032.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.033.png
Oops, something went wrong.
Binary file added
BIN
+706 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.034.png
Oops, something went wrong.
Binary file added
BIN
+707 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.035.png
Oops, something went wrong.
Binary file added
BIN
+708 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.036.png
Oops, something went wrong.
Binary file added
BIN
+707 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.037.png
Oops, something went wrong.
Binary file added
BIN
+709 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.038.png
Oops, something went wrong.
Binary file added
BIN
+708 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.039.png
Oops, something went wrong.
Binary file added
BIN
+708 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.040.png
Oops, something went wrong.
Binary file added
BIN
+709 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.041.png
Oops, something went wrong.
Binary file added
BIN
+710 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.042.png
Oops, something went wrong.
Binary file added
BIN
+711 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.043.png
Oops, something went wrong.
Binary file added
BIN
+715 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.044.png
Oops, something went wrong.
Binary file added
BIN
+720 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.045.png
Oops, something went wrong.
Binary file added
BIN
+726 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.046.png
Oops, something went wrong.
Binary file added
BIN
+729 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.047.png
Oops, something went wrong.
Binary file added
BIN
+733 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.048.png
Oops, something went wrong.
Binary file added
BIN
+739 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.049.png
Oops, something went wrong.
Binary file added
BIN
+747 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.050.png
Oops, something went wrong.
Binary file added
BIN
+754 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.051.png
Oops, something went wrong.
Binary file added
BIN
+766 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.052.png
Oops, something went wrong.
Binary file added
BIN
+779 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.053.png
Oops, something went wrong.
Binary file added
BIN
+785 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.054.png
Oops, something went wrong.
Binary file added
BIN
+789 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.055.png
Oops, something went wrong.
Binary file added
BIN
+798 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.056.png
Oops, something went wrong.
Binary file added
BIN
+812 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.057.png
Oops, something went wrong.
Binary file added
BIN
+829 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.058.png
Oops, something went wrong.
Binary file added
BIN
+849 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.059.png
Oops, something went wrong.
Binary file added
BIN
+863 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.060.png
Oops, something went wrong.
Binary file added
BIN
+871 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.061.png
Oops, something went wrong.
Binary file added
BIN
+881 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.062.png
Oops, something went wrong.
Binary file added
BIN
+891 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.063.png
Oops, something went wrong.
Binary file added
BIN
+906 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.064.png
Oops, something went wrong.
Binary file added
BIN
+918 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.065.png
Oops, something went wrong.
Binary file added
BIN
+925 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.066.png
Oops, something went wrong.
Binary file added
BIN
+933 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.067.png
Oops, something went wrong.
Binary file added
BIN
+940 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.068.png
Oops, something went wrong.
Binary file added
BIN
+945 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.069.png
Oops, something went wrong.
Binary file added
BIN
+949 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.070.png
Oops, something went wrong.
Binary file added
BIN
+952 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.071.png
Oops, something went wrong.
Binary file added
BIN
+955 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.072.png
Oops, something went wrong.
Binary file added
BIN
+959 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.073.png
Oops, something went wrong.
Binary file added
BIN
+961 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.074.png
Oops, something went wrong.
Binary file added
BIN
+962 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.075.png
Oops, something went wrong.
Binary file added
BIN
+964 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.076.png
Oops, something went wrong.
Binary file added
BIN
+966 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.077.png
Oops, something went wrong.
Binary file added
BIN
+968 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.078.png
Oops, something went wrong.
Binary file added
BIN
+969 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.079.png
Oops, something went wrong.
Binary file added
BIN
+970 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.080.png
Oops, something went wrong.
Binary file added
BIN
+972 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.081.png
Oops, something went wrong.
Binary file added
BIN
+973 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.082.png
Oops, something went wrong.
Binary file added
BIN
+974 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.083.png
Oops, something went wrong.
Binary file added
BIN
+973 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.084.png
Oops, something went wrong.
Binary file added
BIN
+974 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.085.png
Oops, something went wrong.
Binary file added
BIN
+975 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.086.png
Oops, something went wrong.
Binary file added
BIN
+974 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.087.png
Oops, something went wrong.
Binary file added
BIN
+975 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.088.png
Oops, something went wrong.
Binary file added
BIN
+976 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.089.png
Oops, something went wrong.
Binary file added
BIN
+976 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.090.png
Oops, something went wrong.
Binary file added
BIN
+975 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.091.png
Oops, something went wrong.
Binary file added
BIN
+977 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.092.png
Oops, something went wrong.
Binary file added
BIN
+977 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.093.png
Oops, something went wrong.
Binary file added
BIN
+977 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.094.png
Oops, something went wrong.
Binary file added
BIN
+977 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.095.png
Oops, something went wrong.
Binary file added
BIN
+978 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.096.png
Oops, something went wrong.
Binary file added
BIN
+977 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.097.png
Oops, something went wrong.
Binary file added
BIN
+978 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.098.png
Oops, something went wrong.
Binary file added
BIN
+978 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.099.png
Oops, something went wrong.
Binary file added
BIN
+979 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.100.png
Oops, something went wrong.
Binary file added
BIN
+978 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.101.png
Oops, something went wrong.
Binary file added
BIN
+979 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.102.png
Oops, something went wrong.
Binary file added
BIN
+980 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.103.png
Oops, something went wrong.
Binary file added
BIN
+980 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.104.png
Oops, something went wrong.
Binary file added
BIN
+980 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.105.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.106.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.107.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.108.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.109.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.110.png
Oops, something went wrong.
Binary file added
BIN
+980 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.111.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.112.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.113.png
Oops, something went wrong.
Binary file added
BIN
+980 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.114.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.115.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.116.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.117.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.118.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.119.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.120.png
Oops, something went wrong.
Binary file added
BIN
+981 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.121.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.122.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.123.png
Oops, something went wrong.
Binary file added
BIN
+982 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.124.png
Oops, something went wrong.
Binary file added
BIN
+983 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.125.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.126.png
Oops, something went wrong.
Binary file added
BIN
+983 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.127.png
Oops, something went wrong.
Binary file added
BIN
+983 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.128.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.129.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.130.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.131.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.132.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.133.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.134.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.135.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.136.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.137.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.138.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.139.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.140.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.141.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.142.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.143.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.144.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.145.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.146.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.147.png
Oops, something went wrong.
Binary file added
BIN
+984 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.148.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.149.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.150.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.151.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.152.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.153.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.154.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.155.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.156.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.157.png
Oops, something went wrong.
Binary file added
BIN
+987 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.158.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.159.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.160.png
Oops, something went wrong.
Binary file added
BIN
+985 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.161.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.162.png
Oops, something went wrong.
Binary file added
BIN
+986 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.163.png
Oops, something went wrong.
Binary file added
BIN
+987 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.164.png
Oops, something went wrong.
Binary file added
BIN
+987 KB
...os/covid19_conus_cases_04072020_imagefiles/covid19_conus_cases_04072020.165.png
Oops, something went wrong.
89 changes: 89 additions & 0 deletions
89
...ul-multimedia-manipulation/demonstrations/movie_image_demos/demo_create_movie_sequence.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
#!/usr/bin/env python3 | ||
|
||
""" | ||
I developed this Python CLI script to demonstrate creating an MP4 movie from an image sequence. | ||
I follow instructions from https://hamelot.io/visualization/using-ffmpeg-to-convert-a-set-of-images-into-a-video. I make an MP4 movie that is 5 FPS with psychovisual quality of 25. | ||
""" | ||
import os, sys, numpy, subprocess, glob, re, logging, time | ||
from PIL import Image | ||
from distutils.spawn import find_executable | ||
from argparse import ArgumentParser | ||
|
||
def create_movie_from_sequence( prefix, output_file_name, dirname = os.getcwd( ), fps = 5 ): | ||
""" | ||
Creates an MP4 movie from a sequence of PNG images. The output file name must end in .mp4. | ||
:param str prefix: the beginnning base name of all the PNG images. If `foo` is the prefix, then will look for images that are like `foo0001.png`, `foo0002.png` and so forth. To make life simpler, the prefix *MUST* be alphanumeric. | ||
:param str output_file_name: the name of the output file. Must end in .mp4. | ||
:param str dirname: optional argument. The directory that contains the image sequence. Default is the current working directory. | ||
:param int fps: frames per second. Default is 5. | ||
:returns: `True` if successful, `False` otherwise. | ||
:rtype: bool | ||
""" | ||
time0 = time.time( ) | ||
assert( os.path.isdir( dirname ) ) # is a directory | ||
assert( os.path.basename( output_file_name ).endswith( '.mp4' ) ) # ends with mp4 | ||
assert( re.match( '^[a-zA-Z]+', prefix ) is not None ) # alphanumeric | ||
assert( find_executable( 'ffmpeg' ) is not None ) | ||
assert( fps >= 1 ) # fps must be positive | ||
ffmpeg_exec = find_executable( 'ffmpeg' ) | ||
# | ||
## now sequence of images | ||
sorted_filenames = sorted( | ||
filter(lambda fname: re.match('.*[0-9]+\.png', os.path.basename( fname ) ) is not None and | ||
os.path.basename( fname ).startswith( prefix ), | ||
glob.glob( os.path.join( dirname,'%s*.png' % prefix ) ) ) ) | ||
if len( sorted_filenames ) == 0: | ||
print( 'ERROR, COULD FIND NO IMAGE SEQUENCE.' ) | ||
return False | ||
def is_divis_2( fname ): | ||
img = Image.open( fname ) | ||
if img.size[0] % 2 != 0: return False | ||
if img.size[1] % 2 != 0: return False | ||
return True | ||
try: | ||
assert(all(filter(is_divis_2, sorted_filenames))) # all widths and heights div by 2 | ||
except: | ||
print( "ERROR, NOT ALL IMAGES HAVE WIDTHS + HEIGHTS DIVISIBLE BY 2.") | ||
return False | ||
|
||
# | ||
## | ||
num_base_10 = 1 + int( numpy.log10(len(sorted_filenames))) | ||
sequence_ffmpeg = '%%%02dd' % num_base_10 # this is tricky! | ||
input_ffmpeg_image_string = '%s%s.png' % ( os.path.join( dirname, prefix ), sequence_ffmpeg ) | ||
logging.info( 'got here, %s.' % input_ffmpeg_image_string ) | ||
# | ||
## now run the ffmpeg command | ||
command_to_process = [ | ||
ffmpeg_exec, '-y', '-r', '%d' % fps, '-f', 'image2', '-i', input_ffmpeg_image_string, | ||
'-vcodec', 'libx264', '-crf', '25', '-pix_fmt', 'yuv420p', | ||
output_file_name ] | ||
logging.info( 'COMMAND TO RUN: %s.' % ' '.join( command_to_process ) ) | ||
proc = subprocess.Popen( command_to_process, stdout = subprocess.PIPE, | ||
stderr = subprocess.STDOUT ) | ||
stdout_val, stderr_val = proc.communicate( ) | ||
logging.info( 'STDOUT_MESSAGE.' ) | ||
logging.info( '%s\n' % stdout_val ) | ||
logging.info( 'TOOK %0.3f SECONDS TO RUN TO COMPLETION.' % ( | ||
time.time( ) - time0 ) ) | ||
|
||
if __name__=='__main__': | ||
parser = ArgumentParser( ) | ||
parser.add_argument( '--prefix', dest='prefix', type=str, required = True, | ||
help = 'The prefix to the sequence of PNG images.' ) | ||
parser.add_argument( '--output', dest='output', type=str, required = True, | ||
help = 'The name of the MP4 output file.' ) | ||
parser.add_argument( '--dirname', dest='dirname', type=str, default = os.getcwd( ), | ||
help = 'The directory containing the image sequence. Default is CWD.') | ||
parser.add_argument( '--fps', dest='fps', type=int, default = 5, | ||
help = 'Frames per second of movie. Default is 5.' ) | ||
parser.add_argument( '--info', dest='do_info', action='store_true', default = False, | ||
help = 'If chosen, then print out INFO debug logging.' ) | ||
args = parser.parse_args( ) | ||
logger = logging.getLogger( ) | ||
# | ||
if args.do_info: logger.setLevel( logging.INFO ) | ||
status = create_movie_from_sequence( | ||
args.prefix, args.output, dirname = args.dirname, fps = args.fps ) | ||
|
Binary file added
BIN
+3.59 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img001.png
Oops, something went wrong.
Binary file added
BIN
+5.61 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img002.png
Oops, something went wrong.
Binary file added
BIN
+7.97 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img003.png
Oops, something went wrong.
Binary file added
BIN
+10.8 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img004.png
Oops, something went wrong.
Binary file added
BIN
+14.3 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img005.png
Oops, something went wrong.
Binary file added
BIN
+18 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img006.png
Oops, something went wrong.
Binary file added
BIN
+21.9 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img007.png
Oops, something went wrong.
Binary file added
BIN
+26.3 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img008.png
Oops, something went wrong.
Binary file added
BIN
+31 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img009.png
Oops, something went wrong.
Binary file added
BIN
+35.7 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img010.png
Oops, something went wrong.
Binary file added
BIN
+40.5 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img011.png
Oops, something went wrong.
Binary file added
BIN
+46 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img012.png
Oops, something went wrong.
Binary file added
BIN
+51.5 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img013.png
Oops, something went wrong.
Binary file added
BIN
+57.3 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img014.png
Oops, something went wrong.
Binary file added
BIN
+63.6 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img015.png
Oops, something went wrong.
Binary file added
BIN
+69.8 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img016.png
Oops, something went wrong.
Binary file added
BIN
+76.1 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img017.png
Oops, something went wrong.
Binary file added
BIN
+82.8 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img018.png
Oops, something went wrong.
Binary file added
BIN
+89.4 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img019.png
Oops, something went wrong.
Binary file added
BIN
+96 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img020.png
Oops, something went wrong.
Binary file added
BIN
+103 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img021.png
Oops, something went wrong.
Binary file added
BIN
+109 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img022.png
Oops, something went wrong.
Binary file added
BIN
+116 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img023.png
Oops, something went wrong.
Binary file added
BIN
+122 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img024.png
Oops, something went wrong.
Binary file added
BIN
+128 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img025.png
Oops, something went wrong.
Binary file added
BIN
+134 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img026.png
Oops, something went wrong.
Binary file added
BIN
+139 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img027.png
Oops, something went wrong.
Binary file added
BIN
+145 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img028.png
Oops, something went wrong.
Binary file added
BIN
+150 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img029.png
Oops, something went wrong.
Binary file added
BIN
+155 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img030.png
Oops, something went wrong.
Binary file added
BIN
+160 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img031.png
Oops, something went wrong.
Binary file added
BIN
+165 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img032.png
Oops, something went wrong.
Binary file added
BIN
+170 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img033.png
Oops, something went wrong.
Binary file added
BIN
+174 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img034.png
Oops, something went wrong.
Binary file added
BIN
+178 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img035.png
Oops, something went wrong.
Binary file added
BIN
+182 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img036.png
Oops, something went wrong.
Binary file added
BIN
+186 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img037.png
Oops, something went wrong.
Binary file added
BIN
+189 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img038.png
Oops, something went wrong.
Binary file added
BIN
+193 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img039.png
Oops, something went wrong.
Binary file added
BIN
+197 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img040.png
Oops, something went wrong.
Binary file added
BIN
+200 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img041.png
Oops, something went wrong.
Binary file added
BIN
+204 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img042.png
Oops, something went wrong.
Binary file added
BIN
+207 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img043.png
Oops, something went wrong.
Binary file added
BIN
+210 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img044.png
Oops, something went wrong.
Binary file added
BIN
+213 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img045.png
Oops, something went wrong.
Binary file added
BIN
+216 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img046.png
Oops, something went wrong.
Binary file added
BIN
+218 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img047.png
Oops, something went wrong.
Binary file added
BIN
+222 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img048.png
Oops, something went wrong.
Binary file added
BIN
+224 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img049.png
Oops, something went wrong.
Binary file added
BIN
+227 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img050.png
Oops, something went wrong.
Binary file added
BIN
+229 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img051.png
Oops, something went wrong.
Binary file added
BIN
+232 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img052.png
Oops, something went wrong.
Binary file added
BIN
+234 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img053.png
Oops, something went wrong.
Binary file added
BIN
+236 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img054.png
Oops, something went wrong.
Binary file added
BIN
+239 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img055.png
Oops, something went wrong.
Binary file added
BIN
+241 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img056.png
Oops, something went wrong.
Binary file added
BIN
+244 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img057.png
Oops, something went wrong.
Binary file added
BIN
+246 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img058.png
Oops, something went wrong.
Binary file added
BIN
+248 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img059.png
Oops, something went wrong.
Binary file added
BIN
+250 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img060.png
Oops, something went wrong.
Binary file added
BIN
+252 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img061.png
Oops, something went wrong.
Binary file added
BIN
+254 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img062.png
Oops, something went wrong.
Binary file added
BIN
+257 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img063.png
Oops, something went wrong.
Binary file added
BIN
+258 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img064.png
Oops, something went wrong.
Binary file added
BIN
+260 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img065.png
Oops, something went wrong.
Binary file added
BIN
+262 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img066.png
Oops, something went wrong.
Binary file added
BIN
+264 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img067.png
Oops, something went wrong.
Binary file added
BIN
+266 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img068.png
Oops, something went wrong.
Binary file added
BIN
+268 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img069.png
Oops, something went wrong.
Binary file added
BIN
+269 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img070.png
Oops, something went wrong.
Binary file added
BIN
+271 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img071.png
Oops, something went wrong.
Binary file added
BIN
+273 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img072.png
Oops, something went wrong.
Binary file added
BIN
+274 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img073.png
Oops, something went wrong.
Binary file added
BIN
+276 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img074.png
Oops, something went wrong.
Binary file added
BIN
+278 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img075.png
Oops, something went wrong.
Binary file added
BIN
+279 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img076.png
Oops, something went wrong.
Binary file added
BIN
+281 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img077.png
Oops, something went wrong.
Binary file added
BIN
+282 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img078.png
Oops, something went wrong.
Binary file added
BIN
+284 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img079.png
Oops, something went wrong.
Binary file added
BIN
+286 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img080.png
Oops, something went wrong.
Binary file added
BIN
+287 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img081.png
Oops, something went wrong.
Binary file added
BIN
+289 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img082.png
Oops, something went wrong.
Binary file added
BIN
+290 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img083.png
Oops, something went wrong.
Binary file added
BIN
+291 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img084.png
Oops, something went wrong.
Binary file added
BIN
+293 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img085.png
Oops, something went wrong.
Binary file added
BIN
+294 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img086.png
Oops, something went wrong.
Binary file added
BIN
+295 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img087.png
Oops, something went wrong.
Binary file added
BIN
+297 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img088.png
Oops, something went wrong.
Binary file added
BIN
+299 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img089.png
Oops, something went wrong.
Binary file added
BIN
+300 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img090.png
Oops, something went wrong.
Binary file added
BIN
+301 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img091.png
Oops, something went wrong.
Binary file added
BIN
+302 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img092.png
Oops, something went wrong.
Binary file added
BIN
+304 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img093.png
Oops, something went wrong.
Binary file added
BIN
+305 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img094.png
Oops, something went wrong.
Binary file added
BIN
+306 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img095.png
Oops, something went wrong.
Binary file added
BIN
+308 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img096.png
Oops, something went wrong.
Binary file added
BIN
+309 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img097.png
Oops, something went wrong.
Binary file added
BIN
+310 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img098.png
Oops, something went wrong.
Binary file added
BIN
+311 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img099.png
Oops, something went wrong.
Binary file added
BIN
+312 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img100.png
Oops, something went wrong.
Binary file added
BIN
+313 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img101.png
Oops, something went wrong.
Binary file added
BIN
+315 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img102.png
Oops, something went wrong.
Binary file added
BIN
+316 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img103.png
Oops, something went wrong.
Binary file added
BIN
+317 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img104.png
Oops, something went wrong.
Binary file added
BIN
+318 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img105.png
Oops, something went wrong.
Binary file added
BIN
+319 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img106.png
Oops, something went wrong.
Binary file added
BIN
+320 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img107.png
Oops, something went wrong.
Binary file added
BIN
+321 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img108.png
Oops, something went wrong.
Binary file added
BIN
+322 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img109.png
Oops, something went wrong.
Binary file added
BIN
+323 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img110.png
Oops, something went wrong.
Binary file added
BIN
+324 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img111.png
Oops, something went wrong.
Binary file added
BIN
+325 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img112.png
Oops, something went wrong.
Binary file added
BIN
+326 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img113.png
Oops, something went wrong.
Binary file added
BIN
+326 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img114.png
Oops, something went wrong.
Binary file added
BIN
+327 KB
...-manipulation/demonstrations/movie_image_demos/mcmc_animation_images/img115.png
Oops, something went wrong.
Oops, something went wrong.