Follow

Using EnVe to Create a Single Movie from Multiple Existing Movies that Play Simultaneously

I know, that's a pretty long and confusing title. However, it does accurately describe the process that will be discussed in this article. There are not many (free) utilities on the internet  that can be used to merge multiple movie files into a single one and have the movies play simultaneously side by side. This can be quite useful to show the results of different load cases on a model for instance or to display several eigenfrequencies for a model at the same time side by side. CEI's EnVe is such a free tool and it is automatically installed with every EnSight installation. It is also free to download from CEI's website.


Here are some things to consider before starting this process:

  • In this document 4 existing movies will be merged into a single one which means that the final movie will be a 2x2 movie (2 rows and 2 columns; please see figure 1). The 4 existing movies will play simultaneously as opposed to one after the other.
  • The individual movies must have the same number of frames so the length of each movie has to be the same. This is critical; even if there’s 1 frame out of place, the process will not work.
  • The individual movies can have the same pixel resolution so the size (height & width in pixels) of each movie can be identical but it does not need to be. If you want to have 4 movies with the same size, make them all the same resolution.
  • CEI's EnVe is the tool that will do all the work and EnVideo will play the finished movie (of course this can also be any other media player).
  • One of the features of EnVe is that it can create a so called .mtm movie, which is a multi-tile movie that is meant for powerwall environments (these are multiple screens connected to a computer where each monitor only shows a portion of the total movie; please see figure 2 of a powerwall with 12 monitors). This feature of EnVe will be used and by manually editing the .mtm file, a single movie can be created that will show multiple movies all playing at the same time
  • All the files that are being used in the following example can be downloaded from CEI's ftp server at this link. The movies are all in a low resolution to keep the file sizes small. 
Fig.1: Movies in a 2X2 pattern

Here are the steps that are needed:

1. Start by creating the individual     movies, in this example four movies. As already mentioned,
make sure all of the movies have the same number of frames and if you want them to be all the
same size, make them all the same resolution. For this example we use NTSC output which
is 704x480 pixels. They don’t need to be all the same file type; for instance you can mix 2 AVI’s, 1 MOV and 1 MP4 movie into a single new movie. Please look at the supported movie formats in EnVe and please note that EnVe does not support Windows WMV file format. In our experience MPG-1 and MPG-2 files do not work as well as AVI, MOV or MP4 because they seem to have some issues in the first few frames when the movie is repeated.

2. Start EnVe and load the 4 individual movies by either dragging and dropping them into EnVe or by selecting File -> Add Movie. In the picture below you can see the 4 file names of the individual movies that I’ve loaded in the top left corner (the red rectangle) under ‘Input Movies’. Did you notice the mix of file types? Please also note you can see the number of frames for each movie and the resolution listed under the movie (see the red oval).

Fig. 2: Enve edit window

3. Click on the ‘Set Params’ button and see the menu that is displayed (see the image below). Set the ‘Output Image Tiling’ to X=2 and Y=2 since we want to make a 2x2 movie. Since each of the 4 movies in this example have a resolution of 704x480, the total ‘Output Image Dimensions’ have to be double this; so 1408x960 pixels. Again, see the image below. Since we are using the tile option, the movie that will be generated is an .mtm file.

 

Fig. 3: Movie parameters

4. Click on ‘Set File’ and select a directory and a file name; in this example I’ll use the file name ‘Multi-Tile Movie 2x2’. Then click on ‘Generate Output Movie’. EnVe will generate 5 files: the first one is called ‘Multi-Tile Movie 2x2.mtm’ and it will also create 4 AVI files named ‘Multi-Tile Movie 2x2_0000.avi’ through ‘Multi-Tile Movie 2x2_0003.avi’. The mtm movie can directly be played in EnVideo. When you do this you’ll see all 4 movies being played after each other, not simultaneously. Of course this is what an mtm file is made for; just look at one of the AVI movies, for instance ‘Multi-Tile Movie 2x2_0000.avi’ and you’ll only see the lower left quarter of the total movie that can be displayed on a multi-tile display. So the question is how to get those 4 movies to play simultaneously? Keep on reading.

