TensorStack.Media.Windows 0.10.0

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package TensorStack.Media.Windows --version 0.10.0
                    
NuGet\Install-Package TensorStack.Media.Windows -Version 0.10.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TensorStack.Media.Windows" Version="0.10.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TensorStack.Media.Windows" Version="0.10.0" />
                    
Directory.Packages.props
<PackageReference Include="TensorStack.Media.Windows" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TensorStack.Media.Windows --version 0.10.0
                    
#r "nuget: TensorStack.Media.Windows, 0.10.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TensorStack.Media.Windows@0.10.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TensorStack.Media.Windows&version=0.10.0
                    
Install as a Cake Addin
#tool nuget:?package=TensorStack.Media.Windows&version=0.10.0
                    
Install as a Cake Tool

TensorStack.Media.Windows

TensorStack.Media.Windows provides Windows-specific support for reading and writing audio using FFmpeg. It allows loading audio information, reading and writing audio tensors, and muxing audio into video files. provides Windows-specific support for reading and writing video. It facilitates efficient access to video streams, enabling frames to be read, processed, and saved back to common formats using the Windows media stack.


AudioInput

AudioInput wraps an audio file into a convenient object backed by an AudioTensor. It allows loading, manipulating, and saving audio.

// Load Audio

AudioInput audioInput = new AudioInput("speech.wav");

AudioInput audioInputAsync = await AudioInput.CreateAsync("speech.wav");


// With custom codec, sample rate, and channels

AudioInput audioInput = new AudioInput("music.mp3", "pcm_f32le", 44100, 2);

AudioInput audioInputAsync = await AudioInput.CreateAsync("music.mp3", "pcm_f32le", 44100, 2);


// Save Audio

audioInput.Save("output.wav");

await audioInput.SaveAsync("output.wav");

Notes

  • AudioInput uses AudioManager internally to handle the audio tensor.
  • AudioManager.Initialize only needed for custom FFmpeg/FFprobe binaries or a different temp directory; the NuGet package provides defaults.

AudioManager

AudioManager is a static helper class for loading, saving, and processing audio files. It can read audio into tensors, write tensors back to audio files, extract audio from videos, and add audio to videos. It uses FFmpeg/FFprobe under the hood and provides both synchronous and asynchronous methods.

Load Audio Information

AudioInfo info = AudioManager.LoadInfo("file.wav");

AudioInfo info = await AudioManager.LoadInfoAsync("file.wav");

Returns metadata including codec, sample rate, channels, duration, and sample count.


Load Audio Tensor

AudioTensor tensor = AudioManager.LoadTensor("file.wav", "pcm_s16le", 16000, 1);

AudioTensor tensor = await AudioManager.LoadTensorAsync("file.wav", "pcm_s16le", 16000, 1);

AudioTensor contains the raw audio samples in float32 format.


Save Audio Tensor

AudioManager.SaveAudio("output.wav", tensor);

await AudioManager.SaveAudioAsync("output.wav", tensor);

Add Audio to Video

AudioManager.AddAudio("video.mp4", "sourceAudio.mp3");

await AudioManager.AddAudioAsync("video.mp4", "sourceAudio.mp3");

This muxes the audio from the source file into the target video.


Initialization

The NuGet package supplies FFmpeg binaries. Initialization is only needed if you want to use custom binaries or a different location:

AudioManager.Initialize("ffmpeg.exe", "ffprobe.exe", "Temp");

This sets up the executable paths and temporary directory used for conversions.


Notes

  • All audio I/O uses FFmpeg under the hood.
  • Asynchronous methods use Task and support cancellation.
  • Audio data is handled in float32 format internally.

Frame Interpolation

The Interpolation Pipeline uses RIFE (Real-Time Intermediate Flow Estimation) RIFE analyzes motion between consecutive frames and predicts new intermediate frames, producing smoother motion and higher frame rates without traditional frame blending artifacts.
It�s designed for both speed and quality, making it ideal for upscaling or enhancing AI-generated and low-FPS video content.

Quick Start

This minimal example demonstrates how to perform video frame interpolation using TensorStack.Media.Windows.

[nuget: TensorStack.Media.Windows]
[nuget: TensorStack.Providers.DML]

async Task QuickStartAsync()
{
    var provider = Provider.GetProvider();

    // Create the interpolation pipeline
    using (var pipeline = InterpolationPipeline.Create(provider))
    {
        // Read video stream
        var inputStream = new VideoInputStream("Input.mp4");

        // Interpolate the stream (e.g., 3x frame rate)
        var outputStream = pipeline.RunAsync(new InterpolationStreamOptions
        {
            Multiplier = 3,
            Stream = inputStream.GetAsync()
        });

        // Save the output video
        await outputStream.SaveAsync("Output.mp4");
    }
}

  • Multiplier � Defines how many new frames are generated between existing ones.
    For example, a value of 3 triples the frame rate (turning 30 FPS into 90 FPS).
Product Compatible and additional computed target framework versions.
.NET net9.0-windows10.0.17763 is compatible.  net10.0-windows was computed.  net10.0-windows10.0.17763 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TensorStack.Media.Windows:

Package Downloads
TensorStack.WPF

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.10.1 0 8/20/2026
0.10.0 0 8/20/2026