@extends('admin.layout') @section('title', 'Upload Video') @section('content')

โ˜๏ธ Upload Video (Self-Hosted)

Server Upload: File MP4 diupload ke server via chunked upload, lalu di-encode ke HLS dan dikirim ke cloud storage. Bandwidth efisien โ€” tidak ada double transfer. Multiple upload didukung.
{{-- Step 1: Config & File Selection --}}
{{-- Storage & Prefix Config --}}
HLS output akan di-upload ke storage ini.
Folder tujuan thumbnail.
Folder tujuan HLS output pada bucket (misal: videos/)
{{-- Options --}}
Akan dipakai untuk semua video di batch ini. Jika kosong, description tiap video = title.
@forelse($categories as $category) @empty
Belum ada kategori.
@endforelse
@forelse($tags as $tag) @empty
Belum ada tags.
@endforelse
{{-- Watermark Settings (collapsible) --}}

๐Ÿ’ง Pengaturan Watermark

Kelola watermark โ†’
{{-- Watermark Type Toggle --}}
{{-- Image Watermark Notice --}}
@if($watermarkExists)
โœ… Watermark gambar tersedia
@else
โš ๏ธ Belum ada gambar watermark โ€” upload dulu
@endif
{{-- Text Watermark Fields --}}
{{ $watermarkConfig['font_size'] ?? 24 }}px
{{ $watermarkConfig['font_color'] ?? '#FFFFFF' }}
{{-- Common fields: Position + Opacity + Motion --}}
{{ $watermarkConfig['opacity'] ?? 0.7 }}
{{-- Preview --}}
VIDEO PREVIEW
{{-- Image preview --}} watermark {{-- Text preview --}}
{{ $watermarkConfig['text'] ?? 'Preview Text' }}
{{-- File Selection --}}
๐Ÿ“
Klik atau drag & drop file MP4 di sini
Format: MP4 saja. Maks {{ round(config('video_storage.upload.max_size', 5368709120) / 1024 / 1024 / 1024, 1) }} GB per file.
{{-- File Queue Table --}}
Batal
{{-- Step 2: Batch Upload Progress --}} {{-- Pipeline explanation --}}

๐Ÿ”„ Pipeline Encoding

Setelah upload, video akan melalui pipeline berikut:

  1. Chunked Upload โ€” Browser mengirim file MP4 ke server dalam potongan 5MB (bypass upload limit)
  2. Queue โ€” Job encoding masuk antrian video-encode
  3. Encode โ€” FFmpeg mengubah MP4 โ†’ HLS Adaptive Bitrate langsung dari file lokal
  4. Thumbnail โ€” Auto-generate thumbnail dari frame video (jika diaktifkan)
  5. Upload HLS โ€” Hanya file .m3u8 + .ts dikirim ke {{ strtoupper(config('video_storage.default_driver', 'S3')) }}
  6. Cleanup โ€” File MP4 lokal dihapus otomatis setelah selesai
  7. Ready โ€” Video siap ditonton dengan HLS streaming
Resolusi encoding: @php $profiles = config('video.encoding.profiles', config('video.profiles', [])); @endphp @foreach($profiles as $name => $p) {{ $name }} ({{ $p['bitrate'] ?? '?' }}) @endforeach

Catatan: Video tidak akan di-upscale. Jika source 480p, hanya profil โ‰ค480p yang dihasilkan.
@endsection