Table of Contents

Enum DefaultsProfile

Namespace
VisioForge.Core.Types.FFMPEGEXE
Assembly
VisioForge.Core.dll

FFMPEG EXE default encoding profiles for common output formats.

public enum DefaultsProfile

Fields

MP4_H264_AAC = 0

MP4 container with H.264 video and AAC audio (most compatible).

The most widely supported format across all platforms and devices.

FFMPEG parameters:

  • Container: MP4 (-f mp4)
  • Video: H.264/AVC using default encoder (-c:v libx264 or h264_nvenc)
  • Audio: AAC-LC (-c:a aac)
  • Optimizations: Fast start for web (-movflags +faststart)

Compatibility:

  • All modern browsers (Chrome, Firefox, Safari, Edge)
  • Mobile devices (iOS, Android)
  • Smart TVs and streaming devices
  • Social media platforms

Typical settings:

  • Video: 1080p @ 4-6 Mbps, 720p @ 2-3 Mbps
  • Audio: 128-192 kbps stereo
  • Profile: High (for quality) or Main (for compatibility)
  • Level: 4.0 for 1080p30, 4.1 for 1080p60
MP4_HEVC_AAC = 1

MP4 container with H.265/HEVC video and AAC audio (efficient compression).

Modern format offering 25-50% better compression than H.264 at same quality.

FFMPEG parameters:

  • Container: MP4 (-f mp4)
  • Video: H.265/HEVC (-c:v libx265 or hevc_nvenc)
  • Audio: AAC-LC (-c:a aac)
  • Optimizations: Fast start, HDR metadata support

Compatibility:

  • Modern devices (2015+ smartphones, 2017+ computers)
  • Latest browsers (Safari 11+, Edge 18+, Chrome 104+ with flag)
  • 4K TVs and streaming devices
  • Not supported on older Android or Windows 7

Use cases:

  • 4K/8K video distribution
  • HDR content (HDR10, Dolby Vision)
  • Bandwidth-constrained streaming
  • Long-term archival (smaller files)

Note: Encoding is 5-10x slower than H.264. Consider hardware acceleration (hevc_nvenc, hevc_qsv) for real-time encoding.

MP4_X264_AAC = 2

MP4 with x264 encoder (high quality H.264) and AAC audio.

Uses the renowned x264 encoder for superior H.264 quality and compression efficiency compared to hardware encoders. Requires FFMPEG built with libx264.

FFMPEG parameters:

  • Container: MP4 (-f mp4)
  • Video: libx264 (-c:v libx264)
  • Audio: AAC-LC (-c:a aac)
  • x264 presets: medium (default), slow (better quality), fast (speed)

x264 advantages:

  • Best H.264 quality per bitrate
  • Advanced psychovisual optimizations
  • Extensive tuning options (film, animation, grain)
  • Consistent quality across all content types

Typical x264 options:

  • CRF mode: -crf 23 (quality-based, 18-28 range)
  • 2-pass: More efficient bitrate allocation
  • Tune: -tune film/animation/grain/zerolatency
  • Profile: -profile:v high -level 4.1

Note: SDK's default FFMPEG may not include x264 due to licensing. Build FFMPEG with --enable-libx264 --enable-gpl for support.

MP4_X265_AAC = 3

MP4 with x265 encoder (high quality H.265/HEVC) and AAC audio.

Uses the x265 encoder for best-in-class HEVC compression. Achieves excellent quality at low bitrates but requires significant CPU resources.

FFMPEG parameters:

  • Container: MP4 (-f mp4)
  • Video: libx265 (-c:v libx265)
  • Audio: AAC-LC (-c:a aac)
  • x265 presets: medium, slow (quality), ultrafast (speed)

x265 features:

  • Superior compression (40-50% better than x264)
  • HDR support (HDR10, HDR10+, Dolby Vision)
  • 10/12-bit encoding support
  • Parallel processing optimizations

Encoding options:

  • CRF mode: -crf 28 (23-34 typical range)
  • Presets: -preset slow (quality) or medium (balanced)
  • HDR: -x265-params "hdr-opt=1:repeat-headers=1"
  • Threading: Automatically uses all CPU cores

