{
  "id": "yle-dl",
  "name": "yle-dl",
  "homepage": "https://github.com/aajanki/yle-dl",
  "description": "Download videos from Yle servers",
  "executables": [
    "yle-dl"
  ],
  "dotfiles": {
    "paths": [
      "~/.yledl.conf",
      "~/.config/yledl.conf"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Download from Yle",
    "description": "Download an Areena or Elava arkisto stream, or print its URL or title. Config-file, proxy, post-processing and live-stream seek options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "readme",
        "kind": "help",
        "url": "https://raw.githubusercontent.com/aajanki/yle-dl/HEAD/README.md",
        "revision": "2026-10-27",
        "evidence": "yle-dl [options] URL\n* `-o filename`       Save stream to the named file\n* `--latestepisode`   Download the latest episodes\n* `--showurl`         Print the URL of the stream, don't download\n* `--showtitle`       Print stream title, don't download\n* `--sublang lang`    Disable subtitles if lang is \"none\"\n* `--subtitles-only`  Download only subtitle file, skip video and audio\n* `--resolution res`  Maximum vertical resolution in pixels\n* `--maxbitrate br`   Maximum bitrate stream to download, integer in kB/s or \"best\" or \"worst\". Not all streams support limited bitrates.\n* `--destdir dir`     Save files to dir\n* `--pipe`            Dump stream to stdout for piping to media player. E.g. `yle-dl --pipe URL | vlc -`.\n* `-V, --verbose`     Show verbose debug output\n"
      }
    ],
    "field": [
      {
        "id": "url",
        "label": "Areena or Elava arkisto URL",
        "type": "url",
        "position": 0,
        "sources": [
          "readme"
        ]
      },
      {
        "id": "output",
        "label": "Output file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "output"
        },
        "option": [
          "-o"
        ],
        "effect": "overwrite",
        "sources": [
          "readme"
        ]
      },
      {
        "id": "destdir",
        "label": "Destination directory",
        "type": "path",
        "path": {
          "kind": "directory",
          "role": "output"
        },
        "option": [
          "--destdir"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "latest",
        "label": "Latest episode only",
        "type": "boolean",
        "option": [
          "--latestepisode"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "resolution",
        "label": "Max vertical resolution (pixels)",
        "type": "integer",
        "option": [
          "--resolution"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "maxbitrate",
        "label": "Max bitrate (kB/s, best or worst)",
        "type": "string",
        "option": [
          "--maxbitrate"
        ],
        "suggestions": [
          {
            "value": "best",
            "label": "Best"
          },
          {
            "value": "worst",
            "label": "Worst"
          }
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "sublang",
        "label": "Subtitle language (none disables)",
        "type": "string",
        "option": [
          "--sublang"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "subtitles_only",
        "label": "Subtitles only",
        "type": "boolean",
        "option": [
          "--subtitles-only"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "showurl",
        "label": "Print stream URL, do not download",
        "type": "boolean",
        "option": [
          "--showurl"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "showtitle",
        "label": "Print title, do not download",
        "type": "boolean",
        "option": [
          "--showtitle"
        ],
        "sources": [
          "readme"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose output",
        "type": "boolean",
        "option": [
          "--verbose",
          "-V"
        ],
        "sources": [
          "readme"
        ]
      }
    ],
    "task": [
      {
        "id": "download",
        "label": "Download a stream",
        "fields": [
          "url",
          "output",
          "destdir",
          "resolution",
          "latest"
        ],
        "required": [
          "url"
        ]
      },
      {
        "id": "show_url",
        "label": "Show stream URL",
        "fields": [
          "url",
          "showurl"
        ],
        "required": [
          "url",
          "showurl"
        ],
        "set": {
          "showurl": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "url",
          "output",
          "destdir",
          "latest",
          "showurl",
          "showtitle"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "resolution",
          "maxbitrate",
          "sublang",
          "subtitles_only",
          "verbose"
        ]
      }
    ]
  }
}
