Skip to content

rmesch/Bitmaps2Video-for-Media-Foundation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitmaps2Video for Media Foundation

This version requires the newest version of Mfpack!

A VCL-based Delphi-class to encode a series of bitmaps and video-clips together with an audio file to video using the Windows Mediafoundation-API.

The encoding class TBitmapEncoderWMF can be found in Source\uBitmaps2VideoWMF.pas. It is designed to be an easy to use interface to the Mediafoundation-API, requiring only basic knowledge about video-processing.

Requires:

  • The MF-API-headers available at https://github.com/FactoryXCode/MfPack. Download the repository and add its folder "src" to your library path. There is no need to install any package. Thanks to FactoryXCode for the headers and samples!

  • Delphi-Versions: Developed under Delphi 11.3 - 12.1. Now designed to work with Delphi XE7 and up, unless I goofed it up again. Records with methods, anonymous procedures, interposer classes, tasks and TWicImage need to be available.

  • Windows-Versions: Windows 10 or above for full set of features. Windows 8 may work in a limited way, but untested. Will fail under Windows 7 and below.

Supported file formats and codecs:

Output:
Presently only .mp4 with H264 or H265(HEVC)-codecs. Hardware encoding is enabled if supported. Audio is encoded to AAC. The required encoders (MF-Transforms) usually come with your graphics-driver.

Input:
Theoretically anything that Windows has a decoder for should work as input for video or audio. Practically some file formats (like .vob) don't seem to be fully supported. Try them in the demo. Rule of thumb: What Films & TV will play, works.

Usage:

Add the 4 files in the Source-directory to your project and the uses-clause of any unit using the encoder. The methods of the encoder-class are explained in the interface section of uBitmaps2VideoWMF.pas. To see examples of usage, run the demo-project DemoWMF in the Demo-folder. The repo no longer contains dproj-files. Before using the demo-project you should set the output directories to .$(Platform)$(Config) in the project options.

Example_H265.mp4

About

Encode a series of bitmaps and video clips together with an audio file to video using the Windows Mediafoundation-API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages