When modeling a physical phenomenon, the most informative way of visualization is video.

In this article, we will describe how to turn a sequence of images into a video clip.

Creating a sequence of images

FlowVision allows users to create a sequence of images where each of them matches to specific point in time. Here is a short instruction how to do it:

1

2

3

After end of the playback you will have a sequence of images and then you need to create a video using them.

FFmpeg

You can use a popular software – FFmpeg, which allows to work on pictures and video including creating a video using images.

Main advantages of FFmpeg:

To start work with FFmpeg you need to:

This article describes how to create such a script.

Creating a script

To prepare a script you need to create a text file consisting of sequential commands. To make this file executable rename it by changing the extension from .txt to .bat. You can also use program BatToExe to reformat script into executable format .exe.

Text of script

Full text of script:

@ECHO OFF
SET /P FolderPic="Path to folder with pictures:"
if ["%FolderPic%"]==[""] SET /P FolderPic="Path to folder with pictures (can't be empty):"
if ["%FolderPic%"]==[""] SET /P FolderPic="Path to folder with pictures (CAN'T BE EMPTY):"
if ["%FolderPic%"]==[""] exit
SET /P PictureName="Picture's name:"
if ["%PictureName%"]==[""] SET /P PictureName="Picture's name (can't be empty):"
if ["%PictureName%"]==[""] SET /P PictureName="Picture's name (CAN'T BE EMPTY):"
if ["%PictureName%"]==[""] exit
SET /P PictureExt=Picture's extension [default = .png]: %PictureName%_00000.
if [%pictureExt%]==[] set pictureExt=png
SET /P FolderVid="Path to folder with video [default = folder with pictures]:"
if ["%FolderVid%"]==[""] set FolderVid=%FolderPic%
SET /P VideoName="Video's name [default = video_%PictureName%]:"
if ["%VideoName%"]==[""] SET VideoName=video_%PictureName%
SET /P VideoExt=Video's extension [default - .avi]: %VideoName%.
if [%VideoExt%]==[] set VideoExt=avi
SET /P Rate=Frame rate of video (fps) [default = 60]:
if [%Rate%]==[] set Rate=60
cd %FolderPic%
ffmpeg -r %Rate% -y -i "%PictureName%_%%05d.%PictureExt%" -c:v libx264 -vf "fps=60,format=yuv420p" -q:v 1 "%VideoName%".%VideoExt%
move "%FolderPic%\%VideoName%.%VideoExt%" "%FolderVid%"
timeout 3

Script launch

Run the executable file. After starting a command window will appear in which you will need to enter sequentially:


If there are no errors in the process the console window will close automatically and after execution the video will be pasted from the specified images in the specified folder.

FFmpeg supports a huge number of formats. To get a list of all using formats open the command line and enter: ffmpeg -formats