The PNGAVI Mixer allows you to combine an AVI file with a transparent PNG picture. The mixing functions and stream reading is much faster than the old AVI Mixer and this version supports copying of the audio stream.


This program was developed from March 2006. Initially it was thought that I could extend the old AVI Mixer but it was largely rewritten. To read PNG images I thought of using libpng and zlib but I did not have enough time to fully examine these libraries.

Microsoft Visual Studio 2003 provides us with the CImage class which is an easy way to load and use PNG images. The application is now built with VS2003.


In this example a 13 second 320*240 uncompressed AVI BBC2 ident was mixed with a transparent png logo.

File menu options

PNGAVI Mixer file menu options:

Open main AVI - displays a file selector to load the AVI,
Open top PNG - displays a file selector to load the top layer PNG,
Mix - displays the output file selector and AVI compression codec dialog then starts mixing,
Stop - stops mixing.
When Stop selected the output AVI is closed and should be able to be viewed upto the last frame that was being processed,
Exit - exits the program.

If AVI Mixer is closed during mixing it will ask the user if they really want to exit. The output AVI will be closed cleanly to include the last frame being processed.

Normal use

When mixing is in progress each frame is made from the input frame and combined with the PNG and then output to a valid AVI.
Please ensure there is plenty hard disk space for the output file!

Version history

Version 2.0 intermediate builds:

0.10 - OnClose check added, icon updated,
0.9 - Stop function corrected for audio,
0.8 - Optimised memory use in audio stream copying added,
0.7 - First version with audio, deleteobject(ev)->closehandle(ev) bug fix,
0.6 - Frame buffer memory use optimised,
0.5 - atlmincrt added for release builds,
0.4 - Code review - code no longer required removed,
0.3 - AVIMixer code added, CImage use added,
0.2 - Menus, options, controls added,
0.1 - New Visual Studio 2003 project created.

Version 1 was trying to build this functionality into the old AVIMixer, which didn't really work well.
A new project from the ground up with VS2003 was easier.

Known limitations

1. AVIs saved with Sound Forge may show wrong colours.
Resolution: Save using VirtualDub before loading into PNGAVIMixer.

These are enhancements that we will add when we have the time. We have additional features planned!


Michael Lynn. Analysis, design, C++ implementation and optimisation.
Mark McMillan for design, suggestions, testing and patience.
Avery Lee for the Open Source VirtualDub. That helped with some AVI issues.

If any commercial companies are interested in this project then please contact me via the email address on the download page.


The program is available for download from the download page.

Back to index.