Skip to content

blueOctopusAI/FrameLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FrameLab

A professional .NET 8.0 WinForms video player with advanced frame capture capabilities. Built with LibVLCSharp for universal format support and high-quality frame extraction.

🎥 Key Features

Video Playback

  • Universal Format Support - MP4, AVI, MKV, MOV, WMV, FLV, WebM, M4V, 3GP, ASF, MPG, MPEG, VOB, TS, M2TS, MTS, DivX, XviD, RM, RMVB, OGV
  • Audio Support - MP3, WAV, FLAC, AAC, OGG, WMA, M4A
  • Professional Controls - Play/pause, skip ±5s, scrubber timeline, volume control
  • Frame-Accurate Scrubbing - When paused, scrubbing updates the display frame

Frame Capture System ("Burst" Feature)

  • Smart Frame Extraction - Captures 15 consecutive frames (~0.5 seconds of content)
  • Works While Playing or Paused - Uses VLC's NextFrame() API for precise frame stepping
  • Frame Export - Click any thumbnail to save full-resolution frames as PNG/JPEG/BMP
  • Accumulative Collection - Multiple bursts add to your frame collection
  • High-Quality Thumbnails - Maintains aspect ratio with professional scaling
  • Dynamic UI - Auto-sizing thumbnail grid with scrollable panel

Modern UI Design

  • Split Layout - 75% video area, 25% frame capture panel
  • Visual Feedback - Color-coded buttons show current state
  • Professional Styling - Flat design with consistent spacing
  • Responsive - Adapts to window resizing

🚀 Quick Start

Prerequisites

  • .NET 8.0 SDK - Download here
  • Windows OS (Windows 10/11 recommended)
  • Visual Studio 2022 (optional, for development)

Installation

  1. Clone the Repository
git clone [your-repository-url]
cd FrameLab
  1. Restore Dependencies
dotnet restore
  1. Build the Project
dotnet build
  1. Run the Application
cd FrameLab
dotnet run

🎮 How to Use

Basic Video Playback

  1. Launch the application
  2. Click "Load Video" (blue button in header)
  3. Select any supported video file
  4. Use media controls:
    • ▶/⏸ Play/Pause (changes color based on state)
    • ⏮ Skip back 5 seconds
    • ⏭ Skip forward 5 seconds
    • Drag the timeline scrubber to seek
    • Adjust volume with the slider

Frame Capture (Burst)

  1. Load a video first
  2. Click "Burst" button (red) during playback or while paused
  3. Watch frames appear in the right panel as they're captured
  4. Auto-stops after capturing 15 frames
  5. Click "Burst" again to capture another set (adds to existing collection)
  6. Click any thumbnail to open save dialog and export full resolution frame

Burst Behavior

  • During Playback: Captures frames as the video plays naturally
  • While Paused: Uses VLC's NextFrame() method for precise frame-by-frame stepping
  • Frame Rate: Captures every 33ms for playing video, 100ms for paused (to allow frame advancement)
  • Guaranteed Different Frames: Each frame is unique, even when paused

Saving Frames

  • Click any captured thumbnail to save it
  • Choose format: PNG (lossless), JPEG (compressed), or BMP
  • Full resolution: Saves the original video frame resolution, not the thumbnail
  • Smart naming: Automatically suggests filename with frame number

🏗️ Technical Architecture

Core Technologies

  • .NET 8.0 Windows Forms
  • LibVLCSharp (v3.9.4) - Video playback engine
  • VLC Native Snapshots - High-quality frame extraction
  • System.Drawing.Common - Image processing
  • Async/Await - Modern asynchronous programming patterns

Architecture & Design Patterns

  • Service-Based Architecture - FrameCaptureService handles capture logic separately from UI
  • Event-Driven - Service communicates with UI through events
  • Thread-Safe Operations - Proper UI thread marshaling
  • Memory Management - Full resolution images stored with proper disposal
  • SOLID Principles - Single responsibility, open for extension

Frame Capture Implementation

  1. FrameCaptureService - Dedicated service class for capture logic
  2. NextFrame() API - Uses VLC's native frame stepping for paused videos
  3. Unique Session IDs - Prevents filename conflicts between bursts
  4. Async File Operations - Non-blocking file I/O with async/await
  5. Smart Cleanup - Temporary files deleted after processing

📁 Project Structure

FrameLab/
├── FrameLab/
│   ├── Form1.cs              # Main UI and event handling
│   ├── Form1.Designer.cs     # UI layout and controls
│   ├── Form1.resx           # Form resources
│   ├── FrameCaptureService.cs # Frame capture logic (separated)
│   ├── Program.cs           # Application entry point
│   └── FrameLab.csproj      # Project dependencies
├── FrameLab.sln             # Visual Studio solution
├── .gitignore              # Git exclusions
└── README.md               # This file

🐛 Troubleshooting

Video Won't Play

  • Verify file format is supported
  • Check VLC packages installed correctly: dotnet restore
  • Try a different video file to isolate the issue

Scrubbing Doesn't Update Frame When Paused

  • Fixed in latest version - position is set twice to force VLC display update
  • Maintains pause state while updating the displayed frame

Build Errors

dotnet clean
dotnet restore
dotnet build

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open a Pull Request

Code Style

  • Use nullable reference types
  • Follow async/await best practices
  • Implement proper disposal patterns
  • Add XML documentation for public methods
  • Follow existing naming conventions
  • Separate concerns (UI vs business logic)

📄 License

[Add your license information here]

🙏 Acknowledgments

  • VideoLAN - For the incredible VLC media player
  • LibVLCSharp - For excellent .NET bindings
  • Microsoft - For .NET and WinForms framework

Questions? Open an issue or contact the development team. Found a bug? Please report it with steps to reproduce. Have an idea? We'd love to hear your feature suggestions!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages