# Publishing & encoding

URL: https://skali.dppst.com/docs/publish/

> Encode videos locally into adaptive HLS fMP4 on GPU or CPU, choose from four presets including Archive / 4K HQ, and upload straight to Cloudflare R2.

Skali encodes your videos once on your own computer and uploads the finished HLS stream directly to your private Cloudflare R2 bucket. Your server never runs FFmpeg and you never pay for cloud transcoding.

## Adding videos to the queue

You can queue one or multiple videos at once:

- **Drag and drop** files directly into the Skali window.
- **File picker**: click **Add videos**.
- **Paste from clipboard (`Ctrl+V`)**: supported on Linux Wayland (`wl-paste` / `file://` URIs) as well as standard desktop clipboards.
- **Open with Skali / CLI arguments**: pass file paths directly to the Skali executable from your file manager or terminal.

> **Linux Wayland note**: if your compositor blocks native drag-and-drop into `winit` windows, use **`Ctrl+V`** after copying files in your file manager, use the **Add videos** picker, or launch with `WAYLAND_DISPLAY=""` (XWayland).

![Skali desktop publisher encoding HLS locally](../../../assets/screenshots/desktop-queue.png)

## Encoding presets

Skali inspects every video with **FFprobe** (resolution, frame rate, duration, codec, and original shooting date `recorded_at`). It handles both landscape (16:9) and portrait (9:16) videos and never upscales above the source resolution:

| Preset | Target ladder | Quality &amp; max bitrate | Best for |
| --- | --- | --- | --- |
| **Archive / 4K HQ** | Up to 2160p + 1440p + 1080p + 720p | Highest quality (CRF 19, up to 30 Mbps, 256 kbps audio) | Master-quality archival, cinema, high-bitrate 4K cameras &amp; drones |
| **Auto / 4K** *(default)* | Up to 2160p + 1440p + 1080p + 720p | Balanced 4K (CRF 21, up to 22 Mbps, 192 kbps audio) | Everyday 4K &amp; HD libraries with a great quality/size balance |
| **1080p max** | Up to 1080p + 720p | Crisp Full HD (CRF 21, up to 8 Mbps, 160 kbps audio) | Family videos, product demos, tutorials |
| **Eco** | Up to 1080p + 720p | Compact bitrates (CRF 25, up to 4.5 Mbps) | Minimal R2 storage footprint &amp; slower connections |

> **Coming in a future release**: advanced settings are planned so power users can define their own custom encoding presets (resolutions, bitrates, and CRF ladders).

## Works on any computer: GPU acceleration or CPU

**You do not need a powerful graphics card to use Skali.**

- **With a supported GPU**: Skali probes your system automatically and uses the fastest hardware encoder available:
  - **NVIDIA**: NVENC (`h264_nvenc`)
  - **Linux Intel / AMD**: VA-API (`h264_vaapi`)
  - **macOS**: Apple VideoToolbox (`h264_videotoolbox`)
  - **Intel**: Quick Sync (`h264_qsv`)
  - **AMD Windows**: AMF (`h264_amf`)
- **Without a dedicated GPU (or in CPU-only mode)**: Skali automatically falls back to standard software encoding (`libx264`) on your CPU. You get the exact same compatibility and crisp visual quality; encoding simply takes a bit longer. You can also force CPU encoding anytime in settings if you prefer maximum software-encoder efficiency.

## What gets generated per video

- **Adaptive HLS fMP4 (CMAF)** segments and master/variant playlists (compatible natively with Safari, iOS, AirPlay, and `hls.js` everywhere else).
- **5 automatic WebP thumbnails** extracted across the timeline so you can pick the best cover frame (or upload a custom one in `/admin`).
- **WebVTT timeline sprite sheet** for instant visual scrubbing previews when hovering the progress bar.
- **Original shooting date (`recorded_at`)** extracted from container metadata so your library sorts chronologically when you want it to.

## Resumable parallel uploads

Uploads go **directly from your computer to your Cloudflare R2 bucket** using short-lived presigned URLs issued by your Worker. If your connection drops mid-upload, Skali persists queue state locally and resumes where it left off without re-encoding or re-uploading completed segments.