5. The four AVI movies that were just created ('Multi-Tile Movie 2X2_0000.avi" through "Multi-Tile Movie 2X2_0003.avi') can be deleted as we don't need them. The file we need is 'Multi Tile Movie 2X2.mtm'. This is just a short ascii file that needs to be edited. Open the file in an editor (for istance WordPad), and see what it looks like:

MTM 1.0 

# This is a Multi-Tile Movie file. 


fullresolution 1408 960 

nummovies 4 

movie 
imageoffset 0 0 
format AVI 
file "Multi-Tile Movie 2X2_0000.avi" 

movie 
imageoffset 0 479 
format AVI 
file "Multi-Tile Movie 2X2_0001.avi" 

movie 
imageoffset 703 0 
format AVI 
file "Multi-Tile Movie 2X2_0002.avi" 

movie 
imageoffset 703 479 
format AVI 
file "Multi-Tile Movie 2X2_0003.avi"

This file is pretty easy to understand. It just lists the number of movies in the mtm file (4 in this case; see the line nummovies 4 in the file above) and it lists the 4 tiles of the complete movie. Here’s where some manual editing to the mtm file is done. Change the 4 file names in the mtm file to the 4 movie file names of the individual movies that were created. Here is what the edited .mtm file looks like (see the modified file names below in red):


MTM 1.0
#
# This is a Multi-Tile Movie file.
#

fullresolution 1408 960

nummovies 4

movie
imageoffset 0 0
format AVI
file "Shuttle with Moving Clip Plane.mov"

movie
imageoffset 0 479
format AVI
file "Shuttle Colored by Energy.avi"

movie
imageoffset 703 0
format AVI
file "Shuttle with Streamlines.mp4"

movie
imageoffset 703 479
format AVI
file "Shuttle with Contours of Energy.avi"

6. For the mtm movie, the resolution is defined by the keyword fullresolution followed by 2 numbers. For the example mtm file listed above, the resolution is set to twice the width and height of an individual movie segment so 4 movies will fit in the mtm file (that explains the values of 1408 and 960). However, a larger or smaller resolution can be specified as well.

7. For each movie there's an imageoffset specified followed by 2 numbers (see the line below). These 2 numbers indicate where the movie will be positioned in the final movie.

movie
imageoffset 0 0
format AVI
file "Shuttle with Moving Clip Plane.mov"

The numbers 0 0 indicate that the origin of the movie segment (which is the lower left corner of the movie - the white + sign) will be positioned at the 0 0 point of the mtm movie - the red + sign. Confused? Please see figure 4 that will hopefully make it clear. For instance, to position this movie in the top right of the final movie, the imageoffset value would be set to 703 479. These values are the number of pixels counted from the 0 0 point of the mtm movie. Remember that the resolution of the mtm file is 1408 by 960, so starting at 0 0, 703 and 479 is exactly halfway the width and the height of the mtm movie. 

 

Fig. 4: offset of the four movies.

8. Now save the mtm file. Play the mtm file in EnVideo and you’ll see it plays all 4 movies simultaneously. But wait - there’s another trick that can be done. Go to EnVe and remove any movie files that are still listed in the ‘Input Movies’ field. Drag the ‘Multi-Tile Movie 2x2.mtm’ into EnVe. Click the ‘Set Params’ button again and set the ‘Output Image Tiling’ back to X=1 and Y=1. Set the ‘Output Image Dimensions’ back to for instance NTSC (704x480 pixels). Please see figure 5. Then select a file name and generate the new AVI movie. The AVI movie now plays all 4 movies simultaneously! This movie can be played with Windows Media Player or any other media player (see the image below on the right where it's playing using VLC).

Fig. 5: Output options. 

 

Note: 

A movie within a movie, such as the picture-in-picture effect, can also be generated using these techniques. Here's an example of an mtm file that creates such a movie:

MTM 1.0
#
# This is a Multi-Tile Movie file.
#

fullresolution 704 480

nummovies 2

movie
imageoffset 0 0
format AVI
file "Shuttle Colored by Energy.avi"

movie
imageoffset 350 215
format AVI
file "Shuttle with Moving Clip Plane - Small.avi"

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments