Skip to content

An example Windows application using FFmpeg and the Spout DirectX library.

License

Notifications You must be signed in to change notification settings

leadedge/SpoutDXvideo

Repository files navigation

SpoutDXvideo

An example Windows application using FFmpeg and the Spout DirectX library.

This is an example Windows application generated by Visual Studio, modified to use FFmpeg to load a video, decode individual frames, send to Spout and display using Windows functions.

The project uses the SpoutDX support class built as a library for x64. Only one sending function is used, "SendImage", which handles everything.

The original purpose was to be an example for SpoutDX built as a dll but proved to be unsuitable due to FFmpeg dependency.

However, it remains useful for reference :
    o Using the SpoutDX library and dll.
    o Spout "SendImage" is the only sending function.
    o Command line processing.
    o FFprobe to read video file details.
    o FFmpeg with a pipe to decode video frames.
    o Windows application drag and drop.
    o Drag and drop with elevated UAC.
    o Display of video frames (see WM_PAINT).
    o Draw and position text.
    o Double buffering to avoid text flicker.
    o Fps control using Spout "HoldFps".

After building, SpoutDX.dll (in "SpoutDX\libs") and the the complete "DATA" folder and contents must be copied to the executable folder (e.g. "x64\Release" or "x64\Debug") or wherever you copy "SpoutDXvideo.exe".

Details for command line execution can be found in "\DATA\Scripts\readme.md".
For a quick example, double click "aa-start.vbs".

Open a Spout receiver to see the output.

Spout is video only - no audio is produced.

FFmpeg.exe and FFprobe.exe are required.

  • Find the example Binaries folder.
  • Go to https://github.com/GyanD/codexffmpeg/releases
  • Choose the "Essentials" build. e.g. "ffmpeg-5.1.2-essentials_build.zip" and download the archive.
  • Unzip the archive and copy "bin\FFmpeg.exe" and "bin\FFprobe.exe" to :  DATA\FFMPEG
  • Copy the entire DATA folder to the folder containing the executable file.
    This may be, for example, "..\x64\Release".

After the program has started, you can "drag and drop" to load different movie files. You can also start from a command line. See "\DATA\Scripts\readme.md.

About

An example Windows application using FFmpeg and the Spout DirectX library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages