ffmpeg-laravel-video
Skill4 starsChanged 5 months agoMITView on GitHub
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.
In this repository101 other files it gives its agents.
- ai-video-understandingSkill
- apple-foundation-modelsSkill
- arch-dddSkill
- arch-decision-recordsSkill
- arch-diagramsSkill
- arch-eventsSkill
- arch-mvp-roadmapSkill
- arch-python-modernSkill
- aws-app-runnerSkill
- aws-cicd-patternsSkill
- aws-security-hardeningSkill
- azure-functions-python-v2Skill
- azure-identity-m2m-authSkill
- azure-service-bus-messagingSkill
- azure-workflow-execution-modelsSkill
- caddy-tls-proxySkill
- compliance-frameworksSkill
- design-system-workflowSkill
- dev-debugging-strategiesSkill
- dev-standardsSkill
- docker-python-poetrySkill
- docker-pythonSkill
- fastapi-patternsSkill
- formik-yup-react-nativeSkill
- frontend-accessibilitySkill
- frontend-angular-aiSkill
- frontend-angularSkill
- frontend-angular-toolingSkill
- frontend-design-systemsSkill
- frontend-material-chatSkill
- frontend-material-design-3Skill
- frontend-svelteSkill
- gcp-cicd-patternsSkill
- gcp-cloud-runSkill
- gcp-cloudsql-infrastructureSkill
- gcp-finopsSkill
- gcp-observabilitySkill
- gcp-security-hardeningSkill
- github-actions-cicdSkill
- healthkit-biofeedbackSkill
- infra-terraformSkill
- ios-app-qualitySkill
- ios-audio-hapticsSkill
- jest-nestjs-testingSkill
- langchain-azure-openai-patternsSkill
- laravel-auth-hardeningSkill
- laravel-ci-mysqlSkill
- laravel-mix-webpackSkill
- laravel-modern-patternsSkill
- laravel-pint-patternsSkill
- laravel-s3-storageSkill
- laravel-sail-dockerSkill
- mobile-app-deploymentSkill
- mobile-e2e-testingSkill
- mobile-offline-syncSkill
- mobile-push-notificationsSkill
- mobile-video-uploadSkill
- mongodb-asyncmongoclient-patternsSkill
- mongodb-atlas-patternsSkill
- nestjs-patternsSkill
- The first 60 shown.
The file
Files
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
| Operation | Use Case | Method |
| Thumbnail | Video preview | getFrameFromSeconds(10)->save('thumb.jpg') |
| Format conversion | MP4, WebM, AVI | inFormat(new X264)->save('output.mp4') |
| Metadata | Duration, resolution | getDurationInSeconds(), getVideoStream() |
| HLS streaming | Adaptive bitrate | exportForHLS()->save('stream.m3u8') |
| Watermark | Branding | addFilter('-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-Pattern | Pattern |
| FFmpeg not found | Install via Dockerfile (see reference.md) (not installed in Docker) |
| Timeout | Use queue with timeout = 1800 (synchronous processing) |
| Memory exhausted | Set PHP memory_limit = 512M (large video processing) |
| Missing codec | Install 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

