Skip to content

RUNE-2003: FFmpeg Audio Decoder and Encoder Proposed

Updated2026-08-23

Summary

FFmpegAudioClipBufferProvider is deleted. FFmpeg audio support now centers on FFmpegAudioDecoder, FFmpegAudioEncoder, FFmpegResampledAudioBuffer, and the temporary FFmpegMuxer.

Design

  • FFmpegAudioDecoder opens the best audio stream during construction, exposes StreamInfo, supports Seek(TimeSpan), and fills caller buffers with canonical interleaved float32 PCM through Read(Span<float>).
  • FFmpegAudioEncoder is configured up front, opens the output stream with Initialize(), accepts canonical interleaved float32 PCM through Encode(ReadOnlySpan<float>), and flushes/finalizes with Complete().
  • FFmpegResampledAudioBuffer adapts any IAudioBuffer to a target sample rate and channel count through libswresample.
  • FFmpegMuxer only muxes already encoded track files into a container; it does not participate in sample-domain encoding.

Boundaries

These FFmpeg audio types are reusable codec primitives, not IMediaEncoder/IMediaDecoder implementations and not a clip-provider abstraction. Scheduling, effect composition, multi-track mixing, and track-based export orchestration all live outside the FFmpeg package.

Document provenance

Author
@devkanro
Created
2026-05-10
Audited at
2026-08-24 @ ce1dbcb4b5e0161eab69faeb97507a50808b69eb
Dependencies
RUNE-2000, RUNE-2002

Rune Project brings Rune Story authoring together with the Rune Engine rendering foundation.