StudioX64 main logo Multimedia Music & Video Production
Video Game Software
Retro Computer Software
Main Menu
Latest News
Profile
History

Our Music
    -Chemical Rock
Our Games
    -X-Scape (PC)
    -FlipitZ
    -MorphitZ
Our Software
    -C64 Ripper
    -BlitzAvi.DLL
Our Photographs
    -Back In Time 2003
    -Back In Time Live
    -Retro C64 Feature

Hot Stuff
Our Favourite Sites
Link To Us
Contact Us
Chemical Rock
The Definitive Sid-8580 collection,
by Paul Kubiszyn.


Purchase ON-LINE NOW!
NEW UK payment methods


I accept payment through PayPal!, the #1 online payment service!
Paypal and NoChex now in UK £
Download the 30 day trial of Xara X now!
http://www.c64.sk/
www.c64.sk for all the
latest scene news
Advertisement
XScape - An iPhone / iPad / Apple TV game remake of the Commodore 64 classic Square Scape 2
XScape - An iPhone / iPad / Apple TV game remake of the Commodore 64 classic Square Scape 2

BlitzAvi.DLL (StudioX64 Blitz Basic DLL for recording AVI files - Latest release: v1.01)

DOWNLOAD LATEST VERSION (1.1) -> [BlitzAvi.zip] (34K) - Updated 17th Jan 2003
If you require a license, then please click on the logos to the left.


This page details how to use our BlitzAvi.DLL and additional helper library for Blitz Basic. If you have no idea what Blitz Basic is, then please visit the following website first: http://www.blitzbasic.com.

BlitzAvi.DLL as you probably guessed is a DLL extension for creating AVI / DIVX movie files, directly from Blitz Basic applications.
It works by creating a file then rendering individual bitmap images one at a time, together to make a complete movie. Depending on what codecs there are installed on your computer, you can also choose different methods of compression.

There are 2 parts to BlitzAvi.DLL. The first is the DLL itself which you must include with your distributed application. The second is the helper function library, in the form of a Blitz Basic Include file. You must 'Include' the helper function library in any applications you intend to use the DLL from. You do not need to know how or why the helper library works, just the names of the functions to call, and parameters they accept.


How To Use BlitzAvi.DLL

In the download package I have included a small demo program taken from the Blitz Basic forums on http://www.blitzbasic.com. The credits for which are as follows. I did not write this application, I only modified it slightly, so I can not take any credit for it's contents.

; This is the Original Source for many of my Plasma-FX.
; Original QB-Plasma, ported to BB . By CSP 2001.

The original plasma demo was posted by -NORC- and can be found here: http://www.blitzbasic.com/codearcs/codearcs.php?code=253. The demo included in the download package is a modified version to demonstrate in a very simple manner the 3 commands which are available when using the DLL. These are as follows:

ReturnValue = CreateAviFile(MyAppTitle$, "example.avi", 30, "output.bmp", True, False)
ReturnValue = WriteImageToAviFile()
ReturnValue = CloseAviFile()

As you can see the actual calls are not to the DLL file itself but to the included helper function library. Due to the fact Blitz has to pass a number of parameters in a very odd way to DLL's, instead of calling the DLL directly, you call it through a set of pre-coded helper functions.

Each of the functions return a value "ReturnValue", and this is either 0=Bad, or 1=Good. When I said it was simple to use, I really did mean it. Here is a short program to demonstrate:

Please note this short demo is not intended to actually run!


Graphics 320,240,16,2
Include "BlitzAvi.inc" ;include the BlitzAvi helper function library.

MyAppTitle$ = "Blitz Plasma App"
AppTitle MyAppTitle$

ReturnValue = CreateAviFile(MyAppTitle$, "example.avi", 30, "output.bmp", True, False)

;MainLoop

;Do some graphics drawing here

Flip

SaveBuffer(BackBuffer(),"output.bmp")
ReturnValue = WriteImageToAviFile()

;Goto MainLoop

ReturnValue = CloseAviFile()

;End application



See I told you it was simple. The way it works is that first you must include the helper function library, then set your application title via a string variable. You then set the AppTitle to your string variable. This may look stupid but it gives us the ability to pass the AppTitle to the DLL to identify your applications window handle (to pass messages to your Blitz program).

