This python script converts image folders to .mp4 videos.
Thanks to great compressibility options your data can be stored in a more compressed way! ![]()
-
- ffmpeg encoder to create videos which means high efficiency.
-
- MPI library to parallelise a task for multiple folders.
- Install Miniconda
bash ./Miniconda3-py38_23.5.0-3-Linux-x86_64.sh
conda activate
- Install MPI4py
pip install mpi4py
- Install ffmpeg
conda deactivate
sudo apt install ffmpeg
- Install Miniconda
- Start Anaconda Prompt (miniconda3) as administrator
- Install MPI4py
conda install mpi4py
- Install ffmpeg
conda install ffmpeg
To start a script, run from preferred command line, see next example:
python /mnt/path_to_script/PNG2MP4_ffmpeg/MPIvideomakr.py 6 /mnt/path_to_target/pics/ /mnt/path_to_save/vids/
Where 6 in this example shows amount of cores that will be used by script.
Start a script with
python /mnt/path_to_script/PNG2MP4_ffmpeg/MPIvideomakr.py 6
(To minimise typing type "python ", copy and paste path to MPIvideomakr.py and type amount of cores(6 in the example above) )
Then an interactive window will suggest to choose a folder with tests with images.
Second interactive window will ask for a folder where to save videos.
Note
To avoid renaming if your tests are already have proper name format (like Picture_name_1.png with underscore and number in order), please comment lines 77-87 of makevids.py