#
Video Encryption SDK
#
Introduction to Video Encryption
The Video Encryption SDK provides robust tools for encoding video files into MP4 H264/AAC format with advanced encryption capabilities. Developers can secure their media content using custom passwords or binary data encryption methods.
The SDK integrates seamlessly with any DirectShow application through a complete set of filters. These filters come with extensive interfaces allowing developers to fine-tune settings according to specific security requirements and implementation needs.
#
Installation
Before using the code samples and integrating the SDK into your application, you must first install the Video Encryption SDK from the product page.
Installation Steps:
- Download the SDK installer from the product page
- Run the installer with administrative privileges
- The installer will register all necessary DirectShow filters
- Sample applications and source code will be available in the installation directory
Note: The SDK filters must be properly registered on the system before they can be used in your applications. The installer handles this automatically.
#
Integration Flexibility
You can implement the SDK in various DirectShow applications as filters for both encryption and decryption processes. The system works effectively with:
- Live video sources
- File-based video sources
- Software video encoders
- GPU-accelerated video encoders from the DirectShow Encoding Filters pack (available separately)
- Third-party DirectShow filters for additional video encoding options
#
Key Features and Capabilities
#
Core Functionality
- Secure Encryption/Decryption: Process video files or capture streams with robust security algorithms
- Format Support: Full H264 encoder support for video content
- Audio Handling: Complete AAC encoder support for audio streams
- Flexible Security Options: Implement encryption using either binary data or string passwords
#
Performance Optimization
- AES-256 encryption engine for maximum security
- CPU hardware acceleration support
- GPU acceleration compatibility
- Optimized for high-speed encryption processes
#
Development Resources
#
Code Samples and Documentation
The SDK includes comprehensive code samples for multiple programming languages:
- C# implementation examples
- C++ reference code
- Delphi sample projects
These samples provide practical implementation guidance for developers building secure video applications.
#
Demo Application
Explore the included Video Encryptor application for a hands-on demonstration of the SDK's capabilities in a working environment.
#
API Reference
#
Core Interfaces
The SDK provides comprehensive COM interfaces for encryption and decryption:
#
IVFCryptoConfig
Primary interface for configuring encryption settings on the muxer filter (encryption) and demuxer filter (decryption).
GUID: {BAA5BD1E-3B30-425e-AB3B-CC20764AC253}
Methods:
put_Provider- Set password provider for advanced scenarios (binary keys, dynamic passwords)get_Provider- Get password provider interfaceput_Password- Set encryption password or key directly (binary data)HavePassword- Check if password is set
#
IVFPasswordProvider
Callback interface for advanced password provision scenarios such as binary data keys, dynamic password generation, or custom key derivation.
GUID: {6F8162B5-778D-42b5-9242-1BBABB24FFC4}
Methods:
QueryPassword- Query password for specific file
Use Cases:
- Binary key data provision
- Dynamic password generation
- File-specific encryption keys
- Custom key derivation functions
#
Helper Classes
The SDK includes helper extension methods for .NET developers:
ApplyString- Apply string password (hashed with SHA-256)ApplyFile- Use file as encryption key (SHA-256 hash of file content)ApplyBinary- Apply binary key data (hashed with SHA-256)
#
Filter CLSIDs
For detailed interface documentation and code examples, see the Interface Reference.
#
Code Examples
#
Quick Start - Encryption
#
C# Example
using VisioForge.DirectShowAPI;
// Get crypto config interface from encrypt muxer
var cryptoConfig = muxerFilter as IVFCryptoConfig;
if (cryptoConfig != null)
{
// Apply string password
cryptoConfig.ApplyString("MySecurePassword123");
// Or use file as key
// cryptoConfig.ApplyFile(@"C:\keys\mykey.bin");
// Or use binary data
// byte[] keyData = new byte[] { 0x01, 0x02, 0x03, ... };
// cryptoConfig.ApplyBinary(keyData);
}
#
C++ Example
#include "encryptor_intf.h"
ICryptoConfig* pCrypto = nullptr;
hr = pMuxer->QueryInterface(IID_ICryptoConfig, (void**)&pCrypto);
if (SUCCEEDED(hr))
{
// Set password
const wchar_t* password = L"MySecurePassword123";
hr = pCrypto->put_Password(
(LPBYTE)password,
wcslen(password) * sizeof(wchar_t)
);
pCrypto->Release();
}
#
Decryption
#
C# Example
// Get crypto config interface from decrypt demuxer
var cryptoConfig = demuxerFilter as IVFCryptoConfig;
if (cryptoConfig != null)
{
// Must use same password/key as encryption
cryptoConfig.ApplyString("MySecurePassword123");
}
For complete examples including filter graph setup, see the Examples Page.
#
Sample Applications
The SDK includes working sample applications demonstrating encryption and decryption workflows:
#
Included Samples
- Encryption Demo - Demonstrates video file encryption with H.264/AAC encoding
- Player Demo - Shows decryption and playback of encrypted video files
#
GitHub Repository
Complete source code for all samples is available:
- Video Encryption SDK Samples - C#, C++, and Delphi examples
These samples include:
- Complete filter graph construction
- Encryption configuration
- Decryption and playback
- Error handling
- Best practices implementation
#
Licensing Information
#
Version History
#
Version 11.4
- Full compatibility with VisioForge .Net SDKs 11.4
- Enhanced Nvidia NVENC support for H264 and H265 video encoders
- Improved Intel QuickSync support for H264 video encoder
- Added NV12 colorspace support for enhanced performance
#
Version 11.0
- Complete compatibility with VisioForge .Net SDKs 11.0
- Enhanced GPU encoders support
- Upgraded AAC encoder functionality
#
Version 10.0
- Full compatibility with VisioForge .Net SDKs 10.0
- Enhanced compatibility with H264 and H265 video formats
- Integrated AMD AMF acceleration support
- Added Intel QuickSync technology support
#
Version 9.0
- Significantly improved encryption processing speed
- Added CPU hardware acceleration capabilities
- Implemented new engine based on AES-256 encryption
- Added file usage as a key (with binary array support)
- Integrated NVENC support for GPU acceleration
- Enhanced AAC HE encoder support
#
Version 8.0
- Updated video and audio encoders
- Improved filter encryption performance
#
Version 7.0
- Initial release as a standalone product
- Previously integrated within Video Capture SDK, Video Edit SDK, and Media Player SDK
- Compatible with any DirectShow application without requiring additional VisioForge SDKs
#
Resources
- Product Page - Purchase, licensing, and product information
- Sample Applications - Complete source code examples
#
See Also
- Interface Reference - Complete API documentation
- Examples - Comprehensive code examples for encryption and decryption
- DirectShow Encoding Filters Pack - Compatible video encoders (H.264, H.265, AAC)