agentsclimarketplace

Ffmpeg laravel video

Skill ai-enhanced-engineer/aiee-skills/skills/ffmpeg-laravel-video

FFmpeg integration with Laravel for video processing. Thumbnail generation, format conversion, video metadata extraction, streaming. Use for video upload features, thumbnail generation, or media processing.From its SKILL.md

Install
npx -y skills add ai-enhanced-engineer/aiee-skills --skill ffmpeg-laravel-video

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.0 KB, as published. Nobody here has run it

FFmpeg Video Processing in Laravel

Laravel wrapper for FFmpeg using protonemedia/laravel-ffmpeg.

When to Use

  • Generating video thumbnails
  • Converting video formats
  • Extracting video metadata (duration, resolution, codec)
  • HLS/DASH streaming setup
  • Video watermarking
  • Processing uploaded videos
  • Queue-based video processing

Quick Setup Pattern

Generate Thumbnail:

use ProtoneMedia\LaravelFFMpeg\Support\FFMpeg;

FFMpeg::fromDisk('s3')
    ->open('videos/input.mp4')
    ->getFrameFromSeconds(10)
    ->export()
    ->toDisk('s3')
    ->save('thumbnails/video-thumb.jpg');

Convert Video Format:

FFMpeg::fromDisk('s3')
    ->open('videos/input.mov')
    ->export()
    ->inFormat(new \FFMpeg\Format\Video\X264)
    ->save('videos/output.mp4');

Common Operations

OperationUse CaseMethod
ThumbnailVideo previewgetFrameFromSeconds(10)->save('thumb.jpg')
Format conversionMP4, WebM, AVIinFormat(new X264)->save('output.mp4')
MetadataDuration, resolutiongetDurationInSeconds(), getVideoStream()
HLS streamingAdaptive bitrateexportForHLS()->save('stream.m3u8')
WatermarkBrandingaddFilter('-i', 'logo.png')

Queue Pattern

Queue-based processing recommended: Video processing blocks HTTP requests. Queue jobs enable async processing with timeouts and retries.

// Controller
class VideoController extends Controller
{
    public function upload(Request $request)
    {
        $path = $request->file('video')->store('videos', 's3');
        ProcessVideoJob::dispatch($path);
        return response()->json(['processing' => true]);
    }
}

// Job (basic structure - see examples.md for full implementation)
class ProcessVideoJob implements ShouldQueue
{
    use Queueable;

    public $timeout = 1800; // 30 minutes
    public $tries = 3;

    public function handle()
    {
        FFMpeg::fromDisk('s3')
            ->open($this->videoPath)
            ->getFrameFromSeconds(5)
            ->export()
            ->save('thumbnails/thumb.jpg');
    }
}

Anti-Patterns

Anti-PatternPattern
FFmpeg not foundInstall via Dockerfile (see reference.md) (not installed in Docker)
TimeoutUse queue with timeout = 1800 (synchronous processing)
Memory exhaustedSet PHP memory_limit = 512M (large video processing)
Missing codecInstall ffmpeg package (not ffmpeg-lite) (FFmpeg build incomplete)

See reference.md for installation, HLS streaming, security hardening, format options. See examples.md for complete job implementations, anti-patterns, Docker setup.

Keep looking

Skills are one crate of 627,801. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.