@extends('admin.layout') @section('title', 'System Settings') @section('page_title', 'Settings') @section('extra_styles') @endsection @section('content')

System Settings

@if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif
@csrf {{-- ── GPU Processing ───────────────────────────────────────── --}}
GPU Accelerated Processing @if(count($gpus)) {{ count($gpus) }} GPU{{ count($gpus) > 1 ? 's' : '' }} detected @else No GPU detected @endif {{-- NVENC encoding health --}} @if($nvencWorks) NVENC encoding ✓ @else NVENC encoding ✗ @endif
@if(!$nvencWorks && count($gpus))
⚠ NVENC is not working with the current FFmpeg binary.
The GPU is detected but FFmpeg {{ shell_exec('/usr/bin/ffmpeg -version 2>/dev/null | head -1') ?? '' }} cannot initialise CUDA on this driver.
Fix: Install a newer FFmpeg with CUDA 12+ support (e.g. jellyfin-ffmpeg7), then update the binary path below.
Until then, video encoding will automatically fall back to CPU (libx264).
@endif
{{-- Detect button + GPU cards --}}
Available GPUs
@if(count($gpus)) @include('admin.partials.gpu-cards', ['gpus' => $gpus, 'selectedDevice' => $settings['gpu_device']]) @else

No NVIDIA GPUs detected. Click "Detect GPUs" to scan.

@endif
{{-- Enable GPU --}}
Enable GPU acceleration When enabled, video encoding uses the NVIDIA GPU. When disabled, falls back to CPU (libx264).
{{-- GPU device (hidden input, controlled by card click) --}} {{-- GPU Encoder --}}
Video encoder h264_nvenc is broadly compatible. hevc_nvenc produces smaller files (H.265) but requires compatible players. libx264 forces CPU encoding regardless of the toggle above.
@foreach([ ['h264_nvenc', 'H.264 NVENC', 'GPU · max compatibility'], ['hevc_nvenc', 'H.265 NVENC', 'GPU · smaller files'], ['libx264', 'libx264', 'CPU · software fallback'], ] as [$val, $label, $desc]) @endforeach
{{-- Encoding preset --}}
Encoding preset NVENC presets: p1 (fastest) → p7 (best quality). libx264 presets: fast / medium / slow. Preset only affects speed vs file size; quality is controlled by CQ/CRF.
{{-- HW Accel --}}
Hardware decode acceleration Use CUDA to decode the source video on the GPU before re-encoding, speeding up the pipeline. Disable if you see CUDA errors in the logs.
{{-- FFmpeg binary path --}}
FFmpeg binary path Absolute path to the ffmpeg executable. Change this to use a newer build (e.g. /usr/lib/jellyfin-ffmpeg/ffmpeg) that supports your GPU driver. Current: {{ config('ffmpeg.ffmpeg', '/usr/bin/ffmpeg') }}
{{-- ── NAS Storage ───────────────────────────────────────────── --}}
NAS Storage @if($settings['nas_sync_enabled'] === 'true') Enabled @else Disabled @endif
Use NAS as primary storage When enabled, uploads go directly to the NAS — no permanent local copy is kept. Files are stored at users/{username}/videos/{title-slug}/ on the NAS share. When disabled, all files are served from local disk using the same directory schema. Disabling NAS will prompt you to migrate files or start fresh.
@if($settings['nas_sync_enabled'] === 'true') @else NAS is disabled. Enable it under NAS Storage. @endif
@if($settings['nas_sync_enabled'] === 'true')
Repair stuck files Scans for files that were saved locally but never reached the NAS (e.g. due to a connection error during upload or edit). Uploads them to the NAS, then removes the local copies. Safe to run at any time — nothing is deleted until the NAS confirms receipt.
@endif
{{-- ── Backup & Restore ──────────────────────────────────────────────────────── --}}
Backup & Restore
Export users & settings Downloads a JSON file containing all user accounts and system settings. Does not include media files.
Restore users & settings Upload a previously exported backup JSON. Existing users are matched by email and updated; new users are created. Settings are merged.
@csrf
{{-- ── Save ─────────────────────────────────────────────────── --}}
Cancel
@endsection @section('scripts') {{-- ── NAS Disable Modal ─────────────────────────────────────── --}} @endsection