Configuration - cleverdevil/squishy GitHub Wiki

Configuring Squishy

Proper configuration is essential for Squishy to function correctly. This guide covers the configuration options and how to set them up. If this is your first time setting up Squishy, we recommend that you use the automated onboarding flow rather than manually creating your configuration.

Configuration File

Squishy uses a JSON configuration file located at /config/config.json within the container. During the initial setup, this file will be created through the onboarding wizard, but you can also manually edit it if needed.

Here's an example configuration file:

{
  "media_path": "/media",
  "transcode_path": "/transcodes",

  "jellyfin_url": "http://jellyfin:8096",
  "jellyfin_api_key": "your_api_key",

  "path_mappings": {
    "/path/on/media/server": "/media"
  },
  "hw_accel": "vaapi",
  "hw_device": "/dev/dri/renderD128",
  "max_concurrent_jobs": 2,
  "ffmpeg_path": "/usr/bin/ffmpeg",
  "ffprobe_path": "/usr/bin/ffprobe",
  "profiles": [
    {
      "name": "high",
      "resolution": "3840x2160",
      "codec": "h264",
      "container": "mkv",
      "quality": "high",
      "hw_accel": "vaapi",
      "hw_device": "/dev/dri/renderD128",
      "allow_hw_failover": true
    },
    {
      "name": "medium",
      "resolution": "1920x1080",
      "codec": "h264",
      "container": "mkv",
      "quality": "medium",
      "hw_accel": "vaapi",
      "hw_device": "/dev/dri/renderD128",
      "allow_hw_failover": true
    },
    {
      "name": "low",
      "resolution": "1280x720",
      "codec": "h264",
      "container": "mp4",
      "quality": "low",
      "allow_hw_failover": true
    },
    {
      "name": "potato",
      "resolution": "854x480",
      "codec": "h264",
      "container": "mp4",
      "quality": "low",
      "bitrate": "1M",
      "allow_hw_failover": false
    }
  ]
}

Core Configuration Options

Media Source Configuration

You must configure either Jellyfin OR Plex (not both):

  • Jellyfin Configuration:

    • jellyfin_url: URL to your Jellyfin server (e.g., "http://jellyfin:8096")
    • jellyfin_api_key: Your Jellyfin API key
  • Plex Configuration:

    • plex_url: URL to your Plex server (e.g., "http://plex:32400")
    • plex_token: Your Plex authentication token

Path Configuration

  • media_path: Path to your media files inside the Squishy container
  • transcode_path: Path where transcoded files will be stored
  • path_mappings: Maps paths between your media server and Squishy container (critical for Docker setups)
  • ffmpeg_path: Path to the FFmpeg executable (default: "/usr/bin/ffmpeg")
  • ffprobe_path: Path to the FFprobe executable (default: "/usr/bin/ffprobe")

Hardware Acceleration

  • hw_accel: Hardware acceleration method (e.g., "vaapi", "none")
  • hw_device: Path to the hardware device (e.g., "/dev/dri/renderD128")

Performance

  • max_concurrent_jobs: Maximum number of concurrent transcoding jobs (default: 2)

Transcoding Presets

Squishy uses presets to define various transcoding profiles. The profiles section in the configuration file defines these presets.

Preset Structure

Each preset is defined with these properties:

  • name: Identifier for the preset
  • resolution: Target resolution (e.g., "1920x1080")
  • codec: Video codec (e.g., "h264", "hevc")
  • container: Container format (e.g., "mkv", "mp4")
  • quality: Quality setting (e.g., "high", "medium", "low")
  • bitrate or crf: Either a bitrate (e.g., "8M") or CRF value for quality-based encoding
  • hw_accel: Hardware acceleration method for this preset (optional)
  • hw_device: Hardware device path for this preset (optional)
  • allow_hw_failover: Whether to fallback to software encoding if hardware encoding fails

Preset Collections

Squishy comes with two preset collections:

  1. Compatible Presets (presets-compatible.json):

    • Focus on compatibility using H.264/MP4
    • Use bitrate-based encoding
    • Optimized for playing on a wide range of devices
    • Good default choice for mobile devices and browsers
  2. Quality Presets (presets-quality.json):

    • Focus on quality using HEVC/MKV
    • Use CRF-based encoding for better quality/size ratio
    • May require more device-specific support
    • Better for saving space while maintaining high quality

Path Mappings

Path mappings are critical when running Squishy in Docker alongside a media server (Jellyfin/Plex). They map paths between different containers and the host system.

Example:

"path_mappings": {
  "/movies": "/media/movies",
  "/tv": "/media/tv"
}

This maps the path /movies (as seen by your media server) to /media/movies (as seen by Squishy). You can avoid having to create path mappings by having your media server container and Squishy container use the same internal path for accessing your media.

Library Selection

The enabled_libraries setting defines which libraries from your media server should be included in Squishy:

"enabled_libraries": {
  "library_id_1": true,
  "library_id_2": false,
  "library_id_3": true
}

Only libraries marked as true will be scanned and included in Squishy's interface.

Accessing the Admin Interface

After configuration, you can access the admin interface at http://your-host:5101/admin to further customize settings, manage presets, and monitor transcoding jobs.