Converting AVI files to EC files



Description

This page gives you info on how to convert a video file to a BIN file that can be played back by the Effects Controller. It consists of a number of steps and programs. The examples are for Windows but you might be able to follow these steps for other systems. A conversion program is available compiled for Windows along with C source code you can use or modify for other applications.

The first step of the process is to use software (like VirtualDub) to resize an AVI file to match your output light array size, and then convert the video into a series of BMP files, one per frame. This will create lots of small files! The second step is to use our BMP2SD program to convert the sequence of BMP files into a BIN file that can be used on the Effects Controllers. It is also possible you could extract the audio track from your AVI file and use that in our MP3 player.

First, we assume you have an array of strings with the same number of lights on each one. For example, lets say 100 strings with 50 lights on each. Our example and software also assume the strings are oriented vertically and wired to the controller (DDBs) at the bottom, as you might wire up a simple pole-tree or flat display. So our sample display is 100 pixels wide and 50 pixels high.

Converting AVI files to BMP files

We need to take our source video file and scale it to match the lighting display size. For this, we use a program called VirtualDub, available here.. You might be able to use other software you are familiar with.
Start up VirtualDub.

Drag and drop your video file onto VirtualDub to open it up.
It will display the first frame of the video.  You can use the slider to see more.

The left window is the input video, the right window is the output preview.

Pick the menu item "Video", then "Filters".

Pick "Add..."

Select the "resize" filter and click "OK".

For Aspect ratio, pick "Disabled".

For New Size, pick "absolute (pixels)", and then enter 100 x 50 (or whatever your light array is).

Click OK.

You can also now pick "Cropping..." from the Filters page and crop the left/right and top/bottom of your video.

Click "OK" to exit the Filters menu.

You will now see a preview of the new output size to the right of the screen.
Right click on the output video, pick Aspect Ratio "1:1" and Preferred Filter "point".
You can now drag the bottom right corner of the window to make it larger,
and see what each output pixel will look like.

Now pick menu "File", "Export", "Image Sequence..."

Leave filename blank, pick ".bmp" for filename suffix, minimum digits 4.
Create or Select a new empty directory to put the files in.
Pick Output Format: WINDOWS BMP.   Click "OK".

You will now have a directory full of BMP files numbered like this: 0000.bmp, 0001.bmp, etc.

Converting BMP files to SD files

Now, download BMP2SD. You can get the EXE and DLL file for Windows (and place them in a new work directory, say "C:\BMP". Or you can download the bmp2sd.c source code and compile this yourself if you are a developer.

Bring up a Windows command prompt.  "CD C:\BMP".

Let's say all your BMP files from VirtualDub are in C:\VID.

Run BMP2SD, giving it the name of the BMP files directory,
the output frame rate of your video, and the number of lights strings
attached to each EC (if you have more than one EC you are generating BIN files for).

Let's say our video is 30fps (frames per second).
Our array is 100 strings, so let's say we have 4 ECs and have 25 strings on each EC.
We would say:

cmd>   bmp2sd.exe c:\bmp 30 25

bmp2sd will read in all the NNNN.bmp files and create an output file for each EC, naming them:
1-0.bin
1-1.bin
1-2.bin
1-3.bin

Each file can then be placed onto an SD card and in to the appropriate EC.  (1-0 to EC 0, 1-1 to EC1, 1-2 to EC2, 1-3 to EC 3).

BACK TO TOP