The first call to the DLL is to create an avi file and open it. The CreateAviFile takes the following parameters:

CreateAviFile(Application Title, AVI File Name, Time of Each Frame,
Image File name to Render, Compression Flag, Suppress Messages Flag)


The Application Title is pretty straight forward and should be what ever your AppTitle is set to. Your application MUST have a title for the DLL to correctly function.

The AVI File Name is the name of the output AVI file which you are creating. This can include a full path name.

The Time of Each Frame parameter refers to how long (in millisecs) an image is displayed for before moving onto the next one. Set it to 33 for TV type 30 frames per second, set it to 1000 for 1 frame per second.

The Image File Name to Render is the name of the bitmap which you will save to the hard drive prior to calling WriteImageToAviFile(). This file name refers to the name of the image in the call to SaveBuffer.

The Compression Flag determines whether or not you want to compress the AVI file. If this flag is set to false then it's possible to use the DLL in both windowed mode and full screen mode. If it's set to True then you MUST run in a windowed mode. The compression dialog box will appear only during your first call to WriteImageToAviFile().

The Suppress Messages Flag will stop the warning from appearing about overwriting files when an AVI file already exists on the hard drive. This allows you to run in full screen mode providing you are not using compression.

After creating the AVI file you now need to render some images to it, otherwise it's going to look pretty bland! - To do this you must add a line of code which after each FLIP of the screen saves the current buffer to your hard disk drive, using the same file name as the one you called CreateAviFile parameter 4 with (Image File Name to Render).

After saving the buffer you can now safely call WriteImageToAviFile(). This function take no parameters and simply takes the image from your hard drive and renders it to the AVI file.

Basically you then keep repeating your standard loop, each time updating the screen, saving the buffer and writing the image to the avi file. When you are done, you MUST end with a call to CloseAviFile(). Failure to call this function will result in an unusable AVI file!


In Closing

So there you have it. A short and simple, yet very useful application if you need to do this sort of thing. You could use it to create running demos of your games to put on your websites, you can use it like me to make effects for home movies. Let your imagination run wild!

The project is on my current development list, and is therefore ripe for updates every now and then. I welcome any suggestions, and bug reports. Though I do request you post them on our Forum:

Ideas & Suggestions
http://www.studiox64.com/forum/viewboard.php?BoardID=30

Bug Reports
http://www.studiox64.com/forum/viewboard.php?BoardID=31


Hope you enjoy the DLL and be sure to read the License agreement.





Download:

-> BlitzAvi.ZIP
Before downloading we would be very grateful if you would click on the advertising banner at the top of this page, it will open in a new window. Thank you.


Technical Specs Minimum:

The minimum specs required by the BlitzAvi.DLL relate to the minimum specs required by Blitz Basic applications, which may vary considerably from program to program.

Technical Specs Recommended:

Pentium III 500mhz
GeForce II graphics adapter @ 16/24 bit colour depth
Sound blaster compatible sound card
Windows 98/ME/2000/XP


Credits:

DLL programming by: Paul Kubiszyn
AVI routines provided with much appreciation by: Lucian Wischik
Copyright StudioX64 Software 2003


BlitzAvi.DLL License Agreement

Nice and easy so anyone can understand this. Myself Paul Kubiszyn and StudioX64 are in no way liable for anything relating to this DLL. You use this DLL entirely at your own risk, and take all responsibility for yours and it's actions.

StudioX64 grant the user a license to use this DLL in personal software for their own use at their own homes at no charge. For use in totally free applications, including freeware games and demos also free of charge. A Shareware license will be issued free in most cases, but prior-approval must first be sought after first.

If you intend to use this DLL in a commercial environment, or to create commercial software, then you must first obtain a commercial license. The commercial license fee is £20 / €30 per application containing the DLL, or £50 / €76 for a full unlimited license. The unlimited license allows you to create as many commercial applications featuring the DLL as you wish. To purchase either of the licenses please see the Paypal banners at the top of this page.

For further information or enquires, please contact me on the following email address:

paulk@StudioX64.co.uk