Performance: 10-20x slower than real-time on CPU. Consider hardware encoders (hevc_nvenc) for faster encoding.

Note: Requires FFMPEG built with --enable-libx265 --enable-gpl.

WebM = 4

WebM container with VP9 video and Opus audio (web-optimized).

Open-source, royalty-free format developed by Google for web video. Excellent compression and quality, widely supported in modern browsers.

FFMPEG parameters:

  • Container: WebM (-f webm)
  • Video: VP9 (-c:v libvpx-vp9)
  • Audio: Opus (-c:a libopus)
  • Optimizations: 2-pass encoding recommended

VP9 advantages:

  • Royalty-free (no licensing fees)
  • Similar compression to HEVC
  • Excellent for web streaming
  • YouTube's preferred codec

Encoding strategies:

  • Quality: -crf 31 -b:v 0 (constant quality)
  • 2-pass: Better bitrate distribution
  • Speed: -cpu-used 1 (0=slowest/best, 4=fastest)
  • Threading: -row-mt 1 -threads 8

Browser support:

  • Chrome, Firefox, Edge (full support)
  • Safari (14+ with VP9 support)
  • Older browsers may need VP8 fallback

Note: VP9 encoding is CPU-intensive. Consider VP8 for faster encoding with slightly larger files.

Icecast = 5

Icecast-compatible AAC audio streaming format.

Configures FFMPEG for live audio streaming to Icecast servers using AAC codec in ADTS format. Optimized for low-latency internet radio.

FFMPEG parameters:

  • Format: ADTS AAC (-f adts)
  • Audio: AAC-LC (-c:a aac)
  • Bitrate: 128-192 kbps typical (-b:a 128k)
  • Output: icecast://source:password@server:port/mount

Streaming configuration:

  • Sample rate: 44.1 or 48 kHz (-ar 44100)
  • Channels: Stereo typical (-ac 2)
  • AAC profile: LC (Low Complexity) for compatibility
  • Buffer size: Small for low latency (-bufsize 64k)

Icecast URL format: icecast://source:[password]@[server]:[port]/[mount].aac

Quality settings:

  • 64 kbps: Speech/talk radio
  • 128 kbps: Standard music quality
  • 192-256 kbps: High-quality music

Note: Ensure Icecast server is configured to accept AAC. Some servers may prefer MP3 for broader compatibility.

FLV_H264_AAC = 6

Flash Video format with H.264 video and AAC audio (legacy streaming).

FLV format primarily used for RTMP streaming to services like Twitch, YouTube Live, and Facebook Live. While Flash Player is deprecated, FLV remains the standard container for RTMP protocol.

FFMPEG parameters:

  • Container: FLV (-f flv)
  • Video: H.264 baseline/main profile (-c:v libx264)
  • Audio: AAC-LC (-c:a aac)
  • Key frame interval: 2 seconds (-g 60 for 30fps)

RTMP streaming settings:

  • Bitrate: 2500-6000 kbps total
  • Resolution: 1920x1080 or 1280x720
  • Frame rate: 30 or 60 fps
  • Audio: 128-160 kbps AAC

Live streaming optimizations:

  • x264 preset: veryfast or faster (-preset veryfast)
  • Tune: zerolatency (-tune zerolatency)
  • Buffer: Small VBV buffer (-bufsize 2M)
  • CBR preferred: -b:v 2500k -minrate 2500k -maxrate 2500k

Output URL format: rtmp://server/app/streamkey

Note: Many platforms now support direct MP4/WebM ingestion via WebRTC or SRT protocols as modern alternatives.

Remarks

Provides pre-configured encoding profiles for common use cases, simplifying the process of creating standard-compliant media files. Each profile includes optimized settings for the container format, video codec, audio codec, and encoding parameters suitable for the target use case.

These profiles generate appropriate FFMPEG command-line arguments for:

  • Container format selection (-f)
  • Video/audio codec selection (-c:v, -c:a)
  • Bitrate and quality settings
  • Format-specific optimizations

Profile selection should be based on:

  • Target platform compatibility
  • Quality vs. file size requirements
  • Streaming vs. local playback needs
  • Available codecs in FFMPEG build