smithery/christian289

streaming-video-frames

Streams raw video frames via ffmpeg stdout pipe. Use for real-time video processing without preprocessing.

Installation

$ npx skills add smithery/christian289 --skill streaming-video-frames

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/christian289.

npx skills add smithery/christian289

Browse all from smithery/christian289

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,320 B
  • docs SUMMARY.md 136 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

ffmpeg Stdout Pipe Streaming

Stream raw video frames directly from ffmpeg without intermediate files.

Pattern

var psi = new ProcessStartInfo
{
    FileName = "ffmpeg",
    Arguments = $"-loglevel error -i \"{videoPath}\" -vf scale={width}:{height},format=gray -f rawvideo -pix_fmt gray pipe:1",
    RedirectStandardOutput = true,
    RedirectStandardError = true,
    CreateNoWindow = true
};

var process = Process.Start(psi);
process.BeginErrorReadLine();  // Drain stderr to prevent blocking

var stream = process.StandardOutput.BaseStream;

Read Frame

public static byte[]? ReadNextFrame(Stream stream, byte[] buffer, int frameSize)
{
    int bytesRead = 0;
    while (bytesRead < frameSize)
    {
        int count = stream.Read(buffer, bytesRead, frameSize - bytesRead);
        if (count == 0) return null;  // EOF
        bytesRead += count;
    }
    return buffer;
}

Loop Playback

Restart ffmpeg process on EOF:

if (frame == null)
{
    reader.Dispose();
    reader = FfmpegFrameReader.Start(videoPath);
    frame = ReadNextFrame(...);
}

Memory: ~10KB per frame (vs ~1GB for full load)