dharma / laravel-video-uploader
Laravel package to handle large video uploads with adaptive streaming (HLS) and progress tracking
v2.0.0
2025-12-27 04:35 UTC
Requires
- php: >=8.1
- illuminate/support: ^10.0|^11.0
- pbmedia/laravel-ffmpeg: ^8.7
Requires (Dev)
- orchestra/testbench: ^9.15
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2026-02-27 05:33:47 UTC
README
A simple and elegant Laravel package to handle video uploads effortlessly. Supports single or multiple video uploads with optional validation and storage support. Perfect for modern Laravel applications.
🌟 Features
- Upload single or multiple videos
- Supports popular video formats (
mp4,mov,avi, etc.) - Optional size/type validation
- Compatible with Laravel 10+
- Easy integration with custom storage disks
- Lightweight and developer-friendly
⚙️ Dependencies
Before using dharma/laravel-video-uploader, install:
- pbmedia/laravel-ffmpeg – handles video processing.
composer require pbmedia/laravel-ffmpeg:^8.7
⚡ Installation
Install via Composer:
composer require dharma/laravel-video-uploader
Publish the config file:
php artisan vendor:publish --provider="Dharma\VideoUploader\VideoUploaderServiceProvider" --tag=config
🚀 Usage Examples
use Dharma\VideoUploader\VideoUploader; class VideoController extends Controller { protected VideoUploader $video; public function __construct(VideoUploader $video) { $this->video = $video; } /** * List all videos */ public function index() { // List videos with pagination (20 per page) $videos = $this->video->list([], 20); return view('video', compact('videos')); } /** * Upload a new video */ public function store(Request $request) { // Upload video and dispatch processing job $video = $this->video->uploadVideo($request->file('video')); return response()->json([ 'message' => 'Video uploaded and queued for processing.!', 'video' => $video ]); } /** * Show single video */ public function show(int $id) { $video = $this->video->getById($id); return view('video', compact('video')); } /** * Delete a video by ID */ public function destroy(int $id) { $this->video->deleteById($id); return response()->json([ 'message' => 'Video deleted successfully.!' ]); } }