FFMPEG.exe output
Products: Video Capture SDK .Net, Video Edit SDK .Net
Engines:
VideoCaptureCore
,VideoEditCore
This guide explains how to implement FFMPEG.exe output functionality in Windows environments using VisioForge's .NET SDKs. The integration supports both the Video Capture SDK .NET and Video Edit SDK .NET, VideoCaptureCore
and VideoEditCore
engines, respectively.
FFMPEG serves as a comprehensive multimedia framework that enables output to various video and audio formats. Its versatility comes from supporting multiple codecs and providing extensive customization options for both video and audio encoding.
Key Features
FFMPEG provides support for:
- Multiple output formats (MP4, WebM, AVI, WMV, and more)
- Various video and audio codecs with customizable encoding parameters
- Hardware acceleration through:
- Intel QuickSync
- NVIDIA NVENC
- AMD AMF/VCE
Implementation Guide
1. Initialize FFMPEG Output
First, create an FFMPEGEXEOutput object to handle the output configuration:
var ffmpegOutput = new FFMPEGEXEOutput();
2. Configure Output Format
Set the desired output container format:
ffmpegOutput.OutputMuxer = OutputMuxer.MP4;
3. Video Encoder Configuration
Configure your video encoding settings based on your requirements. Here's an example using H.264:
var videoEncoder = new H264MFSettings();
ffmpegOutput.Video = videoEncoder;
Available Video Encoder Options:
Hardware-Accelerated Encoders:
- AMD GPU:
H264AMFSettings
(H.264) andHEVCAMFSettings
(HEVC) - NVIDIA GPU:
H264NVENCSettings
(H.264) andHEVCNVENCSettings
(HEVC) - Intel QuickSync:
H264QSVSettings
(H.264) andHEVCQSVSettings
(HEVC)
CPU-Based Encoders:
- H.264:
H264MFSettings
andX264Settings
- HEVC:
X265Settings
- MPEG-2:
MPEG2Settings
Note: x264/x265 encoders require GPL FFMPEG builds with appropriate codec support.
4. Audio Encoder Configuration
Configure your audio encoding settings:
var audioEncoder = new BasicAudioSettings
{
Bitrate = 192000, // 192 kbps
Channels = 2, // Stereo
SampleRate = 44100, // 44.1 kHz
Encoder = AudioEncoder.AAC,
Mode = AudioMode.CBR
};
ffmpegOutput.Audio = audioEncoder;
The available audio encoders can be found in the VisioForge.Core.Types.FFMPEGEXE.AudioEncoder
enumeration.
5. Final Configuration and Execution
Apply the settings and start the processing:
// Apply format settings
core.Output_Format = ffmpegOutput;
// Set operation mode
core.Mode = VideoCaptureMode.VideoCapture; // For Video Capture SDK
// core.Mode = VideoEditMode.Convert; // For Video Edit SDK
// Set output path
core.Output_Filename = "output.mp4";
// Begin processing
await core.StartAsync();
Required Dependencies
To ensure proper functionality, install the following NuGet packages based on your target architecture:
Video Capture SDK .Net:
Video Edit SDK .Net:
FFMPEG EXE:
Additional Resources
For more code samples and implementation examples, visit our GitHub repository.