StreamPlayerCore.WPF.Control
1.1.1
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package StreamPlayerCore.WPF.Control --version 1.1.1
NuGet\Install-Package StreamPlayerCore.WPF.Control -Version 1.1.1
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="StreamPlayerCore.WPF.Control" Version="1.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="StreamPlayerCore.WPF.Control" Version="1.1.1" />
<PackageReference Include="StreamPlayerCore.WPF.Control" />
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 StreamPlayerCore.WPF.Control --version 1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: StreamPlayerCore.WPF.Control, 1.1.1"
#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 StreamPlayerCore.WPF.Control@1.1.1
#: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=StreamPlayerCore.WPF.Control&version=1.1.1
#tool nuget:?package=StreamPlayerCore.WPF.Control&version=1.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
StreamPlayerCore
WPF and WinForms controls for video streaming using FFmpeg. Built with .Net9 and .Net Framework 4.8.
Based on the WebEye library.
Usage
WinForms
- Install the StreamPlayerCore.WinForms.Control NuGet package.
- Add the
StreamPlayerControlto your form.using StreamPlayerCore.WinForms.Control; public partial class MainForm : Form { private StreamPlayerControl streamPlayerControl; public MainForm() { InitializeComponent(); streamPlayerControl = new StreamPlayerControl { Dock = DockStyle.Fill }; this.Controls.Add(streamPlayerControl); } private void MainForm_Load(object sender, EventArgs e) { streamPlayerControl.StartPlay(new Uri("your_stream_url"), TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(3.0), // according to your needs RtspTransport.Tcp, // select appropriate transport protocol RtspFlags.None, 0, 5000000 // analyzeduration and probesize parameters, experiment for best results ); } }
WPF
- Install the StreamPlayerCore.WPF.Control NuGet package.
- Add the
StreamPlayerControlto your XAML.<Window x:Class="WpfApp.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:spc="clr-namespace:StreamPlayerCore.WPF.Control;assembly=StreamPlayerCore.WPF.Control" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800"> <Grid> <spc:StreamPlayerControl x:Name="streamPlayerControl"/> </Grid> </Window> - Start playing the stream in the code-behind.
using StreamPlayerCore.WPF.Control; using System; using System.Windows; namespace WpfApp { public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); streamPlayerControl.StartPlay(new Uri("your_stream_url"), TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(3.0), // according to your needs RtspTransport.Tcp, // select appropriate transport protocol RtspFlags.None, 0, 5000000 // analyzeduration and probesize parameters, experiment for best results ); } } }
Build instructions
Requirements
- Git
- dotnet 9 SDK
- MSVC - VS C++ x64/x86 build tools | MSVC - VS C++ x64/x86 Spectre-mitigated libs | Windows SDK
- Jetbrains Rider
- MSYS2
Building libraries
- Install all requirements.
- Create a
C:\StreamPlayerCore-buildfolder and navigate to it in a terminal. - Clone the FFmpeg repository for a 32-bit build:
git clone --branch <version tag> https://github.com/FFmpeg/FFmpeg FFmpeg32 - Clone the FFmpeg repository for a 64-bit build:
git clone --branch <version tag> https://github.com/FFmpeg/FFmpeg FFmpeg64 - Download the latest Boost release
- Extract the Boost archive to
C:\StreamPlayerCore-build\boost. - Download the latest NASM release (Executable only), extract it to
C:\StreamPlayerCore-buildand rename tonasm.exe. - Add
C:\StreamPlayerCore-buildto your system PATH. - Create an
MSYS2_PATH_TYPEenvironment variable with the valueinherit. - Navigate to
C:\StreamPlayerCore-build\boostand run:
and then.\bootstrap.bat.\b2 runtime-link=static - Open the
x86 Native Tools Command Prompt for VS 2022 - Navigate to
C:\msys64and open themsys2_shell.cmdfile. - run
pacman -Syu pkg-config diffutils make - Navigate to
C:\StreamPlayerCore-build\FFmpeg32and run:
and then:./configure --toolchain=msvc --arch=i686 --enable-version3 --enable-static --disable-shared --disable-programs --disable-docmake - Open the
x64 Native Tools Command Prompt for VS 2022 - Navigate to
C:\msys64and open themsys2_shell.cmdfile. - Navigate to
C:\StreamPlayerCore-build\FFmpeg64and run:
and then:./configure --toolchain=msvc --arch=amd64 --target-os=win64 --enable-version3 --enable-static --disable-shared --disable-programs --disable-docmake
Building StreamPlayerCore
- Clone the StreamPlayerSharp repository:
git clone https://github.com/BlazekWasTaken/StreamPlayerCore - Open the
StreamPlayerCore.slnfile in Jetbrains Rider. - Open the
StreamPlayerproject and edit theStreamPlayer.vcxproj. Replace:
with the path to your Windows SDK x86 libraries. And:C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\um\x86
with the path to your Windows SDK x64 libraries.C:\Program Files (x86)\Windows Kits\10\Lib\10.0.26100.0\um\x64 - Change the
StreamPlayerbuild configuration toRelease | Win32. - Build the project.
- Change the
StreamPlayerbuild configuration toRelease | x64. - Build the project again.
- Open the
StreamPlayerCore.WinForms.Controlproject and open theResources.resxfile. This will remove the lingering errors. - Build the project.
- Open the
StreamPlayerCore.WPF.Controlproject and open theResources.resxfile. This will remove the lingering errors. - Build the project.
Testing
- Run the
StreamPlayerCore.WinForms.Demoproject. - Run the
StreamPlayerCore.WPF.Demoproject.
Tested versions
- Dotnet sdk - 9.0.305
- Windows SDK - 10.0.26100.4654
- MSVC - v143 - VS 2022
- MSYS2 - 20250830
- Boost - 1.89.0
- FFmpeg - 8.0
- NASM - 3.0.1
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0-windows7.0 is compatible. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0-windows7.0
- System.Drawing.Common (>= 9.0.9)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.