ytdlp

package module
v0.0.0-...-faf802e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 24 Imported by: 10

README ΒΆ

logo

πŸ”— Table of Contents

✨ Features

!!! NOTE: go-ytdlp isn't stable yet, and as such, there may be wide-reaching breaking changes, until 1.0.0 !!!

  • CLI bindings for yt-dlp -- including all flags/commands.
  • Optional Install and MustInstall helpers to auto-download the latest supported version of yt-dlp, including proper checksum validation for secure downloads.
    • Worry less about making sure yt-dlp is installed wherever go-ytdlp is running from!
  • Carried over help documentation for all functions/methods.
  • Flags with arguments have type mappings according to what the actual flags expect.
  • Completely generated, ensuring it's easy to update to future yt-dlp versions.
  • Deprecated flags are marked as deprecated in a way that should be caught by most IDEs/linters.
  • Stdout/Stderr parsing, with timestamps, and optional JSON post-processing.

✨ Help Documentation Example

help documentation example


βš™ Usage

go get -u github.com/lrstanley/go-ytdlp@latest

πŸ‘ Examples

Simple

See also _examples/simple/main.go, which includes writing results (stdout/stderr/etc) as JSON.

package main

import (
	"context"

	"github.com/lrstanley/go-ytdlp"
)

func main() {
	// If yt-dlp isn't installed yet, download and cache it for further use.
	ytdlp.MustInstall(context.TODO(), nil)

	dl := ytdlp.New().
		FormatSort("res,ext:mp4:m4a").
		RecodeVideo("mp4").
		Output("%(extractor)s - %(title)s.%(ext)s")

	_, err := dl.Run(context.TODO(), "https://www.youtube.com/watch?v=dQw4w9WgXcQ")
	if err != nil {
		panic(err)
	}
}

πŸ™‹β™‚ Support & Assistance

  • ❀ Please review the Code of Conduct for guidelines on ensuring everyone has the best experience interacting with the community.
  • πŸ™‹β™‚ Take a look at the support document on guidelines for tips on how to ask the right questions.
  • 🐞 For all features/bugs/issues/questions/etc, head over here.

🀝 Contributing

  • ❀ Please review the Code of Conduct for guidelines on ensuring everyone has the best experience interacting with the community.
  • πŸ“‹ Please review the contributing doc for submitting issues/a guide on submitting pull requests and helping out.
  • πŸ— For anything security related, please review this repositories security policy.

βš– License

MIT License

Copyright (c) 2023 Liam Stanley <liam@liam.sh>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Also located here

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

View Source
const (
	// Channel of yt-dlp that go-ytdlp was generated with.
	Channel = "stable"

	// Version of yt-dlp that go-ytdlp was generated with.
	Version = "2024.12.03"
)

Variables ΒΆ

View Source
var SupportedExtractors = []*Extractor{}/* 1845 elements not displayed */

Functions ΒΆ

func IsExitCodeError ΒΆ

func IsExitCodeError(err error) bool

IsExitCodeError returns true when the exit code of the yt-dlp process is non-zero.

func IsMisconfigError ΒΆ

func IsMisconfigError(err error) bool

IsMisconfigError returns true when the yt-dlp executable is not found, or is not configured properly.

func IsParsingError ΒΆ

func IsParsingError(err error) bool

IsParsingError returns true when the yt-dlp process fails due to an invalid flag or argument, possibly due to a version mismatch or go-ytdlp bug.

func IsUnknownError ΒΆ

func IsUnknownError(err error) bool

IsUnknownError returns true when the error is unknown according to go-ytdlp.

func MustInstall ΒΆ

func MustInstall(ctx context.Context, opts *InstallOptions)

MustInstall is the same as Install, but will panic if an error occurs (essentially ensuring yt-dlp is installed, before continuing), and doesn't return any results.

Types ΒΆ

type Command ΒΆ

type Command struct {
	// contains filtered or unexported fields
}

func New ΒΆ

func New() *Command

New is the recommended way to return a new yt-dlp command builder. Once all flags are set, you can call [Run] to invoke yt-dlp with the necessary args, or the independent execution method (e.g. Version).

func (*Command) AbortOnError ΒΆ

func (c *Command) AbortOnError() *Command

Abort downloading of further videos if an error occurs

Additional information:

  • See Command.UnsetAbortOnError, for unsetting the flag.
  • AbortOnError maps to cli flags: --abort-on-error/--no-ignore-errors.
  • From option group: "General"

func (*Command) AbortOnUnavailableFragments ΒΆ

func (c *Command) AbortOnUnavailableFragments() *Command

Abort download if a fragment is unavailable

Additional information:

  • See Command.UnsetAbortOnUnavailableFragments, for unsetting the flag.
  • AbortOnUnavailableFragments maps to cli flags: --abort-on-unavailable-fragments/--no-skip-unavailable-fragments.
  • From option group: "Download"

func (*Command) AddHeaders ΒΆ

func (c *Command) AddHeaders(fieldvalue string) *Command

Specify a custom HTTP header and its value, separated by a colon ":". You can use this option multiple times

Additional information:

  • See Command.UnsetAddHeaders, for unsetting the flag.
  • AddHeaders maps to cli flags: --add-headers=FIELD:VALUE.
  • From option group: "Workarounds"

func (*Command) AgeLimit ΒΆ

func (c *Command) AgeLimit(years int) *Command

Download only videos suitable for the given age

Additional information:

  • See Command.UnsetAgeLimit, for unsetting the flag.
  • AgeLimit maps to cli flags: --age-limit=YEARS.
  • From option group: "Video Selection"

func (*Command) AllFormats ΒΆ

func (c *Command) AllFormats() *Command

AllFormats sets the "all-formats" flag (no description specified).

Additional information:

  • See Command.UnsetAllFormats, for unsetting the flag.
  • AllFormats maps to cli flags: --all-formats (hidden).
  • From option group: "Video Format"

func (*Command) AllSubs ΒΆ

func (c *Command) AllSubs() *Command

AllSubs sets the "all-subs" flag (no description specified).

Additional information:

  • See Command.UnsetAllSubs, for unsetting the flag.
  • AllSubs maps to cli flags: --all-subs (hidden).
  • From option group: "Subtitle"

func (*Command) AllowDynamicMPD ΒΆ

func (c *Command) AllowDynamicMPD() *Command

Process dynamic DASH manifests (default)

Additional information:

  • See Command.UnsetAllowDynamicMPD, for unsetting the flag.
  • AllowDynamicMPD maps to cli flags: --allow-dynamic-mpd/--no-ignore-dynamic-mpd.
  • From option group: "Extractor"

func (*Command) ApListMSO ΒΆ

func (c *Command) ApListMSO() *Command

List all supported multiple-system operators

Additional information:

  • See Command.UnsetApListMSO, for unsetting the flag.
  • ApListMSO maps to cli flags: --ap-list-mso.
  • From option group: "Authentication"

func (*Command) ApMSO ΒΆ

func (c *Command) ApMSO(mso string) *Command

Adobe Pass multiple-system operator (TV provider) identifier, use --ap-list-mso for a list of available MSOs

Additional information:

  • See Command.UnsetApMSO, for unsetting the flag.
  • ApMSO maps to cli flags: --ap-mso=MSO.
  • From option group: "Authentication"

func (*Command) ApPassword ΒΆ

func (c *Command) ApPassword(password string) *Command

Multiple-system operator account password. If this option is left out, yt-dlp will ask interactively

Additional information:

  • See Command.UnsetApPassword, for unsetting the flag.
  • ApPassword maps to cli flags: --ap-password=PASSWORD.
  • From option group: "Authentication"

func (*Command) ApUsername ΒΆ

func (c *Command) ApUsername(username string) *Command

Multiple-system operator account login

Additional information:

  • See Command.UnsetApUsername, for unsetting the flag.
  • ApUsername maps to cli flags: --ap-username=USERNAME.
  • From option group: "Authentication"

func (*Command) AudioFormat ΒΆ

func (c *Command) AudioFormat(format string) *Command

Format to convert the audio to when -x is used. (currently supported: best (default), aac, alac, flac, m4a, mp3, opus, vorbis, wav). You can specify multiple rules using similar syntax as --remux-video

Additional information:

  • See Command.UnsetAudioFormat, for unsetting the flag.
  • AudioFormat maps to cli flags: --audio-format=FORMAT.
  • From option group: "Post-Processing"

func (*Command) AudioMultistreams ΒΆ

func (c *Command) AudioMultistreams() *Command

Allow multiple audio streams to be merged into a single file

References:

Additional information:

  • See Command.UnsetAudioMultistreams, for unsetting the flag.
  • AudioMultistreams maps to cli flags: --audio-multistreams.
  • From option group: "Video Format"

func (*Command) AudioQuality ΒΆ

func (c *Command) AudioQuality(quality string) *Command

Specify ffmpeg audio quality to use when converting the audio with -x. Insert a value between 0 (best) and 10 (worst) for VBR or a specific bitrate like 128K (default 5)

Additional information:

  • See Command.UnsetAudioQuality, for unsetting the flag.
  • AudioQuality maps to cli flags: --audio-quality=QUALITY.
  • From option group: "Post-Processing"

func (*Command) AutoNumberSize ΒΆ

func (c *Command) AutoNumberSize(number int) *Command

AutoNumberSize sets the "autonumber-size" flag (no description specified).

Additional information:

  • See Command.UnsetAutoNumberSize, for unsetting the flag.
  • AutoNumberSize maps to cli flags: --autonumber-size=NUMBER (hidden).
  • From option group: "Filesystem"

func (*Command) AutoNumberStart ΒΆ

func (c *Command) AutoNumberStart(number int) *Command

AutoNumberStart sets the "autonumber-start" flag (no description specified).

Additional information:

  • See Command.UnsetAutoNumberStart, for unsetting the flag.
  • AutoNumberStart maps to cli flags: --autonumber-start=NUMBER (hidden).
  • From option group: "Filesystem"

func (*Command) BatchFile ΒΆ

func (c *Command) BatchFile(file string) *Command

File containing URLs to download ("-" for stdin), one URL per line. Lines starting with "#", ";" or "]" are considered as comments and ignored

Additional information:

  • See Command.UnsetBatchFile, for unsetting the flag.
  • BatchFile maps to cli flags: -a/--batch-file=FILE.
  • From option group: "Filesystem"

func (*Command) BidiWorkaround ΒΆ

func (c *Command) BidiWorkaround() *Command

Work around terminals that lack bidirectional text support. Requires bidiv or fribidi executable in PATH

Additional information:

  • See Command.UnsetBidiWorkaround, for unsetting the flag.
  • BidiWorkaround maps to cli flags: --bidi-workaround.
  • From option group: "Workarounds"

func (*Command) BreakMatchFilters ΒΆ

func (c *Command) BreakMatchFilters(filter string) *Command

Same as "--match-filters" but stops the download process when a video is rejected

Additional information:

  • See Command.UnsetBreakMatchFilters, for unsetting the flag.
  • BreakMatchFilters maps to cli flags: --break-match-filters=FILTER.
  • From option group: "Video Selection"

func (*Command) BreakOnExisting ΒΆ

func (c *Command) BreakOnExisting() *Command

Stop the download process when encountering a file that is in the archive supplied with the --download-archive option

Additional information:

  • See Command.UnsetBreakOnExisting, for unsetting the flag.
  • BreakOnExisting maps to cli flags: --break-on-existing.
  • From option group: "Video Selection"

func (*Command) BreakOnReject ΒΆ

func (c *Command) BreakOnReject() *Command

BreakOnReject sets the "break-on-reject" flag (no description specified).

Additional information:

  • See Command.UnsetBreakOnReject, for unsetting the flag.
  • BreakOnReject maps to cli flags: --break-on-reject (hidden).
  • From option group: "Video Selection"

func (*Command) BreakPerInput ΒΆ

func (c *Command) BreakPerInput() *Command

Alters --max-downloads, --break-on-existing, --break-match-filters, and autonumber to reset per input URL

Additional information:

  • See Command.UnsetBreakPerInput, for unsetting the flag.
  • BreakPerInput maps to cli flags: --break-per-input.
  • From option group: "Video Selection"

func (*Command) BufferSize ΒΆ

func (c *Command) BufferSize(size string) *Command

Size of download buffer, e.g. 1024 or 16K (default is 1024)

Additional information:

  • See Command.UnsetBufferSize, for unsetting the flag.
  • BufferSize maps to cli flags: --buffer-size=SIZE.
  • From option group: "Download"

func (*Command) CNVerificationProxy deprecated

func (c *Command) CNVerificationProxy(url string) *Command

CNVerificationProxy sets the "cn-verification-proxy" flag (no description specified).

Additional information:

  • See Command.UnsetCNVerificationProxy, for unsetting the flag.
  • CNVerificationProxy maps to cli flags: --cn-verification-proxy=URL (hidden).
  • From option group: "Geo-restriction"

Deprecated: Use Command.GeoVerificationProxy instead.

func (*Command) CacheDir ΒΆ

func (c *Command) CacheDir(dir string) *Command

Location in the filesystem where yt-dlp can store some downloaded information (such as client ids and signatures) permanently. By default ${XDG_CACHE_HOME}/yt-dlp

Additional information:

  • See Command.UnsetCacheDir, for unsetting the flag.
  • CacheDir maps to cli flags: --cache-dir=DIR.
  • From option group: "Filesystem"

func (*Command) CallHome deprecated

func (c *Command) CallHome() *Command

CallHome sets the "call-home" flag (no description specified).

Additional information:

  • See Command.UnsetCallHome, for unsetting the flag.
  • CallHome maps to cli flags: -C/--call-home (hidden).
  • From option group: "Verbosity Simulation"

Deprecated: Not implemented.

func (*Command) CheckAllFormats ΒΆ

func (c *Command) CheckAllFormats() *Command

Check all formats for whether they are actually downloadable

Additional information:

  • See Command.UnsetCheckAllFormats, for unsetting the flag.
  • CheckAllFormats maps to cli flags: --check-all-formats.
  • From option group: "Video Format"

func (*Command) CheckFormats ΒΆ

func (c *Command) CheckFormats() *Command

Make sure formats are selected only from those that are actually downloadable

Additional information:

  • See Command.UnsetCheckFormats, for unsetting the flag.
  • CheckFormats maps to cli flags: --check-formats.
  • From option group: "Video Format"

func (*Command) CleanInfoJSON ΒΆ

func (c *Command) CleanInfoJSON() *Command

Remove some internal metadata such as filenames from the infojson (default)

Additional information:

  • See Command.UnsetCleanInfoJSON, for unsetting the flag.
  • CleanInfoJSON maps to cli flags: --clean-info-json/--clean-infojson.
  • From option group: "Filesystem"

func (*Command) ClientCertificate ΒΆ

func (c *Command) ClientCertificate(certfile string) *Command

Path to client certificate file in PEM format. May include the private key

Additional information:

  • See Command.UnsetClientCertificate, for unsetting the flag.
  • ClientCertificate maps to cli flags: --client-certificate=CERTFILE.
  • From option group: "Authentication"

func (*Command) ClientCertificateKey ΒΆ

func (c *Command) ClientCertificateKey(keyfile string) *Command

Path to private key file for client certificate

Additional information:

  • See Command.UnsetClientCertificateKey, for unsetting the flag.
  • ClientCertificateKey maps to cli flags: --client-certificate-key=KEYFILE.
  • From option group: "Authentication"

func (*Command) ClientCertificatePassword ΒΆ

func (c *Command) ClientCertificatePassword(password string) *Command

Password for client certificate private key, if encrypted. If not provided, and the key is encrypted, yt-dlp will ask interactively

Additional information:

  • See Command.UnsetClientCertificatePassword, for unsetting the flag.
  • ClientCertificatePassword maps to cli flags: --client-certificate-password=PASSWORD.
  • From option group: "Authentication"

func (*Command) Clone ΒΆ

func (c *Command) Clone() *Command

Clone returns a copy of the command, with all flags, env vars, executable, and working directory copied over.

func (*Command) Color ΒΆ

func (c *Command) Color(policy string) *Command

Whether to emit color codes in output, optionally prefixed by the STREAM (stdout or stderr) to apply the setting to. Can be one of "always", "auto" (default), "never", or "no_color" (use non color terminal sequences). Use "auto-tty" or "no_color-tty" to decide based on terminal support only. Can be used multiple times

Additional information:

  • See Command.UnsetColor, for unsetting the flag.
  • Color maps to cli flags: --color=[STREAM:]POLICY.
  • From option group: "General"

func (*Command) CompatOptions ΒΆ

func (c *Command) CompatOptions(opts string) *Command

Options that can help keep compatibility with youtube-dl or youtube-dlc configurations by reverting some of the changes made in yt-dlp. See "Differences in default behavior" for details

References:

Additional information:

  • See Command.UnsetCompatOptions, for unsetting the flag.
  • CompatOptions maps to cli flags: --compat-options=OPTS.
  • From option group: "General"

func (*Command) ConcatPlaylist ΒΆ

func (c *Command) ConcatPlaylist(policy ConcatPlaylistOption) *Command

Concatenate videos in a playlist. One of "never", "always", or "multi_video" (default; only when the videos form a single show). All the video files must have the same codecs and number of streams to be concatenable. The "pl_video:" prefix can be used with "--paths" and "--output" to set the output filename for the concatenated files. See "OUTPUT TEMPLATE" for details

References:

Additional information:

  • See Command.UnsetConcatPlaylist, for unsetting the flag.
  • ConcatPlaylist maps to cli flags: --concat-playlist=POLICY.
  • From option group: "Post-Processing"

func (*Command) ConcurrentFragments ΒΆ

func (c *Command) ConcurrentFragments(n int) *Command

Number of fragments of a dash/hlsnative video that should be downloaded concurrently (default is 1)

Additional information:

  • See Command.UnsetConcurrentFragments, for unsetting the flag.
  • ConcurrentFragments maps to cli flags: -N/--concurrent-fragments=N.
  • From option group: "Download"

func (*Command) ConfigLocations ΒΆ

func (c *Command) ConfigLocations(path string) *Command

Location of the main configuration file; either the path to the config or its containing directory ("-" for stdin). Can be used multiple times and inside other configuration files

Additional information:

  • See Command.UnsetConfigLocations, for unsetting the flag.
  • ConfigLocations maps to cli flags: --config-locations=PATH.
  • From option group: "General"

func (*Command) ConsoleTitle ΒΆ

func (c *Command) ConsoleTitle() *Command

Display progress in console titlebar

Additional information:

  • See Command.UnsetConsoleTitle, for unsetting the flag.
  • ConsoleTitle maps to cli flags: --console-title.
  • From option group: "Verbosity Simulation"

func (*Command) Continue ΒΆ

func (c *Command) Continue() *Command

Resume partially downloaded files/fragments (default)

Additional information:

  • See Command.UnsetContinue, for unsetting the flag.
  • Continue maps to cli flags: -c/--continue.
  • From option group: "Filesystem"

func (*Command) ConvertSubs ΒΆ

func (c *Command) ConvertSubs(format string) *Command

Convert the subtitles to another format (currently supported: ass, lrc, srt, vtt). Use "--convert-subs none" to disable conversion (default)

Additional information:

  • See Command.UnsetConvertSubs, for unsetting the flag.
  • ConvertSubs maps to cli flags: --convert-subs/--convert-sub/--convert-subtitles=FORMAT.
  • From option group: "Post-Processing"

func (*Command) ConvertThumbnails ΒΆ

func (c *Command) ConvertThumbnails(format string) *Command

Convert the thumbnails to another format (currently supported: jpg, png, webp). You can specify multiple rules using similar syntax as "--remux-video". Use "--convert-thumbnails none" to disable conversion (default)

Additional information:

  • See Command.UnsetConvertThumbnails, for unsetting the flag.
  • ConvertThumbnails maps to cli flags: --convert-thumbnails=FORMAT.
  • From option group: "Post-Processing"

func (*Command) Cookies ΒΆ

func (c *Command) Cookies(file string) *Command

Netscape formatted file to read cookies from and dump cookie jar in

Additional information:

  • See Command.UnsetCookies, for unsetting the flag.
  • Cookies maps to cli flags: --cookies=FILE.
  • From option group: "Filesystem"

func (*Command) CookiesFromBrowser ΒΆ

func (c *Command) CookiesFromBrowser(browser string) *Command

The name of the browser to load cookies from. Currently supported browsers are: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi, whale. Optionally, the KEYRING used for decrypting Chromium cookies on Linux, the name/path of the PROFILE to load cookies from, and the CONTAINER name (if Firefox) ("none" for no container) can be given with their respective separators. By default, all containers of the most recently accessed profile are used. Currently supported keyrings are: basictext, gnomekeyring, kwallet, kwallet5, kwallet6

Additional information:

  • See Command.UnsetCookiesFromBrowser, for unsetting the flag.
  • CookiesFromBrowser maps to cli flags: --cookies-from-browser=BROWSER[+KEYRING][:PROFILE][::CONTAINER].
  • From option group: "Filesystem"

func (*Command) Date ΒΆ

func (c *Command) Date(date string) *Command

Download only videos uploaded on this date. The date can be "YYYYMMDD" or in the format [now|today|yesterday][-N[day|week|month|year]]. E.g. "--date today-2weeks" downloads only videos uploaded on the same day two weeks ago

Additional information:

  • See Command.UnsetDate, for unsetting the flag.
  • Date maps to cli flags: --date=DATE.
  • From option group: "Video Selection"

func (*Command) DateAfter ΒΆ

func (c *Command) DateAfter(date string) *Command

Download only videos uploaded on or after this date. The date formats accepted are the same as --date

Additional information:

  • See Command.UnsetDateAfter, for unsetting the flag.
  • DateAfter maps to cli flags: --dateafter=DATE.
  • From option group: "Video Selection"

func (*Command) DateBefore ΒΆ

func (c *Command) DateBefore(date string) *Command

Download only videos uploaded on or before this date. The date formats accepted are the same as --date

Additional information:

  • See Command.UnsetDateBefore, for unsetting the flag.
  • DateBefore maps to cli flags: --datebefore=DATE.
  • From option group: "Video Selection"

func (*Command) DefaultSearch ΒΆ

func (c *Command) DefaultSearch(prefix string) *Command

Use this prefix for unqualified URLs. E.g. "gvsearch2:python" downloads two videos from google videos for the search term "python". Use the value "auto" to let yt-dlp guess ("auto_warning" to emit a warning when guessing). "error" just throws an error. The default value "fixup_error" repairs broken URLs, but emits an error if this is not possible instead of searching

Additional information:

  • See Command.UnsetDefaultSearch, for unsetting the flag.
  • DefaultSearch maps to cli flags: --default-search=PREFIX.
  • From option group: "General"

func (*Command) DownloadArchive ΒΆ

func (c *Command) DownloadArchive(file string) *Command

Download only videos not listed in the archive file. Record the IDs of all downloaded videos in it

Additional information:

  • See Command.UnsetDownloadArchive, for unsetting the flag.
  • DownloadArchive maps to cli flags: --download-archive=FILE.
  • From option group: "Video Selection"

func (*Command) DownloadSections ΒΆ

func (c *Command) DownloadSections(regex string) *Command

Download only chapters that match the regular expression. A "*" prefix denotes time-range instead of chapter. Negative timestamps are calculated from the end. "*from-url" can be used to download between the "start_time" and "end_time" extracted from the URL. Needs ffmpeg. This option can be used multiple times to download multiple sections, e.g. --download-sections "*10:15-inf" --download-sections "intro"

Additional information:

  • See Command.UnsetDownloadSections, for unsetting the flag.
  • DownloadSections maps to cli flags: --download-sections=REGEX.
  • From option group: "Download"

func (*Command) Downloader ΒΆ

func (c *Command) Downloader(name string) *Command

Name or path of the external downloader to use (optionally) prefixed by the protocols (http, ftp, m3u8, dash, rstp, rtmp, mms) to use it for. Currently supports native, aria2c, avconv, axel, curl, ffmpeg, httpie, wget. You can use this option multiple times to set different downloaders for different protocols. E.g. --downloader aria2c --downloader "dash,m3u8:native" will use aria2c for http/ftp downloads, and the native downloader for dash/m3u8 downloads

Additional information:

  • See Command.UnsetDownloader, for unsetting the flag.
  • Downloader maps to cli flags: --downloader/--external-downloader=[PROTO:]NAME.
  • From option group: "Download"

func (*Command) DownloaderArgs ΒΆ

func (c *Command) DownloaderArgs(nameargs string) *Command

Give these arguments to the external downloader. Specify the downloader name and the arguments separated by a colon ":". For ffmpeg, arguments can be passed to different positions using the same syntax as --postprocessor-args. You can use this option multiple times to give different arguments to different downloaders

Additional information:

  • See Command.UnsetDownloaderArgs, for unsetting the flag.
  • DownloaderArgs maps to cli flags: --downloader-args/--external-downloader-args=NAME:ARGS.
  • From option group: "Download"

func (*Command) DumpJSON ΒΆ

func (c *Command) DumpJSON() *Command

Quiet, but print JSON information for each video. Simulate unless --no-simulate is used. See "OUTPUT TEMPLATE" for a description of available keys

References:

Additional information:

  • See Command.UnsetDumpJSON, for unsetting the flag.
  • DumpJSON maps to cli flags: -j/--dump-json.
  • From option group: "Verbosity Simulation"

func (*Command) DumpPages ΒΆ

func (c *Command) DumpPages() *Command

Print downloaded pages encoded using base64 to debug problems (very verbose)

Additional information:

  • See Command.UnsetDumpPages, for unsetting the flag.
  • DumpPages maps to cli flags: --dump-pages/--dump-intermediate-pages.
  • From option group: "Verbosity Simulation"

func (*Command) DumpSingleJSON ΒΆ

func (c *Command) DumpSingleJSON() *Command

Quiet, but print JSON information for each URL or infojson passed. Simulate unless --no-simulate is used. If the URL refers to a playlist, the whole playlist information is dumped in a single line

Additional information:

  • See Command.UnsetDumpSingleJSON, for unsetting the flag.
  • DumpSingleJSON maps to cli flags: -J/--dump-single-json.
  • From option group: "Verbosity Simulation"

func (*Command) DumpUserAgent ΒΆ

func (c *Command) DumpUserAgent(ctx context.Context) (*Result, error)

Display the current user-agent and exit

Additional information:

  • DumpUserAgent maps to cli flags: --dump-user-agent.
  • From option group: "General"

func (*Command) EmbedChapters ΒΆ

func (c *Command) EmbedChapters() *Command

Add chapter markers to the video file

Additional information:

  • See Command.UnsetEmbedChapters, for unsetting the flag.
  • EmbedChapters maps to cli flags: --embed-chapters/--add-chapters.
  • From option group: "Post-Processing"

func (*Command) EmbedInfoJSON ΒΆ

func (c *Command) EmbedInfoJSON() *Command

Embed the infojson as an attachment to mkv/mka video files

Additional information:

  • See Command.UnsetEmbedInfoJSON, for unsetting the flag.
  • EmbedInfoJSON maps to cli flags: --embed-info-json.
  • From option group: "Post-Processing"

func (*Command) EmbedMetadata ΒΆ

func (c *Command) EmbedMetadata() *Command

Embed metadata to the video file. Also embeds chapters/infojson if present unless --no-embed-chapters/--no-embed-info-json are used

Additional information:

  • See Command.UnsetEmbedMetadata, for unsetting the flag.
  • EmbedMetadata maps to cli flags: --embed-metadata/--add-metadata.
  • From option group: "Post-Processing"

func (*Command) EmbedSubs ΒΆ

func (c *Command) EmbedSubs() *Command

Embed subtitles in the video (only for mp4, webm and mkv videos)

Additional information:

  • See Command.UnsetEmbedSubs, for unsetting the flag.
  • EmbedSubs maps to cli flags: --embed-subs.
  • From option group: "Post-Processing"

func (*Command) EmbedThumbnail ΒΆ

func (c *Command) EmbedThumbnail() *Command

Embed thumbnail in the video as cover art

Additional information:

  • See Command.UnsetEmbedThumbnail, for unsetting the flag.
  • EmbedThumbnail maps to cli flags: --embed-thumbnail.
  • From option group: "Post-Processing"

func (*Command) EnableFileURLs ΒΆ

func (c *Command) EnableFileURLs() *Command

Enable file:// URLs. This is disabled by default for security reasons.

Additional information:

  • See Command.UnsetEnableFileURLs, for unsetting the flag.
  • EnableFileURLs maps to cli flags: --enable-file-urls.
  • From option group: "Network"

func (*Command) Encoding ΒΆ

func (c *Command) Encoding(encoding string) *Command

Force the specified encoding (experimental)

Additional information:

  • See Command.UnsetEncoding, for unsetting the flag.
  • Encoding maps to cli flags: --encoding=ENCODING.
  • From option group: "Workarounds"

func (*Command) Exec ΒΆ

func (c *Command) Exec(cmd string) *Command

Execute a command, optionally prefixed with when to execute it, separated by a ":". Supported values of "WHEN" are the same as that of --use-postprocessor (default: after_move). The same syntax as the output template can be used to pass any field as arguments to the command. If no fields are passed, %(filepath,_filename|)q is appended to the end of the command. This option can be used multiple times

Additional information:

  • See Command.UnsetExec, for unsetting the flag.
  • Exec maps to cli flags: --exec=[WHEN:]CMD.
  • From option group: "Post-Processing"

func (*Command) ExecBeforeDownload ΒΆ

func (c *Command) ExecBeforeDownload(cmd string) *Command

ExecBeforeDownload sets the "exec-before-download" flag (no description specified).

Additional information:

  • See Command.UnsetExecBeforeDownload, for unsetting the flag.
  • ExecBeforeDownload maps to cli flags: --exec-before-download=CMD (hidden).
  • From option group: "Post-Processing"

func (*Command) ExtractAudio ΒΆ

func (c *Command) ExtractAudio() *Command

Convert video files to audio-only files (requires ffmpeg and ffprobe)

Additional information:

  • See Command.UnsetExtractAudio, for unsetting the flag.
  • ExtractAudio maps to cli flags: -x/--extract-audio.
  • From option group: "Post-Processing"

func (*Command) ExtractorArgs ΒΆ

func (c *Command) ExtractorArgs(ieKeyargs string) *Command

Pass ARGS arguments to the IE_KEY extractor. See "EXTRACTOR ARGUMENTS" for details. You can use this option multiple times to give arguments for different extractors

References:

Additional information:

  • See Command.UnsetExtractorArgs, for unsetting the flag.
  • ExtractorArgs maps to cli flags: --extractor-args=IE_KEY:ARGS.
  • From option group: "Extractor"

func (*Command) ExtractorDescriptions ΒΆ

func (c *Command) ExtractorDescriptions(ctx context.Context) (*Result, error)

Output descriptions of all supported extractors and exit

Additional information:

  • ExtractorDescriptions maps to cli flags: --extractor-descriptions.
  • From option group: "General"

func (*Command) ExtractorRetries ΒΆ

func (c *Command) ExtractorRetries(retries string) *Command

Number of retries for known extractor errors (default is 3), or "infinite"

Additional information:

  • See Command.UnsetExtractorRetries, for unsetting the flag.
  • ExtractorRetries maps to cli flags: --extractor-retries=RETRIES.
  • From option group: "Extractor"

func (*Command) FFmpegLocation ΒΆ

func (c *Command) FFmpegLocation(path string) *Command

Location of the ffmpeg binary; either the path to the binary or its containing directory

Additional information:

  • See Command.UnsetFFmpegLocation, for unsetting the flag.
  • FFmpegLocation maps to cli flags: --ffmpeg-location/--avconv-location=PATH.
  • From option group: "Post-Processing"

func (*Command) FileAccessRetries ΒΆ

func (c *Command) FileAccessRetries(retries string) *Command

Number of times to retry on file access error (default is 3), or "infinite"

Additional information:

  • See Command.UnsetFileAccessRetries, for unsetting the flag.
  • FileAccessRetries maps to cli flags: --file-access-retries=RETRIES.
  • From option group: "Download"

func (*Command) Fixup ΒΆ

func (c *Command) Fixup(policy FixupOption) *Command

Automatically correct known faults of the file. One of never (do nothing), warn (only emit a warning), detect_or_warn (the default; fix the file if we can, warn otherwise), force (try fixing even if the file already exists)

Additional information:

  • See Command.UnsetFixup, for unsetting the flag.
  • Fixup maps to cli flags: --fixup=POLICY.
  • From option group: "Post-Processing"

func (*Command) FlatPlaylist ΒΆ

func (c *Command) FlatPlaylist() *Command

Do not extract a playlist's URL result entries; some entry metadata may be missing and downloading may be bypassed

Additional information:

  • See Command.UnsetFlatPlaylist, for unsetting the flag.
  • FlatPlaylist maps to cli flags: --flat-playlist.
  • From option group: "General"

func (*Command) ForceGenericExtractor ΒΆ

func (c *Command) ForceGenericExtractor() *Command

ForceGenericExtractor sets the "force-generic-extractor" flag (no description specified).

Additional information:

  • See Command.UnsetForceGenericExtractor, for unsetting the flag.
  • ForceGenericExtractor maps to cli flags: --force-generic-extractor (hidden).
  • From option group: "General"

func (*Command) ForceIPv4 ΒΆ

func (c *Command) ForceIPv4() *Command

Make all connections via IPv4

Additional information:

  • See Command.UnsetForceIPv4, for unsetting the flag.
  • ForceIPv4 maps to cli flags: -4/--force-ipv4.
  • From option group: "Network"

func (*Command) ForceIPv6 ΒΆ

func (c *Command) ForceIPv6() *Command

Make all connections via IPv6

Additional information:

  • See Command.UnsetForceIPv6, for unsetting the flag.
  • ForceIPv6 maps to cli flags: -6/--force-ipv6.
  • From option group: "Network"

func (*Command) ForceKeyframesAtCuts ΒΆ

func (c *Command) ForceKeyframesAtCuts() *Command

Force keyframes at cuts when downloading/splitting/removing sections. This is slow due to needing a re-encode, but the resulting video may have fewer artifacts around the cuts

Additional information:

  • See Command.UnsetForceKeyframesAtCuts, for unsetting the flag.
  • ForceKeyframesAtCuts maps to cli flags: --force-keyframes-at-cuts.
  • From option group: "Post-Processing"

func (*Command) ForceOverwrites ΒΆ

func (c *Command) ForceOverwrites() *Command

Overwrite all video and metadata files. This option includes --no-continue

Additional information:

  • See Command.UnsetForceOverwrites, for unsetting the flag.
  • ForceOverwrites maps to cli flags: --force-overwrites/--yes-overwrites.
  • From option group: "Filesystem"

func (*Command) ForceWriteArchive ΒΆ

func (c *Command) ForceWriteArchive() *Command

Force download archive entries to be written as far as no errors occur, even if -s or another simulation option is used

Additional information:

  • See Command.UnsetForceWriteArchive, for unsetting the flag.
  • ForceWriteArchive maps to cli flags: --force-write-archive/--force-write-download-archive/--force-download-archive.
  • From option group: "Verbosity Simulation"

func (*Command) Format ΒΆ

func (c *Command) Format(format string) *Command

Video format code, see "FORMAT SELECTION" for more details

References:

Additional information:

  • See Command.UnsetFormat, for unsetting the flag.
  • Format maps to cli flags: -f/--format=FORMAT.
  • From option group: "Video Format"

func (*Command) FormatSort ΒΆ

func (c *Command) FormatSort(sortorder string) *Command

Sort the formats by the fields given, see "Sorting Formats" for more details

References:

Additional information:

  • See Command.UnsetFormatSort, for unsetting the flag.
  • FormatSort maps to cli flags: -S/--format-sort=SORTORDER.
  • From option group: "Video Format"

func (*Command) FormatSortForce ΒΆ

func (c *Command) FormatSortForce() *Command

Force user specified sort order to have precedence over all fields, see "Sorting Formats" for more details

References:

Additional information:

  • See Command.UnsetFormatSortForce, for unsetting the flag.
  • FormatSortForce maps to cli flags: --format-sort-force/--S-force=FORMAT.
  • From option group: "Video Format"

func (*Command) FragmentRetries ΒΆ

func (c *Command) FragmentRetries(retries string) *Command

Number of retries for a fragment (default is 10), or "infinite" (DASH, hlsnative and ISM)

Additional information:

  • See Command.UnsetFragmentRetries, for unsetting the flag.
  • FragmentRetries maps to cli flags: --fragment-retries=RETRIES.
  • From option group: "Download"

func (*Command) GeoBypass ΒΆ

func (c *Command) GeoBypass() *Command

GeoBypass sets the "geo-bypass" flag (no description specified).

Additional information:

  • See Command.UnsetGeoBypass, for unsetting the flag.
  • GeoBypass maps to cli flags: --geo-bypass (hidden).
  • From option group: "Geo-restriction"

func (*Command) GeoBypassCountry ΒΆ

func (c *Command) GeoBypassCountry(code string) *Command

GeoBypassCountry sets the "geo-bypass-country" flag (no description specified).

Additional information:

  • See Command.UnsetGeoBypassCountry, for unsetting the flag.
  • GeoBypassCountry maps to cli flags: --geo-bypass-country=CODE (hidden).
  • From option group: "Geo-restriction"

func (*Command) GeoBypassIPBlock ΒΆ

func (c *Command) GeoBypassIPBlock(ipBlock string) *Command

GeoBypassIPBlock sets the "geo-bypass-ip-block" flag (no description specified).

Additional information:

  • See Command.UnsetGeoBypassIPBlock, for unsetting the flag.
  • GeoBypassIPBlock maps to cli flags: --geo-bypass-ip-block=IP_BLOCK (hidden).
  • From option group: "Geo-restriction"

func (*Command) GeoVerificationProxy ΒΆ

func (c *Command) GeoVerificationProxy(url string) *Command

Use this proxy to verify the IP address for some geo-restricted sites. The default proxy specified by --proxy (or none, if the option is not present) is used for the actual downloading

Additional information:

  • See Command.UnsetGeoVerificationProxy, for unsetting the flag.
  • GeoVerificationProxy maps to cli flags: --geo-verification-proxy=URL.
  • From option group: "Geo-restriction"

func (*Command) GetDescription ΒΆ

func (c *Command) GetDescription() *Command

GetDescription sets the "get-description" flag (no description specified).

Additional information:

  • See Command.UnsetGetDescription, for unsetting the flag.
  • GetDescription maps to cli flags: --get-description (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetDuration ΒΆ

func (c *Command) GetDuration() *Command

GetDuration sets the "get-duration" flag (no description specified).

Additional information:

  • See Command.UnsetGetDuration, for unsetting the flag.
  • GetDuration maps to cli flags: --get-duration (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetFilename ΒΆ

func (c *Command) GetFilename() *Command

GetFilename sets the "get-filename" flag (no description specified).

Additional information:

  • See Command.UnsetGetFilename, for unsetting the flag.
  • GetFilename maps to cli flags: --get-filename (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetFormat ΒΆ

func (c *Command) GetFormat() *Command

GetFormat sets the "get-format" flag (no description specified).

Additional information:

  • See Command.UnsetGetFormat, for unsetting the flag.
  • GetFormat maps to cli flags: --get-format (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetID ΒΆ

func (c *Command) GetID() *Command

GetID sets the "get-id" flag (no description specified).

Additional information:

  • See Command.UnsetGetID, for unsetting the flag.
  • GetID maps to cli flags: --get-id (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetThumbnail ΒΆ

func (c *Command) GetThumbnail() *Command

GetThumbnail sets the "get-thumbnail" flag (no description specified).

Additional information:

  • See Command.UnsetGetThumbnail, for unsetting the flag.
  • GetThumbnail maps to cli flags: --get-thumbnail (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetTitle ΒΆ

func (c *Command) GetTitle() *Command

GetTitle sets the "get-title" flag (no description specified).

Additional information:

  • See Command.UnsetGetTitle, for unsetting the flag.
  • GetTitle maps to cli flags: -e/--get-title (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) GetURL ΒΆ

func (c *Command) GetURL() *Command

GetURL sets the "get-url" flag (no description specified).

Additional information:

  • See Command.UnsetGetURL, for unsetting the flag.
  • GetURL maps to cli flags: -g/--get-url (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) HLSPreferFFmpeg ΒΆ

func (c *Command) HLSPreferFFmpeg() *Command

HLSPreferFFmpeg sets the "hls-prefer-ffmpeg" flag (no description specified).

Additional information:

  • See Command.UnsetHLSPreferFFmpeg, for unsetting the flag.
  • HLSPreferFFmpeg maps to cli flags: --hls-prefer-ffmpeg (hidden).
  • From option group: "Download"

func (*Command) HLSPreferNative ΒΆ

func (c *Command) HLSPreferNative() *Command

HLSPreferNative sets the "hls-prefer-native" flag (no description specified).

Additional information:

  • See Command.UnsetHLSPreferNative, for unsetting the flag.
  • HLSPreferNative maps to cli flags: --hls-prefer-native (hidden).
  • From option group: "Download"

func (*Command) HLSSplitDiscontinuity ΒΆ

func (c *Command) HLSSplitDiscontinuity() *Command

Split HLS playlists to different formats at discontinuities such as ad breaks

Additional information:

func (*Command) HLSUseMPEGTS ΒΆ

func (c *Command) HLSUseMPEGTS() *Command

Use the mpegts container for HLS videos; allowing some players to play the video while downloading, and reducing the chance of file corruption if download is interrupted. This is enabled by default for live streams

Additional information:

  • See Command.UnsetHLSUseMPEGTS, for unsetting the flag.
  • HLSUseMPEGTS maps to cli flags: --hls-use-mpegts.
  • From option group: "Download"

func (*Command) HTTPChunkSize ΒΆ

func (c *Command) HTTPChunkSize(size string) *Command

Size of a chunk for chunk-based HTTP downloading, e.g. 10485760 or 10M (default is disabled). May be useful for bypassing bandwidth throttling imposed by a webserver (experimental)

Additional information:

  • See Command.UnsetHTTPChunkSize, for unsetting the flag.
  • HTTPChunkSize maps to cli flags: --http-chunk-size=SIZE.
  • From option group: "Download"

func (*Command) ID ΒΆ

func (c *Command) ID() *Command

ID sets the "id" flag (no description specified).

Additional information:

  • See Command.UnsetID, for unsetting the flag.
  • ID maps to cli flags: --id (hidden).
  • From option group: "Filesystem"

func (*Command) IgnoreConfig ΒΆ

func (c *Command) IgnoreConfig() *Command

Don't load any more configuration files except those given to --config-locations. For backward compatibility, if this option is found inside the system configuration file, the user configuration is not loaded.

Additional information:

  • See Command.UnsetIgnoreConfig, for unsetting the flag.
  • IgnoreConfig maps to cli flags: --ignore-config/--no-config.
  • From option group: "General"

func (*Command) IgnoreDynamicMPD ΒΆ

func (c *Command) IgnoreDynamicMPD() *Command

Do not process dynamic DASH manifests

Additional information:

  • See Command.UnsetIgnoreDynamicMPD, for unsetting the flag.
  • IgnoreDynamicMPD maps to cli flags: --ignore-dynamic-mpd/--no-allow-dynamic-mpd.
  • From option group: "Extractor"

func (*Command) IgnoreErrors ΒΆ

func (c *Command) IgnoreErrors() *Command

Ignore download and postprocessing errors. The download will be considered successful even if the postprocessing fails

Additional information:

  • See Command.UnsetIgnoreErrors, for unsetting the flag.
  • IgnoreErrors maps to cli flags: -i/--ignore-errors.
  • From option group: "General"

func (*Command) IgnoreNoFormatsError ΒΆ

func (c *Command) IgnoreNoFormatsError() *Command

Ignore "No video formats" error. Useful for extracting metadata even if the videos are not actually available for download (experimental)

Additional information:

  • See Command.UnsetIgnoreNoFormatsError, for unsetting the flag.
  • IgnoreNoFormatsError maps to cli flags: --ignore-no-formats-error.
  • From option group: "Verbosity Simulation"

func (*Command) Impersonate ΒΆ

func (c *Command) Impersonate(client string) *Command

Client to impersonate for requests. E.g. chrome, chrome-110, chrome:windows-10. Pass --impersonate="" to impersonate any client. Note that forcing impersonation for all requests may have a detrimental impact on download speed and stability

Additional information:

  • See Command.UnsetImpersonate, for unsetting the flag.
  • Impersonate maps to cli flags: --impersonate=CLIENT[:OS].
  • From option group: "Network"

func (*Command) IncludeAds deprecated

func (c *Command) IncludeAds() *Command

IncludeAds sets the "include-ads" flag (no description specified).

Additional information:

  • See Command.UnsetIncludeAds, for unsetting the flag.
  • IncludeAds maps to cli flags: --include-ads (hidden).
  • From option group: "Video Selection"

Deprecated: No longer supported.

func (*Command) KeepFragments ΒΆ

func (c *Command) KeepFragments() *Command

Keep downloaded fragments on disk after downloading is finished

Additional information:

  • See Command.UnsetKeepFragments, for unsetting the flag.
  • KeepFragments maps to cli flags: --keep-fragments.
  • From option group: "Download"

func (*Command) KeepVideo ΒΆ

func (c *Command) KeepVideo() *Command

Keep the intermediate video file on disk after post-processing

Additional information:

  • See Command.UnsetKeepVideo, for unsetting the flag.
  • KeepVideo maps to cli flags: -k/--keep-video.
  • From option group: "Post-Processing"

func (*Command) LazyPlaylist ΒΆ

func (c *Command) LazyPlaylist() *Command

Process entries in the playlist as they are received. This disables n_entries, --playlist-random and --playlist-reverse

Additional information:

  • See Command.UnsetLazyPlaylist, for unsetting the flag.
  • LazyPlaylist maps to cli flags: --lazy-playlist.
  • From option group: "Download"

func (*Command) LegacyServerConnect ΒΆ

func (c *Command) LegacyServerConnect() *Command

Explicitly allow HTTPS connection to servers that do not support RFC 5746 secure renegotiation

Additional information:

  • See Command.UnsetLegacyServerConnect, for unsetting the flag.
  • LegacyServerConnect maps to cli flags: --legacy-server-connect.
  • From option group: "Workarounds"

func (*Command) LimitRate ΒΆ

func (c *Command) LimitRate(rate string) *Command

Maximum download rate in bytes per second, e.g. 50K or 4.2M

Additional information:

  • See Command.UnsetLimitRate, for unsetting the flag.
  • LimitRate maps to cli flags: -r/--limit-rate/--rate-limit=RATE.
  • From option group: "Download"

func (*Command) ListExtractors ΒΆ

func (c *Command) ListExtractors(ctx context.Context) (*Result, error)

List all supported extractors and exit

Additional information:

  • ListExtractors maps to cli flags: --list-extractors.
  • From option group: "General"

func (*Command) ListFormats ΒΆ

func (c *Command) ListFormats() *Command

List available formats of each video. Simulate unless --no-simulate is used

Additional information:

  • See Command.UnsetListFormats, for unsetting the flag.
  • ListFormats maps to cli flags: -F/--list-formats.
  • From option group: "Video Format"

func (*Command) ListFormatsAsTable ΒΆ

func (c *Command) ListFormatsAsTable() *Command

ListFormatsAsTable sets the "list-formats-as-table" flag (no description specified).

Additional information:

  • See Command.UnsetListFormatsAsTable, for unsetting the flag.
  • ListFormatsAsTable maps to cli flags: --list-formats-as-table (hidden).
  • From option group: "Video Format"

func (*Command) ListFormatsOld ΒΆ

func (c *Command) ListFormatsOld() *Command

ListFormatsOld sets the "list-formats-old" flag (no description specified).

Additional information:

  • See Command.UnsetListFormatsOld, for unsetting the flag.
  • ListFormatsOld maps to cli flags: --list-formats-old/--no-list-formats-as-table (hidden).
  • From option group: "Video Format"

func (*Command) ListImpersonateTargets ΒΆ

func (c *Command) ListImpersonateTargets() *Command

List available clients to impersonate.

Additional information:

func (*Command) ListSubs ΒΆ

func (c *Command) ListSubs() *Command

List available subtitles of each video. Simulate unless --no-simulate is used

Additional information:

  • See Command.UnsetListSubs, for unsetting the flag.
  • ListSubs maps to cli flags: --list-subs.
  • From option group: "Subtitle"

func (*Command) ListThumbnails ΒΆ

func (c *Command) ListThumbnails() *Command

List available thumbnails of each video. Simulate unless --no-simulate is used

Additional information:

  • See Command.UnsetListThumbnails, for unsetting the flag.
  • ListThumbnails maps to cli flags: --list-thumbnails.
  • From option group: "Thumbnail"

func (*Command) LiveFromStart ΒΆ

func (c *Command) LiveFromStart() *Command

Download livestreams from the start. Currently only supported for YouTube (Experimental)

Additional information:

  • See Command.UnsetLiveFromStart, for unsetting the flag.
  • LiveFromStart maps to cli flags: --live-from-start.
  • From option group: "General"

func (*Command) LoadInfoJSON ΒΆ

func (c *Command) LoadInfoJSON(file string) *Command

JSON file containing the video information (created with the "--write-info-json" option)

Additional information:

  • See Command.UnsetLoadInfoJSON, for unsetting the flag.
  • LoadInfoJSON maps to cli flags: --load-info-json/--load-info=FILE.
  • From option group: "Filesystem"

func (*Command) MarkWatched ΒΆ

func (c *Command) MarkWatched() *Command

Mark videos watched (even with --simulate)

Additional information:

  • See Command.UnsetMarkWatched, for unsetting the flag.
  • MarkWatched maps to cli flags: --mark-watched.
  • From option group: "General"

func (*Command) MatchFilters ΒΆ

func (c *Command) MatchFilters(filter string) *Command

Generic video filter. Any "OUTPUT TEMPLATE" field can be compared with a number or a string using the operators defined in "Filtering Formats". You can also simply specify a field to match if the field is present, use "!field" to check if the field is not present, and "&" to check multiple conditions. Use a "\" to escape "&" or quotes if needed. If used multiple times, the filter matches if at least one of the conditions is met. E.g. --match-filters !is_live --match-filters "like_count>?100 & description~='(?i)\bcats \& dogs\b'" matches only videos that are not live OR those that have a like count more than 100 (or the like field is not available) and also has a description that contains the phrase "cats & dogs" (caseless). Use "--match-filters -" to interactively ask whether to download each video

Additional information:

  • See Command.UnsetMatchFilters, for unsetting the flag.
  • MatchFilters maps to cli flags: --match-filters=FILTER.
  • From option group: "Video Selection"

func (*Command) MatchTitle ΒΆ

func (c *Command) MatchTitle(regex string) *Command

MatchTitle sets the "match-title" flag (no description specified).

Additional information:

  • See Command.UnsetMatchTitle, for unsetting the flag.
  • MatchTitle maps to cli flags: --match-title=REGEX (hidden).
  • From option group: "Video Selection"

func (*Command) MaxDownloads ΒΆ

func (c *Command) MaxDownloads(number int) *Command

Abort after downloading NUMBER files

Additional information:

  • See Command.UnsetMaxDownloads, for unsetting the flag.
  • MaxDownloads maps to cli flags: --max-downloads=NUMBER.
  • From option group: "Video Selection"

func (*Command) MaxFileSize ΒΆ

func (c *Command) MaxFileSize(size string) *Command

Abort download if filesize is larger than SIZE, e.g. 50k or 44.6M

Additional information:

  • See Command.UnsetMaxFileSize, for unsetting the flag.
  • MaxFileSize maps to cli flags: --max-filesize=SIZE.
  • From option group: "Video Selection"

func (*Command) MaxSleepInterval ΒΆ

func (c *Command) MaxSleepInterval(seconds float64) *Command

Maximum number of seconds to sleep. Can only be used along with --min-sleep-interval

Additional information:

  • See Command.UnsetMaxSleepInterval, for unsetting the flag.
  • MaxSleepInterval maps to cli flags: --max-sleep-interval=SECONDS.
  • From option group: "Workarounds"

func (*Command) MaxViews ΒΆ

func (c *Command) MaxViews(count int) *Command

MaxViews sets the "max-views" flag (no description specified).

Additional information:

  • See Command.UnsetMaxViews, for unsetting the flag.
  • MaxViews maps to cli flags: --max-views=COUNT (hidden).
  • From option group: "Video Selection"

func (*Command) MergeOutputFormat ΒΆ

func (c *Command) MergeOutputFormat(format string) *Command

Containers that may be used when merging formats, separated by "/", e.g. "mp4/mkv". Ignored if no merge is required. (currently supported: avi, flv, mkv, mov, mp4, webm)

Additional information:

  • See Command.UnsetMergeOutputFormat, for unsetting the flag.
  • MergeOutputFormat maps to cli flags: --merge-output-format=FORMAT.
  • From option group: "Video Format"

func (*Command) MetadataFromTitle ΒΆ

func (c *Command) MetadataFromTitle(format string) *Command

MetadataFromTitle sets the "metadata-from-title" flag (no description specified).

Additional information:

  • See Command.UnsetMetadataFromTitle, for unsetting the flag.
  • MetadataFromTitle maps to cli flags: --metadata-from-title=FORMAT (hidden).
  • From option group: "Post-Processing"

func (*Command) MinFileSize ΒΆ

func (c *Command) MinFileSize(size string) *Command

Abort download if filesize is smaller than SIZE, e.g. 50k or 44.6M

Additional information:

  • See Command.UnsetMinFileSize, for unsetting the flag.
  • MinFileSize maps to cli flags: --min-filesize=SIZE.
  • From option group: "Video Selection"

func (*Command) MinViews ΒΆ

func (c *Command) MinViews(count int) *Command

MinViews sets the "min-views" flag (no description specified).

Additional information:

  • See Command.UnsetMinViews, for unsetting the flag.
  • MinViews maps to cli flags: --min-views=COUNT (hidden).
  • From option group: "Video Selection"

func (*Command) Mtime ΒΆ

func (c *Command) Mtime() *Command

Use the Last-modified header to set the file modification time (default)

Additional information:

  • See Command.UnsetMtime, for unsetting the flag.
  • Mtime maps to cli flags: --mtime.
  • From option group: "Filesystem"

func (*Command) Netrc ΒΆ

func (c *Command) Netrc() *Command

Use .netrc authentication data

Additional information:

  • See Command.UnsetNetrc, for unsetting the flag.
  • Netrc maps to cli flags: -n/--netrc.
  • From option group: "Authentication"

func (*Command) NetrcCmd ΒΆ

func (c *Command) NetrcCmd(netrcCmd string) *Command

Command to execute to get the credentials for an extractor.

Additional information:

  • See Command.UnsetNetrcCmd, for unsetting the flag.
  • NetrcCmd maps to cli flags: --netrc-cmd=NETRC_CMD.
  • From option group: "Authentication"

func (*Command) NetrcLocation ΒΆ

func (c *Command) NetrcLocation(path string) *Command

Location of .netrc authentication data; either the path or its containing directory. Defaults to ~/.netrc

Additional information:

  • See Command.UnsetNetrcLocation, for unsetting the flag.
  • NetrcLocation maps to cli flags: --netrc-location=PATH.
  • From option group: "Authentication"

func (*Command) Newline ΒΆ

func (c *Command) Newline() *Command

Output progress bar as new lines

Additional information:

  • See Command.UnsetNewline, for unsetting the flag.
  • Newline maps to cli flags: --newline.
  • From option group: "Verbosity Simulation"

func (*Command) NoAbortOnError ΒΆ

func (c *Command) NoAbortOnError() *Command

Continue with next video on download errors; e.g. to skip unavailable videos in a playlist (default)

Additional information:

  • See Command.UnsetAbortOnError, for unsetting the flag.
  • NoAbortOnError maps to cli flags: --no-abort-on-error.
  • From option group: "General"

func (*Command) NoAudioMultistreams ΒΆ

func (c *Command) NoAudioMultistreams() *Command

Only one audio stream is downloaded for each output file (default)

Additional information:

  • See Command.UnsetAudioMultistreams, for unsetting the flag.
  • NoAudioMultistreams maps to cli flags: --no-audio-multistreams.
  • From option group: "Video Format"

func (*Command) NoBatchFile ΒΆ

func (c *Command) NoBatchFile() *Command

Do not read URLs from batch file (default)

Additional information:

  • See Command.UnsetBatchFile, for unsetting the flag.
  • NoBatchFile maps to cli flags: --no-batch-file.
  • From option group: "Filesystem"

func (*Command) NoBreakMatchFilters ΒΆ

func (c *Command) NoBreakMatchFilters() *Command

Do not use any --break-match-filters (default)

Additional information:

  • See Command.UnsetBreakMatchFilters, for unsetting the flag.
  • NoBreakMatchFilters maps to cli flags: --no-break-match-filters.
  • From option group: "Video Selection"

func (*Command) NoBreakOnExisting ΒΆ

func (c *Command) NoBreakOnExisting() *Command

Do not stop the download process when encountering a file that is in the archive (default)

Additional information:

  • See Command.UnsetBreakOnExisting, for unsetting the flag.
  • NoBreakOnExisting maps to cli flags: --no-break-on-existing.
  • From option group: "Video Selection"

func (*Command) NoBreakPerInput ΒΆ

func (c *Command) NoBreakPerInput() *Command

--break-on-existing and similar options terminates the entire download queue

Additional information:

  • See Command.UnsetBreakPerInput, for unsetting the flag.
  • NoBreakPerInput maps to cli flags: --no-break-per-input.
  • From option group: "Video Selection"

func (*Command) NoCacheDir ΒΆ

func (c *Command) NoCacheDir() *Command

Disable filesystem caching

Additional information:

  • See Command.UnsetCacheDir, for unsetting the flag.
  • NoCacheDir maps to cli flags: --no-cache-dir.
  • From option group: "Filesystem"

func (*Command) NoCallHome deprecated

func (c *Command) NoCallHome() *Command

NoCallHome sets the "no-call-home" flag (no description specified).

Additional information:

  • See Command.UnsetCallHome, for unsetting the flag.
  • NoCallHome maps to cli flags: --no-call-home (hidden).
  • From option group: "Verbosity Simulation"

Deprecated: This flag is now default in yt-dlp.

func (*Command) NoCheckCertificates ΒΆ

func (c *Command) NoCheckCertificates() *Command

Suppress HTTPS certificate validation

Additional information:

  • See Command.UnsetCheckCertificates, for unsetting the flag.
  • NoCheckCertificates maps to cli flags: --no-check-certificates.
  • From option group: "Workarounds"

func (*Command) NoCheckFormats ΒΆ

func (c *Command) NoCheckFormats() *Command

Do not check that the formats are actually downloadable

Additional information:

  • See Command.UnsetCheckFormats, for unsetting the flag.
  • NoCheckFormats maps to cli flags: --no-check-formats.
  • From option group: "Video Format"

func (*Command) NoCleanInfoJSON ΒΆ

func (c *Command) NoCleanInfoJSON() *Command

Write all fields to the infojson

Additional information:

  • See Command.UnsetCleanInfoJSON, for unsetting the flag.
  • NoCleanInfoJSON maps to cli flags: --no-clean-info-json/--no-clean-infojson.
  • From option group: "Filesystem"

func (*Command) NoColors ΒΆ

func (c *Command) NoColors() *Command

NoColors sets the "no-colors" flag (no description specified).

Additional information:

  • See Command.UnsetColors, for unsetting the flag.
  • NoColors maps to cli flags: --no-colors/--no-colours (hidden).
  • From option group: "General"

func (*Command) NoConfigLocations ΒΆ

func (c *Command) NoConfigLocations() *Command

Do not load any custom configuration files (default). When given inside a configuration file, ignore all previous --config-locations defined in the current file

Additional information:

  • See Command.UnsetConfigLocations, for unsetting the flag.
  • NoConfigLocations maps to cli flags: --no-config-locations.
  • From option group: "General"

func (*Command) NoContinue ΒΆ

func (c *Command) NoContinue() *Command

Do not resume partially downloaded fragments. If the file is not fragmented, restart download of the entire file

Additional information:

  • See Command.UnsetContinue, for unsetting the flag.
  • NoContinue maps to cli flags: --no-continue.
  • From option group: "Filesystem"

func (*Command) NoCookies ΒΆ

func (c *Command) NoCookies() *Command

Do not read/dump cookies from/to file (default)

Additional information:

  • See Command.UnsetCookies, for unsetting the flag.
  • NoCookies maps to cli flags: --no-cookies=FILE.
  • From option group: "Filesystem"

func (*Command) NoCookiesFromBrowser ΒΆ

func (c *Command) NoCookiesFromBrowser() *Command

Do not load cookies from browser (default)

Additional information:

  • See Command.UnsetCookiesFromBrowser, for unsetting the flag.
  • NoCookiesFromBrowser maps to cli flags: --no-cookies-from-browser.
  • From option group: "Filesystem"

func (*Command) NoDownloadArchive ΒΆ

func (c *Command) NoDownloadArchive() *Command

Do not use archive file (default)

Additional information:

  • See Command.UnsetDownloadArchive, for unsetting the flag.
  • NoDownloadArchive maps to cli flags: --no-download-archive.
  • From option group: "Video Selection"

func (*Command) NoEmbedChapters ΒΆ

func (c *Command) NoEmbedChapters() *Command

Do not add chapter markers (default)

Additional information:

  • See Command.UnsetEmbedChapters, for unsetting the flag.
  • NoEmbedChapters maps to cli flags: --no-embed-chapters/--no-add-chapters.
  • From option group: "Post-Processing"

func (*Command) NoEmbedInfoJSON ΒΆ

func (c *Command) NoEmbedInfoJSON() *Command

Do not embed the infojson as an attachment to the video file

Additional information:

  • See Command.UnsetEmbedInfoJSON, for unsetting the flag.
  • NoEmbedInfoJSON maps to cli flags: --no-embed-info-json.
  • From option group: "Post-Processing"

func (*Command) NoEmbedMetadata ΒΆ

func (c *Command) NoEmbedMetadata() *Command

Do not add metadata to file (default)

Additional information:

  • See Command.UnsetEmbedMetadata, for unsetting the flag.
  • NoEmbedMetadata maps to cli flags: --no-embed-metadata/--no-add-metadata.
  • From option group: "Post-Processing"

func (*Command) NoEmbedSubs ΒΆ

func (c *Command) NoEmbedSubs() *Command

Do not embed subtitles (default)

Additional information:

  • See Command.UnsetEmbedSubs, for unsetting the flag.
  • NoEmbedSubs maps to cli flags: --no-embed-subs.
  • From option group: "Post-Processing"

func (*Command) NoEmbedThumbnail ΒΆ

func (c *Command) NoEmbedThumbnail() *Command

Do not embed thumbnail (default)

Additional information:

  • See Command.UnsetEmbedThumbnail, for unsetting the flag.
  • NoEmbedThumbnail maps to cli flags: --no-embed-thumbnail.
  • From option group: "Post-Processing"

func (*Command) NoExec ΒΆ

func (c *Command) NoExec() *Command

Remove any previously defined --exec

Additional information:

  • See Command.UnsetExec, for unsetting the flag.
  • NoExec maps to cli flags: --no-exec.
  • From option group: "Post-Processing"

func (*Command) NoExecBeforeDownload ΒΆ

func (c *Command) NoExecBeforeDownload() *Command

NoExecBeforeDownload sets the "no-exec-before-download" flag (no description specified).

Additional information:

  • See Command.UnsetExecBeforeDownload, for unsetting the flag.
  • NoExecBeforeDownload maps to cli flags: --no-exec-before-download (hidden).
  • From option group: "Post-Processing"

func (*Command) NoFlatPlaylist ΒΆ

func (c *Command) NoFlatPlaylist() *Command

Fully extract the videos of a playlist (default)

Additional information:

  • See Command.UnsetFlatPlaylist, for unsetting the flag.
  • NoFlatPlaylist maps to cli flags: --no-flat-playlist.
  • From option group: "General"

func (*Command) NoForceKeyframesAtCuts ΒΆ

func (c *Command) NoForceKeyframesAtCuts() *Command

Do not force keyframes around the chapters when cutting/splitting (default)

Additional information:

  • See Command.UnsetForceKeyframesAtCuts, for unsetting the flag.
  • NoForceKeyframesAtCuts maps to cli flags: --no-force-keyframes-at-cuts.
  • From option group: "Post-Processing"

func (*Command) NoForceOverwrites ΒΆ

func (c *Command) NoForceOverwrites() *Command

Do not overwrite the video, but overwrite related files (default)

Additional information:

  • See Command.UnsetForceOverwrites, for unsetting the flag.
  • NoForceOverwrites maps to cli flags: --no-force-overwrites.
  • From option group: "Filesystem"

func (*Command) NoFormatSortForce ΒΆ

func (c *Command) NoFormatSortForce() *Command

Some fields have precedence over the user specified sort order (default)

Additional information:

  • See Command.UnsetFormatSortForce, for unsetting the flag.
  • NoFormatSortForce maps to cli flags: --no-format-sort-force=FORMAT.
  • From option group: "Video Format"

func (*Command) NoGeoBypass ΒΆ

func (c *Command) NoGeoBypass() *Command

NoGeoBypass sets the "no-geo-bypass" flag (no description specified).

Additional information:

  • See Command.UnsetGeoBypass, for unsetting the flag.
  • NoGeoBypass maps to cli flags: --no-geo-bypass (hidden).
  • From option group: "Geo-restriction"

func (*Command) NoHLSSplitDiscontinuity ΒΆ

func (c *Command) NoHLSSplitDiscontinuity() *Command

Do not split HLS playlists into different formats at discontinuities such as ad breaks (default)

Additional information:

func (*Command) NoHLSUseMPEGTS ΒΆ

func (c *Command) NoHLSUseMPEGTS() *Command

Do not use the mpegts container for HLS videos. This is default when not downloading live streams

Additional information:

  • See Command.UnsetHLSUseMPEGTS, for unsetting the flag.
  • NoHLSUseMPEGTS maps to cli flags: --no-hls-use-mpegts.
  • From option group: "Download"

func (*Command) NoIgnoreNoFormatsError ΒΆ

func (c *Command) NoIgnoreNoFormatsError() *Command

Throw error when no downloadable video formats are found (default)

Additional information:

  • See Command.UnsetIgnoreNoFormatsError, for unsetting the flag.
  • NoIgnoreNoFormatsError maps to cli flags: --no-ignore-no-formats-error.
  • From option group: "Verbosity Simulation"

func (*Command) NoIncludeAds deprecated

func (c *Command) NoIncludeAds() *Command

NoIncludeAds sets the "no-include-ads" flag (no description specified).

Additional information:

  • See Command.UnsetIncludeAds, for unsetting the flag.
  • NoIncludeAds maps to cli flags: --no-include-ads (hidden).
  • From option group: "Video Selection"

Deprecated: This flag is now default in yt-dlp.

func (*Command) NoKeepFragments ΒΆ

func (c *Command) NoKeepFragments() *Command

Delete downloaded fragments after downloading is finished (default)

Additional information:

  • See Command.UnsetKeepFragments, for unsetting the flag.
  • NoKeepFragments maps to cli flags: --no-keep-fragments.
  • From option group: "Download"

func (*Command) NoKeepVideo ΒΆ

func (c *Command) NoKeepVideo() *Command

Delete the intermediate video file after post-processing (default)

Additional information:

  • See Command.UnsetKeepVideo, for unsetting the flag.
  • NoKeepVideo maps to cli flags: --no-keep-video.
  • From option group: "Post-Processing"

func (*Command) NoLazyPlaylist ΒΆ

func (c *Command) NoLazyPlaylist() *Command

Process videos in the playlist only after the entire playlist is parsed (default)

Additional information:

  • See Command.UnsetLazyPlaylist, for unsetting the flag.
  • NoLazyPlaylist maps to cli flags: --no-lazy-playlist.
  • From option group: "Download"

func (*Command) NoLiveFromStart ΒΆ

func (c *Command) NoLiveFromStart() *Command

Download livestreams from the current time (default)

Additional information:

  • See Command.UnsetLiveFromStart, for unsetting the flag.
  • NoLiveFromStart maps to cli flags: --no-live-from-start.
  • From option group: "General"

func (*Command) NoMarkWatched ΒΆ

func (c *Command) NoMarkWatched() *Command

Do not mark videos watched (default)

Additional information:

  • See Command.UnsetMarkWatched, for unsetting the flag.
  • NoMarkWatched maps to cli flags: --no-mark-watched.
  • From option group: "General"

func (*Command) NoMatchFilters ΒΆ

func (c *Command) NoMatchFilters() *Command

Do not use any --match-filters (default)

Additional information:

  • See Command.UnsetMatchFilters, for unsetting the flag.
  • NoMatchFilters maps to cli flags: --no-match-filters.
  • From option group: "Video Selection"

func (*Command) NoMtime ΒΆ

func (c *Command) NoMtime() *Command

Do not use the Last-modified header to set the file modification time

Additional information:

  • See Command.UnsetMtime, for unsetting the flag.
  • NoMtime maps to cli flags: --no-mtime.
  • From option group: "Filesystem"

func (*Command) NoOverwrites ΒΆ

func (c *Command) NoOverwrites() *Command

Do not overwrite any files

Additional information:

  • See Command.UnsetOverwrites, for unsetting the flag.
  • NoOverwrites maps to cli flags: -w/--no-overwrites.
  • From option group: "Filesystem"

func (*Command) NoPart ΒΆ

func (c *Command) NoPart() *Command

Do not use .part files - write directly into output file

Additional information:

  • See Command.UnsetPart, for unsetting the flag.
  • NoPart maps to cli flags: --no-part.
  • From option group: "Filesystem"

func (*Command) NoPlaylist ΒΆ

func (c *Command) NoPlaylist() *Command

Download only the video, if the URL refers to a video and a playlist

Additional information:

  • See Command.UnsetPlaylist, for unsetting the flag.
  • NoPlaylist maps to cli flags: --no-playlist.
  • From option group: "Video Selection"

func (*Command) NoPlaylistReverse ΒΆ

func (c *Command) NoPlaylistReverse() *Command

NoPlaylistReverse sets the "no-playlist-reverse" flag (no description specified).

Additional information:

  • See Command.UnsetPlaylistReverse, for unsetting the flag.
  • NoPlaylistReverse maps to cli flags: --no-playlist-reverse (hidden).
  • From option group: "Download"

func (*Command) NoPostOverwrites ΒΆ

func (c *Command) NoPostOverwrites() *Command

Do not overwrite post-processed files

Additional information:

  • See Command.UnsetPostOverwrites, for unsetting the flag.
  • NoPostOverwrites maps to cli flags: --no-post-overwrites.
  • From option group: "Post-Processing"

func (*Command) NoPreferFreeFormats ΒΆ

func (c *Command) NoPreferFreeFormats() *Command

Don't give any special preference to free containers (default)

Additional information:

  • See Command.UnsetPreferFreeFormats, for unsetting the flag.
  • NoPreferFreeFormats maps to cli flags: --no-prefer-free-formats.
  • From option group: "Video Format"

func (*Command) NoProgress ΒΆ

func (c *Command) NoProgress() *Command

Do not print progress bar

Additional information:

  • See Command.UnsetProgress, for unsetting the flag.
  • NoProgress maps to cli flags: --no-progress.
  • From option group: "Verbosity Simulation"

func (*Command) NoQuiet ΒΆ

func (c *Command) NoQuiet() *Command

Deactivate quiet mode. (Default)

Additional information:

  • See Command.UnsetQuiet, for unsetting the flag.
  • NoQuiet maps to cli flags: --no-quiet.
  • From option group: "Verbosity Simulation"

func (*Command) NoRemoveChapters ΒΆ

func (c *Command) NoRemoveChapters() *Command

Do not remove any chapters from the file (default)

Additional information:

  • See Command.UnsetRemoveChapters, for unsetting the flag.
  • NoRemoveChapters maps to cli flags: --no-remove-chapters.
  • From option group: "Post-Processing"

func (*Command) NoResizeBuffer ΒΆ

func (c *Command) NoResizeBuffer() *Command

Do not automatically adjust the buffer size

Additional information:

  • See Command.UnsetResizeBuffer, for unsetting the flag.
  • NoResizeBuffer maps to cli flags: --no-resize-buffer.
  • From option group: "Download"

func (*Command) NoRestrictFilenames ΒΆ

func (c *Command) NoRestrictFilenames() *Command

Allow Unicode characters, "&" and spaces in filenames (default)

Additional information:

  • See Command.UnsetRestrictFilenames, for unsetting the flag.
  • NoRestrictFilenames maps to cli flags: --no-restrict-filenames.
  • From option group: "Filesystem"

func (*Command) NoSimulate ΒΆ

func (c *Command) NoSimulate() *Command

Download the video even if printing/listing options are used

Additional information:

  • See Command.UnsetSimulate, for unsetting the flag.
  • NoSimulate maps to cli flags: --no-simulate.
  • From option group: "Verbosity Simulation"

func (*Command) NoSplitChapters ΒΆ

func (c *Command) NoSplitChapters() *Command

Do not split video based on chapters (default)

Additional information:

  • See Command.UnsetSplitChapters, for unsetting the flag.
  • NoSplitChapters maps to cli flags: --no-split-chapters/--no-split-tracks.
  • From option group: "Post-Processing"

func (*Command) NoSponskrub deprecated

func (c *Command) NoSponskrub() *Command

NoSponskrub sets the "no-sponskrub" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrub, for unsetting the flag.
  • NoSponskrub maps to cli flags: --no-sponskrub (hidden).
  • From option group: "SponsorBlock"

Deprecated: Use Command.NoSponsorblock instead.

func (*Command) NoSponskrubCut deprecated

func (c *Command) NoSponskrubCut() *Command

NoSponskrubCut sets the "no-sponskrub-cut" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrubCut, for unsetting the flag.
  • NoSponskrubCut maps to cli flags: --no-sponskrub-cut (hidden).
  • From option group: "SponsorBlock"

Deprecated: Use Command.SponsorblockRemove with "-all" as an argument.

func (*Command) NoSponskrubForce deprecated

func (c *Command) NoSponskrubForce() *Command

NoSponskrubForce sets the "no-sponskrub-force" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrubForce, for unsetting the flag.
  • NoSponskrubForce maps to cli flags: --no-sponskrub-force (hidden).
  • From option group: "SponsorBlock"

Deprecated: No longer applicable.

func (*Command) NoSponsorblock ΒΆ

func (c *Command) NoSponsorblock() *Command

Disable both --sponsorblock-mark and --sponsorblock-remove

Additional information:

  • See Command.UnsetSponsorblock, for unsetting the flag.
  • NoSponsorblock maps to cli flags: --no-sponsorblock.
  • From option group: "SponsorBlock"

func (*Command) NoUpdate ΒΆ

func (c *Command) NoUpdate() *Command

Do not check for updates (default)

Additional information:

  • See Command.UnsetUpdate, for unsetting the flag.
  • NoUpdate maps to cli flags: --no-update.
  • From option group: "General"

func (*Command) NoVideoMultistreams ΒΆ

func (c *Command) NoVideoMultistreams() *Command

Only one video stream is downloaded for each output file (default)

Additional information:

  • See Command.UnsetVideoMultistreams, for unsetting the flag.
  • NoVideoMultistreams maps to cli flags: --no-video-multistreams.
  • From option group: "Video Format"

func (*Command) NoWaitForVideo ΒΆ

func (c *Command) NoWaitForVideo() *Command

Do not wait for scheduled streams (default)

Additional information:

  • See Command.UnsetWaitForVideo, for unsetting the flag.
  • NoWaitForVideo maps to cli flags: --no-wait-for-video.
  • From option group: "General"

func (*Command) NoWarnings ΒΆ

func (c *Command) NoWarnings() *Command

Ignore warnings

Additional information:

  • See Command.UnsetWarnings, for unsetting the flag.
  • NoWarnings maps to cli flags: --no-warnings.
  • From option group: "Verbosity Simulation"

func (*Command) NoWindowsFilenames ΒΆ

func (c *Command) NoWindowsFilenames() *Command

Make filenames Windows-compatible only if using Windows (default)

Additional information:

  • See Command.UnsetWindowsFilenames, for unsetting the flag.
  • NoWindowsFilenames maps to cli flags: --no-windows-filenames.
  • From option group: "Filesystem"

func (*Command) NoWriteAnnotations deprecated

func (c *Command) NoWriteAnnotations() *Command

NoWriteAnnotations sets the "no-write-annotations" flag (no description specified).

Additional information:

  • See Command.UnsetWriteAnnotations, for unsetting the flag.
  • NoWriteAnnotations maps to cli flags: --no-write-annotations (hidden).
  • From option group: "Filesystem"

Deprecated: This flag is now default in yt-dlp.

func (*Command) NoWriteAutoSubs ΒΆ

func (c *Command) NoWriteAutoSubs() *Command

Do not write auto-generated subtitles (default)

Additional information:

  • See Command.UnsetWriteAutoSubs, for unsetting the flag.
  • NoWriteAutoSubs maps to cli flags: --no-write-auto-subs/--no-write-automatic-subs.
  • From option group: "Subtitle"

func (*Command) NoWriteComments ΒΆ

func (c *Command) NoWriteComments() *Command

Do not retrieve video comments unless the extraction is known to be quick

Additional information:

  • See Command.UnsetWriteComments, for unsetting the flag.
  • NoWriteComments maps to cli flags: --no-write-comments/--no-get-comments.
  • From option group: "Filesystem"

func (*Command) NoWriteDescription ΒΆ

func (c *Command) NoWriteDescription() *Command

Do not write video description (default)

Additional information:

  • See Command.UnsetWriteDescription, for unsetting the flag.
  • NoWriteDescription maps to cli flags: --no-write-description.
  • From option group: "Filesystem"

func (*Command) NoWriteInfoJSON ΒΆ

func (c *Command) NoWriteInfoJSON() *Command

Do not write video metadata (default)

Additional information:

  • See Command.UnsetWriteInfoJSON, for unsetting the flag.
  • NoWriteInfoJSON maps to cli flags: --no-write-info-json.
  • From option group: "Filesystem"

func (*Command) NoWritePlaylistMetafiles ΒΆ

func (c *Command) NoWritePlaylistMetafiles() *Command

Do not write playlist metadata when using --write-info-json, --write-description etc.

Additional information:

func (*Command) NoWriteSubs ΒΆ

func (c *Command) NoWriteSubs() *Command

Do not write subtitle file (default)

Additional information:

  • See Command.UnsetWriteSubs, for unsetting the flag.
  • NoWriteSubs maps to cli flags: --no-write-subs/--no-write-srt.
  • From option group: "Subtitle"

func (*Command) NoWriteThumbnail ΒΆ

func (c *Command) NoWriteThumbnail() *Command

Do not write thumbnail image to disk (default)

Additional information:

  • See Command.UnsetWriteThumbnail, for unsetting the flag.
  • NoWriteThumbnail maps to cli flags: --no-write-thumbnail.
  • From option group: "Thumbnail"

func (*Command) Output ΒΆ

func (c *Command) Output(template string) *Command

Output filename template; see "OUTPUT TEMPLATE" for details

References:

Additional information:

  • See Command.UnsetOutput, for unsetting the flag.
  • Output maps to cli flags: -o/--output=[TYPES:]TEMPLATE.
  • From option group: "Filesystem"

func (*Command) OutputNaPlaceholder ΒΆ

func (c *Command) OutputNaPlaceholder(text string) *Command

Placeholder for unavailable fields in --output (default: "NA")

Additional information:

  • See Command.UnsetOutputNaPlaceholder, for unsetting the flag.
  • OutputNaPlaceholder maps to cli flags: --output-na-placeholder=TEXT.
  • From option group: "Filesystem"

func (*Command) ParseMetadata ΒΆ

func (c *Command) ParseMetadata(fromto string) *Command

Parse additional metadata like title/artist from other fields; see "MODIFYING METADATA" for details. Supported values of "WHEN" are the same as that of --use-postprocessor (default: pre_process)

References:

Additional information:

  • See Command.UnsetParseMetadata, for unsetting the flag.
  • ParseMetadata maps to cli flags: --parse-metadata=[WHEN:]FROM:TO.
  • From option group: "Post-Processing"

func (*Command) Part ΒΆ

func (c *Command) Part() *Command

Use .part files instead of writing directly into output file (default)

Additional information:

  • See Command.UnsetPart, for unsetting the flag.
  • Part maps to cli flags: --part.
  • From option group: "Filesystem"

func (*Command) Password ΒΆ

func (c *Command) Password(password string) *Command

Account password. If this option is left out, yt-dlp will ask interactively

Additional information:

  • See Command.UnsetPassword, for unsetting the flag.
  • Password maps to cli flags: -p/--password=PASSWORD.
  • From option group: "Authentication"

func (*Command) Paths ΒΆ

func (c *Command) Paths(path string) *Command

The paths where the files should be downloaded. Specify the type of file and the path separated by a colon ":". All the same TYPES as --output are supported. Additionally, you can also provide "home" (default) and "temp" paths. All intermediary files are first downloaded to the temp path and then the final files are moved over to the home path after download is finished. This option is ignored if --output is an absolute path

Additional information:

  • See Command.UnsetPaths, for unsetting the flag.
  • Paths maps to cli flags: -P/--paths=[TYPES:]PATH.
  • From option group: "Filesystem"

func (*Command) PlaylistEnd ΒΆ

func (c *Command) PlaylistEnd(number int) *Command

PlaylistEnd sets the "playlist-end" flag (no description specified).

Additional information:

  • See Command.UnsetPlaylistEnd, for unsetting the flag.
  • PlaylistEnd maps to cli flags: --playlist-end=NUMBER (hidden).
  • From option group: "Video Selection"

func (*Command) PlaylistItems ΒΆ

func (c *Command) PlaylistItems(itemSpec string) *Command

Comma separated playlist_index of the items to download. You can specify a range using "[START]:[STOP][:STEP]". For backward compatibility, START-STOP is also supported. Use negative indices to count from the right and negative STEP to download in reverse order. E.g. "-I 1:3,7,-5::2" used on a playlist of size 15 will download the items at index 1,2,3,7,11,13,15

Additional information:

  • See Command.UnsetPlaylistItems, for unsetting the flag.
  • PlaylistItems maps to cli flags: -I/--playlist-items=ITEM_SPEC.
  • From option group: "Video Selection"

func (*Command) PlaylistRandom ΒΆ

func (c *Command) PlaylistRandom() *Command

Download playlist videos in random order

Additional information:

  • See Command.UnsetPlaylistRandom, for unsetting the flag.
  • PlaylistRandom maps to cli flags: --playlist-random.
  • From option group: "Download"

func (*Command) PlaylistReverse ΒΆ

func (c *Command) PlaylistReverse() *Command

PlaylistReverse sets the "playlist-reverse" flag (no description specified).

Additional information:

  • See Command.UnsetPlaylistReverse, for unsetting the flag.
  • PlaylistReverse maps to cli flags: --playlist-reverse (hidden).
  • From option group: "Download"

func (*Command) PlaylistStart ΒΆ

func (c *Command) PlaylistStart(number int) *Command

PlaylistStart sets the "playlist-start" flag (no description specified).

Additional information:

  • See Command.UnsetPlaylistStart, for unsetting the flag.
  • PlaylistStart maps to cli flags: --playlist-start=NUMBER (hidden).
  • From option group: "Video Selection"

func (*Command) PluginDirs ΒΆ

func (c *Command) PluginDirs(path string) *Command

Path to an additional directory to search for plugins. This option can be used multiple times to add multiple directories. Note that this currently only works for extractor plugins; postprocessor plugins can only be loaded from the default plugin directories

Additional information:

  • See Command.UnsetPluginDirs, for unsetting the flag.
  • PluginDirs maps to cli flags: --plugin-dirs=PATH.
  • From option group: "General"

func (*Command) PostOverwrites ΒΆ

func (c *Command) PostOverwrites() *Command

Overwrite post-processed files (default)

Additional information:

  • See Command.UnsetPostOverwrites, for unsetting the flag.
  • PostOverwrites maps to cli flags: --post-overwrites.
  • From option group: "Post-Processing"

func (*Command) PostProcessorArgs ΒΆ

func (c *Command) PostProcessorArgs(nameargs string) *Command

Give these arguments to the postprocessors. Specify the postprocessor/executable name and the arguments separated by a colon ":" to give the argument to the specified postprocessor/executable. Supported PP are: Merger, ModifyChapters, SplitChapters, ExtractAudio, VideoRemuxer, VideoConvertor, Metadata, EmbedSubtitle, EmbedThumbnail, SubtitlesConvertor, ThumbnailsConvertor, FixupStretched, FixupM4a, FixupM3u8, FixupTimestamp and FixupDuration. The supported executables are: AtomicParsley, FFmpeg and FFprobe. You can also specify "PP+EXE:ARGS" to give the arguments to the specified executable only when being used by the specified postprocessor. Additionally, for ffmpeg/ffprobe, "_i"/"_o" can be appended to the prefix optionally followed by a number to pass the argument before the specified input/output file, e.g. --ppa "Merger+ffmpeg_i1:-v quiet". You can use this option multiple times to give different arguments to different postprocessors.

Additional information:

  • See Command.UnsetPostProcessorArgs, for unsetting the flag.
  • PostProcessorArgs maps to cli flags: --postprocessor-args/--ppa=NAME:ARGS.
  • From option group: "Post-Processing"

func (*Command) PreferAVConv deprecated

func (c *Command) PreferAVConv() *Command

PreferAVConv sets the "prefer-avconv" flag (no description specified).

Additional information:

  • See Command.UnsetPreferAVConv, for unsetting the flag.
  • PreferAVConv maps to cli flags: --prefer-avconv/--no-prefer-ffmpeg (hidden).
  • From option group: "Post-Processing"

Deprecated: avconv is not officially supported by yt-dlp.

func (*Command) PreferFFmpeg deprecated

func (c *Command) PreferFFmpeg() *Command

PreferFFmpeg sets the "prefer-ffmpeg" flag (no description specified).

Additional information:

  • See Command.UnsetPreferFFmpeg, for unsetting the flag.
  • PreferFFmpeg maps to cli flags: --prefer-ffmpeg/--no-prefer-avconv (hidden).
  • From option group: "Post-Processing"

Deprecated: This flag is now default in yt-dlp.

func (*Command) PreferFreeFormats ΒΆ

func (c *Command) PreferFreeFormats() *Command

Prefer video formats with free containers over non-free ones of the same quality. Use with "-S ext" to strictly prefer free containers irrespective of quality

Additional information:

  • See Command.UnsetPreferFreeFormats, for unsetting the flag.
  • PreferFreeFormats maps to cli flags: --prefer-free-formats.
  • From option group: "Video Format"

func (*Command) PreferInsecure ΒΆ

func (c *Command) PreferInsecure() *Command

Use an unencrypted connection to retrieve information about the video (Currently supported only for YouTube)

Additional information:

  • See Command.UnsetPreferInsecure, for unsetting the flag.
  • PreferInsecure maps to cli flags: --prefer-insecure/--prefer-unsecure.
  • From option group: "Workarounds"

func (*Command) Print ΒΆ

func (c *Command) Print(template string) *Command

Field name or output template to print to screen, optionally prefixed with when to print it, separated by a ":". Supported values of "WHEN" are the same as that of --use-postprocessor (default: video). Implies --quiet. Implies --simulate unless --no-simulate or later stages of WHEN are used. This option can be used multiple times

Additional information:

  • See Command.UnsetPrint, for unsetting the flag.
  • Print maps to cli flags: -O/--print=[WHEN:]TEMPLATE.
  • From option group: "Verbosity Simulation"

func (*Command) PrintJSON ΒΆ

func (c *Command) PrintJSON() *Command

PrintJSON sets the "print-json" flag (no description specified).

Additional information:

  • See Command.UnsetPrintJSON, for unsetting the flag.
  • PrintJSON maps to cli flags: --print-json (hidden).
  • From option group: "Verbosity Simulation"

func (*Command) PrintToFile ΒΆ

func (c *Command) PrintToFile(template, file string) *Command

Append given template to the file. The values of WHEN and TEMPLATE are the same as that of --print. FILE uses the same syntax as the output template. This option can be used multiple times

Additional information:

  • See Command.UnsetPrintToFile, for unsetting the flag.
  • PrintToFile maps to cli flags: --print-to-file=[WHEN:]TEMPLATE FILE.
  • From option group: "Verbosity Simulation"

func (*Command) PrintTraffic ΒΆ

func (c *Command) PrintTraffic() *Command

Display sent and read HTTP traffic

Additional information:

  • See Command.UnsetPrintTraffic, for unsetting the flag.
  • PrintTraffic maps to cli flags: --print-traffic/--dump-headers.
  • From option group: "Verbosity Simulation"

func (*Command) Progress ΒΆ

func (c *Command) Progress() *Command

Show progress bar, even if in quiet mode

Additional information:

  • See Command.UnsetProgress, for unsetting the flag.
  • Progress maps to cli flags: --progress.
  • From option group: "Verbosity Simulation"

func (*Command) ProgressDelta ΒΆ

func (c *Command) ProgressDelta(seconds float64) *Command

Time between progress output (default: 0)

Additional information:

  • See Command.UnsetProgressDelta, for unsetting the flag.
  • ProgressDelta maps to cli flags: --progress-delta=SECONDS.
  • From option group: "Verbosity Simulation"

func (*Command) ProgressFunc ΒΆ

func (c *Command) ProgressFunc(frequency time.Duration, fn ProgressCallbackFunc) *Command

ProgressFunc can be used to register a callback function that will be called when yt-dlp sends progress updates. The callback function will be called with any information that yt-dlp is able to provide, including sending separate updates for each file, playlist, etc that may be downloaded.

func (*Command) ProgressTemplate ΒΆ

func (c *Command) ProgressTemplate(template string) *Command

Template for progress outputs, optionally prefixed with one of "download:" (default), "download-title:" (the console title), "postprocess:", or "postprocess-title:". The video's fields are accessible under the "info" key and the progress attributes are accessible under "progress" key. E.g. --console-title --progress-template "download-title:%(info.id)s-%(progress.eta)s"

Additional information:

  • See Command.UnsetProgressTemplate, for unsetting the flag.
  • ProgressTemplate maps to cli flags: --progress-template=[TYPES:]TEMPLATE.
  • From option group: "Verbosity Simulation"

func (*Command) Proxy ΒΆ

func (c *Command) Proxy(url string) *Command

Use the specified HTTP/HTTPS/SOCKS proxy. To enable SOCKS proxy, specify a proper scheme, e.g. socks5://user:pass@127.0.0.1:1080/. Pass in an empty string (--proxy "") for direct connection

Additional information:

  • See Command.UnsetProxy, for unsetting the flag.
  • Proxy maps to cli flags: --proxy=URL.
  • From option group: "Network"

func (*Command) Quiet ΒΆ

func (c *Command) Quiet() *Command

Activate quiet mode. If used with --verbose, print the log to stderr

Additional information:

  • See Command.UnsetQuiet, for unsetting the flag.
  • Quiet maps to cli flags: -q/--quiet.
  • From option group: "Verbosity Simulation"

func (*Command) RecodeVideo ΒΆ

func (c *Command) RecodeVideo(format string) *Command

Re-encode the video into another format if necessary. The syntax and supported formats are the same as --remux-video

Additional information:

  • See Command.UnsetRecodeVideo, for unsetting the flag.
  • RecodeVideo maps to cli flags: --recode-video=FORMAT.
  • From option group: "Post-Processing"

func (*Command) Referer ΒΆ

func (c *Command) Referer(url string) *Command

Referer sets the "referer" flag (no description specified).

Additional information:

  • See Command.UnsetReferer, for unsetting the flag.
  • Referer maps to cli flags: --referer=URL (hidden).
  • From option group: "Workarounds"

func (*Command) RejectTitle ΒΆ

func (c *Command) RejectTitle(regex string) *Command

RejectTitle sets the "reject-title" flag (no description specified).

Additional information:

  • See Command.UnsetRejectTitle, for unsetting the flag.
  • RejectTitle maps to cli flags: --reject-title=REGEX (hidden).
  • From option group: "Video Selection"

func (*Command) RemoveChapters ΒΆ

func (c *Command) RemoveChapters(regex string) *Command

Remove chapters whose title matches the given regular expression. The syntax is the same as --download-sections. This option can be used multiple times

Additional information:

  • See Command.UnsetRemoveChapters, for unsetting the flag.
  • RemoveChapters maps to cli flags: --remove-chapters=REGEX.
  • From option group: "Post-Processing"

func (*Command) RemuxVideo ΒΆ

func (c *Command) RemuxVideo(format string) *Command

Remux the video into another container if necessary (currently supported: avi, flv, gif, mkv, mov, mp4, webm, aac, aiff, alac, flac, m4a, mka, mp3, ogg, opus, vorbis, wav). If the target container does not support the video/audio codec, remuxing will fail. You can specify multiple rules; e.g. "aac>m4a/mov>mp4/mkv" will remux aac to m4a, mov to mp4 and anything else to mkv

Additional information:

  • See Command.UnsetRemuxVideo, for unsetting the flag.
  • RemuxVideo maps to cli flags: --remux-video=FORMAT.
  • From option group: "Post-Processing"

func (*Command) ReplaceInMetadata ΒΆ

func (c *Command) ReplaceInMetadata(fields, regex, replace string) *Command

Replace text in a metadata field using the given regex. This option can be used multiple times. Supported values of "WHEN" are the same as that of --use-postprocessor (default: pre_process)

References:

Additional information:

  • See Command.UnsetReplaceInMetadata, for unsetting the flag.
  • ReplaceInMetadata maps to cli flags: --replace-in-metadata=[WHEN:]FIELDS REGEX REPLACE.
  • From option group: "Post-Processing"

func (*Command) ResizeBuffer ΒΆ

func (c *Command) ResizeBuffer() *Command

The buffer size is automatically resized from an initial value of --buffer-size (default)

Additional information:

  • See Command.UnsetResizeBuffer, for unsetting the flag.
  • ResizeBuffer maps to cli flags: --resize-buffer.
  • From option group: "Download"

func (*Command) RestrictFilenames ΒΆ

func (c *Command) RestrictFilenames() *Command

Restrict filenames to only ASCII characters, and avoid "&" and spaces in filenames

Additional information:

  • See Command.UnsetRestrictFilenames, for unsetting the flag.
  • RestrictFilenames maps to cli flags: --restrict-filenames.
  • From option group: "Filesystem"

func (*Command) Retries ΒΆ

func (c *Command) Retries(retries string) *Command

Number of retries (default is 10), or "infinite"

Additional information:

  • See Command.UnsetRetries, for unsetting the flag.
  • Retries maps to cli flags: -R/--retries=RETRIES.
  • From option group: "Download"

func (*Command) RetrySleep ΒΆ

func (c *Command) RetrySleep(expr string) *Command

Time to sleep between retries in seconds (optionally) prefixed by the type of retry (http (default), fragment, file_access, extractor) to apply the sleep to. EXPR can be a number, linear=START[:END[:STEP=1]] or exp=START[:END[:BASE=2]]. This option can be used multiple times to set the sleep for the different retry types, e.g. --retry-sleep linear=1::2 --retry-sleep fragment:exp=1:20

Additional information:

  • See Command.UnsetRetrySleep, for unsetting the flag.
  • RetrySleep maps to cli flags: --retry-sleep=[TYPE:]EXPR.
  • From option group: "Download"

func (*Command) RmCacheDir ΒΆ

func (c *Command) RmCacheDir() *Command

Delete all filesystem cache files

Additional information:

  • See Command.UnsetRmCacheDir, for unsetting the flag.
  • RmCacheDir maps to cli flags: --rm-cache-dir.
  • From option group: "Filesystem"

func (*Command) Run ΒΆ

func (c *Command) Run(ctx context.Context, args ...string) (*Result, error)

Run invokes yt-dlp with the provided arguments (and any flags previously set), and returns the results (stdout/stderr, exit code, etc). args should be the URLs that would normally be passed in to yt-dlp.

func (*Command) SetEnvVar ΒΆ

func (c *Command) SetEnvVar(key, value string) *Command

SetEnvVar sets an environment variable for the command. If value is empty, it will be removed.

func (*Command) SetExecutable ΒΆ

func (c *Command) SetExecutable(path string) *Command

SetExecutable sets the executable path to yt-dlp for the command.

func (*Command) SetWorkDir ΒΆ

func (c *Command) SetWorkDir(path string) *Command

SetWorkDir sets the working directory for the command. Defaults to current working directory.

func (*Command) Simulate ΒΆ

func (c *Command) Simulate() *Command

Do not download the video and do not write anything to disk

Additional information:

  • See Command.UnsetSimulate, for unsetting the flag.
  • Simulate maps to cli flags: -s/--simulate.
  • From option group: "Verbosity Simulation"

func (*Command) SkipDownload ΒΆ

func (c *Command) SkipDownload() *Command

Do not download the video but write all related files

Additional information:

  • See Command.UnsetSkipDownload, for unsetting the flag.
  • SkipDownload maps to cli flags: --skip-download/--no-download.
  • From option group: "Verbosity Simulation"

func (*Command) SkipPlaylistAfterErrors ΒΆ

func (c *Command) SkipPlaylistAfterErrors(n int) *Command

Number of allowed failures until the rest of the playlist is skipped

Additional information:

func (*Command) SkipUnavailableFragments ΒΆ

func (c *Command) SkipUnavailableFragments() *Command

Skip unavailable fragments for DASH, hlsnative and ISM downloads (default)

Additional information:

  • See Command.UnsetSkipUnavailableFragments, for unsetting the flag.
  • SkipUnavailableFragments maps to cli flags: --skip-unavailable-fragments/--no-abort-on-unavailable-fragments.
  • From option group: "Download"

func (*Command) SleepInterval ΒΆ

func (c *Command) SleepInterval(seconds float64) *Command

Number of seconds to sleep before each download. This is the minimum time to sleep when used along with --max-sleep-interval

Additional information:

  • See Command.UnsetSleepInterval, for unsetting the flag.
  • SleepInterval maps to cli flags: --sleep-interval/--min-sleep-interval=SECONDS.
  • From option group: "Workarounds"

func (*Command) SleepRequests ΒΆ

func (c *Command) SleepRequests(seconds float64) *Command

Number of seconds to sleep between requests during data extraction

Additional information:

  • See Command.UnsetSleepRequests, for unsetting the flag.
  • SleepRequests maps to cli flags: --sleep-requests=SECONDS.
  • From option group: "Workarounds"

func (*Command) SleepSubtitles ΒΆ

func (c *Command) SleepSubtitles(seconds int) *Command

Number of seconds to sleep before each subtitle download

Additional information:

  • See Command.UnsetSleepSubtitles, for unsetting the flag.
  • SleepSubtitles maps to cli flags: --sleep-subtitles=SECONDS.
  • From option group: "Workarounds"

func (*Command) SocketTimeout ΒΆ

func (c *Command) SocketTimeout(seconds float64) *Command

Time to wait before giving up, in seconds

Additional information:

  • See Command.UnsetSocketTimeout, for unsetting the flag.
  • SocketTimeout maps to cli flags: --socket-timeout=SECONDS.
  • From option group: "Network"

func (*Command) SourceAddress ΒΆ

func (c *Command) SourceAddress(ip string) *Command

Client-side IP address to bind to

Additional information:

  • See Command.UnsetSourceAddress, for unsetting the flag.
  • SourceAddress maps to cli flags: --source-address=IP.
  • From option group: "Network"

func (*Command) SplitChapters ΒΆ

func (c *Command) SplitChapters() *Command

Split video into multiple files based on internal chapters. The "chapter:" prefix can be used with "--paths" and "--output" to set the output filename for the split files. See "OUTPUT TEMPLATE" for details

References:

Additional information:

  • See Command.UnsetSplitChapters, for unsetting the flag.
  • SplitChapters maps to cli flags: --split-chapters/--split-tracks.
  • From option group: "Post-Processing"

func (*Command) Sponskrub deprecated

func (c *Command) Sponskrub() *Command

Sponskrub sets the "sponskrub" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrub, for unsetting the flag.
  • Sponskrub maps to cli flags: --sponskrub (hidden).
  • From option group: "SponsorBlock"

Deprecated: Use Command.SponsorblockMark with "all" as an argument.

func (*Command) SponskrubArgs deprecated

func (c *Command) SponskrubArgs(args string) *Command

SponskrubArgs sets the "sponskrub-args" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrubArgs, for unsetting the flag.
  • SponskrubArgs maps to cli flags: --sponskrub-args=ARGS (hidden).
  • From option group: "SponsorBlock"

Deprecated: No longer applicable.

func (*Command) SponskrubCut deprecated

func (c *Command) SponskrubCut() *Command

SponskrubCut sets the "sponskrub-cut" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrubCut, for unsetting the flag.
  • SponskrubCut maps to cli flags: --sponskrub-cut (hidden).
  • From option group: "SponsorBlock"

Deprecated: Use Command.SponsorblockRemove with "all" as an argument.

func (*Command) SponskrubForce deprecated

func (c *Command) SponskrubForce() *Command

SponskrubForce sets the "sponskrub-force" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrubForce, for unsetting the flag.
  • SponskrubForce maps to cli flags: --sponskrub-force (hidden).
  • From option group: "SponsorBlock"

Deprecated: No longer applicable.

func (*Command) SponskrubLocation deprecated

func (c *Command) SponskrubLocation(path string) *Command

SponskrubLocation sets the "sponskrub-location" flag (no description specified).

Additional information:

  • See Command.UnsetSponskrubLocation, for unsetting the flag.
  • SponskrubLocation maps to cli flags: --sponskrub-location=PATH (hidden).
  • From option group: "SponsorBlock"

Deprecated: No longer applicable.

func (*Command) SponsorblockAPI ΒΆ

func (c *Command) SponsorblockAPI(url string) *Command

SponsorBlock API location, defaults to https://sponsor.ajay.app

Additional information:

  • See Command.UnsetSponsorblockAPI, for unsetting the flag.
  • SponsorblockAPI maps to cli flags: --sponsorblock-api=URL.
  • From option group: "SponsorBlock"

func (*Command) SponsorblockChapterTitle ΒΆ

func (c *Command) SponsorblockChapterTitle(template string) *Command

An output template for the title of the SponsorBlock chapters created by --sponsorblock-mark. The only available fields are start_time, end_time, category, categories, name, category_names. Defaults to "[SponsorBlock]: %(category_names)l"

Additional information:

  • See Command.UnsetSponsorblockChapterTitle, for unsetting the flag.
  • SponsorblockChapterTitle maps to cli flags: --sponsorblock-chapter-title=TEMPLATE.
  • From option group: "SponsorBlock"

func (*Command) SponsorblockMark ΒΆ

func (c *Command) SponsorblockMark(cats string) *Command

SponsorBlock categories to create chapters for, separated by commas. Available categories are sponsor, intro, outro, selfpromo, preview, filler, interaction, music_offtopic, poi_highlight, chapter, all and default (=all). You can prefix the category with a "-" to exclude it. See [1] for descriptions of the categories. E.g. --sponsorblock-mark all,-preview [1] https://wiki.sponsor.ajay.app/w/Segment_Categories

Additional information:

  • See Command.UnsetSponsorblockMark, for unsetting the flag.
  • SponsorblockMark maps to cli flags: --sponsorblock-mark=CATS.
  • From option group: "SponsorBlock"

func (*Command) SponsorblockRemove ΒΆ

func (c *Command) SponsorblockRemove(cats string) *Command

SponsorBlock categories to be removed from the video file, separated by commas. If a category is present in both mark and remove, remove takes precedence. The syntax and available categories are the same as for --sponsorblock-mark except that "default" refers to "all,-filler" and poi_highlight, chapter are not available

Additional information:

  • See Command.UnsetSponsorblockRemove, for unsetting the flag.
  • SponsorblockRemove maps to cli flags: --sponsorblock-remove=CATS.
  • From option group: "SponsorBlock"

func (*Command) SubFormat ΒΆ

func (c *Command) SubFormat(format string) *Command

Subtitle format; accepts formats preference separated by "/", e.g. "srt" or "ass/srt/best"

Additional information:

  • See Command.UnsetSubFormat, for unsetting the flag.
  • SubFormat maps to cli flags: --sub-format=FORMAT.
  • From option group: "Subtitle"

func (*Command) SubLangs ΒΆ

func (c *Command) SubLangs(langs string) *Command

Languages of the subtitles to download (can be regex) or "all" separated by commas, e.g. --sub-langs "en.*,ja" (where "en.*" is a regex pattern that matches "en" followed by 0 or more of any character). You can prefix the language code with a "-" to exclude it from the requested languages, e.g. --sub-langs all,-live_chat. Use --list-subs for a list of available language tags

Additional information:

  • See Command.UnsetSubLangs, for unsetting the flag.
  • SubLangs maps to cli flags: --sub-langs/--srt-langs=LANGS.
  • From option group: "Subtitle"

func (*Command) ThrottledRate ΒΆ

func (c *Command) ThrottledRate(rate string) *Command

Minimum download rate in bytes per second below which throttling is assumed and the video data is re-extracted, e.g. 100K

Additional information:

  • See Command.UnsetThrottledRate, for unsetting the flag.
  • ThrottledRate maps to cli flags: --throttled-rate=RATE.
  • From option group: "Download"

func (*Command) TrimFilenames ΒΆ

func (c *Command) TrimFilenames(length int) *Command

Limit the filename length (excluding extension) to the specified number of characters

Additional information:

  • See Command.UnsetTrimFilenames, for unsetting the flag.
  • TrimFilenames maps to cli flags: --trim-filenames/--trim-file-names=LENGTH.
  • From option group: "Filesystem"

func (*Command) TwoFactor ΒΆ

func (c *Command) TwoFactor(twofactor string) *Command

Two-factor authentication code

Additional information:

  • See Command.UnsetTwoFactor, for unsetting the flag.
  • TwoFactor maps to cli flags: -2/--twofactor=TWOFACTOR.
  • From option group: "Authentication"

func (*Command) UnsetAbortOnError ΒΆ

func (c *Command) UnsetAbortOnError() *Command

UnsetAbortOnError unsets any flags that were previously set by one of:

func (*Command) UnsetAbortOnUnavailableFragments ΒΆ

func (c *Command) UnsetAbortOnUnavailableFragments() *Command

UnsetAbortOnUnavailableFragments unsets any flags that were previously set by one of:

func (*Command) UnsetAddHeaders ΒΆ

func (c *Command) UnsetAddHeaders() *Command

UnsetAddHeaders unsets any flags that were previously set by one of:

func (*Command) UnsetAgeLimit ΒΆ

func (c *Command) UnsetAgeLimit() *Command

UnsetAgeLimit unsets any flags that were previously set by one of:

func (*Command) UnsetAllFormats ΒΆ

func (c *Command) UnsetAllFormats() *Command

UnsetAllFormats unsets any flags that were previously set by one of:

func (*Command) UnsetAllSubs ΒΆ

func (c *Command) UnsetAllSubs() *Command

UnsetAllSubs unsets any flags that were previously set by one of:

func (*Command) UnsetAllowDynamicMPD ΒΆ

func (c *Command) UnsetAllowDynamicMPD() *Command

UnsetAllowDynamicMPD unsets any flags that were previously set by one of:

func (*Command) UnsetApListMSO ΒΆ

func (c *Command) UnsetApListMSO() *Command

UnsetApListMSO unsets any flags that were previously set by one of:

func (*Command) UnsetApMSO ΒΆ

func (c *Command) UnsetApMSO() *Command

UnsetApMSO unsets any flags that were previously set by one of:

func (*Command) UnsetApPassword ΒΆ

func (c *Command) UnsetApPassword() *Command

UnsetApPassword unsets any flags that were previously set by one of:

func (*Command) UnsetApUsername ΒΆ

func (c *Command) UnsetApUsername() *Command

UnsetApUsername unsets any flags that were previously set by one of:

func (*Command) UnsetAudioFormat ΒΆ

func (c *Command) UnsetAudioFormat() *Command

UnsetAudioFormat unsets any flags that were previously set by one of:

func (*Command) UnsetAudioMultistreams ΒΆ

func (c *Command) UnsetAudioMultistreams() *Command

UnsetAudioMultistreams unsets any flags that were previously set by one of:

func (*Command) UnsetAudioQuality ΒΆ

func (c *Command) UnsetAudioQuality() *Command

UnsetAudioQuality unsets any flags that were previously set by one of:

func (*Command) UnsetAutoNumberSize ΒΆ

func (c *Command) UnsetAutoNumberSize() *Command

UnsetAutoNumberSize unsets any flags that were previously set by one of:

func (*Command) UnsetAutoNumberStart ΒΆ

func (c *Command) UnsetAutoNumberStart() *Command

UnsetAutoNumberStart unsets any flags that were previously set by one of:

func (*Command) UnsetBatchFile ΒΆ

func (c *Command) UnsetBatchFile() *Command

UnsetBatchFile unsets any flags that were previously set by one of:

func (*Command) UnsetBidiWorkaround ΒΆ

func (c *Command) UnsetBidiWorkaround() *Command

UnsetBidiWorkaround unsets any flags that were previously set by one of:

func (*Command) UnsetBreakMatchFilters ΒΆ

func (c *Command) UnsetBreakMatchFilters() *Command

UnsetBreakMatchFilters unsets any flags that were previously set by one of:

func (*Command) UnsetBreakOnExisting ΒΆ

func (c *Command) UnsetBreakOnExisting() *Command

UnsetBreakOnExisting unsets any flags that were previously set by one of:

func (*Command) UnsetBreakOnReject ΒΆ

func (c *Command) UnsetBreakOnReject() *Command

UnsetBreakOnReject unsets any flags that were previously set by one of:

func (*Command) UnsetBreakPerInput ΒΆ

func (c *Command) UnsetBreakPerInput() *Command

UnsetBreakPerInput unsets any flags that were previously set by one of:

func (*Command) UnsetBufferSize ΒΆ

func (c *Command) UnsetBufferSize() *Command

UnsetBufferSize unsets any flags that were previously set by one of:

func (*Command) UnsetCNVerificationProxy deprecated

func (c *Command) UnsetCNVerificationProxy() *Command

UnsetCNVerificationProxy unsets any flags that were previously set by one of:

Deprecated: Use Command.GeoVerificationProxy instead.

func (*Command) UnsetCacheDir ΒΆ

func (c *Command) UnsetCacheDir() *Command

UnsetCacheDir unsets any flags that were previously set by one of:

func (*Command) UnsetCallHome deprecated

func (c *Command) UnsetCallHome() *Command

UnsetCallHome unsets any flags that were previously set by one of:

Deprecated: Not implemented.

func (*Command) UnsetCheckAllFormats ΒΆ

func (c *Command) UnsetCheckAllFormats() *Command

UnsetCheckAllFormats unsets any flags that were previously set by one of:

func (*Command) UnsetCheckCertificates ΒΆ

func (c *Command) UnsetCheckCertificates() *Command

UnsetCheckCertificates unsets any flags that were previously set by one of:

func (*Command) UnsetCheckFormats ΒΆ

func (c *Command) UnsetCheckFormats() *Command

UnsetCheckFormats unsets any flags that were previously set by one of:

func (*Command) UnsetCleanInfoJSON ΒΆ

func (c *Command) UnsetCleanInfoJSON() *Command

UnsetCleanInfoJSON unsets any flags that were previously set by one of:

func (*Command) UnsetClientCertificate ΒΆ

func (c *Command) UnsetClientCertificate() *Command

UnsetClientCertificate unsets any flags that were previously set by one of:

func (*Command) UnsetClientCertificateKey ΒΆ

func (c *Command) UnsetClientCertificateKey() *Command

UnsetClientCertificateKey unsets any flags that were previously set by one of:

func (*Command) UnsetClientCertificatePassword ΒΆ

func (c *Command) UnsetClientCertificatePassword() *Command

UnsetClientCertificatePassword unsets any flags that were previously set by one of:

func (*Command) UnsetColor ΒΆ

func (c *Command) UnsetColor() *Command

UnsetColor unsets any flags that were previously set by one of:

func (*Command) UnsetColors ΒΆ

func (c *Command) UnsetColors() *Command

UnsetColors unsets any flags that were previously set by one of:

func (*Command) UnsetCompatOptions ΒΆ

func (c *Command) UnsetCompatOptions() *Command

UnsetCompatOptions unsets any flags that were previously set by one of:

func (*Command) UnsetConcatPlaylist ΒΆ

func (c *Command) UnsetConcatPlaylist() *Command

UnsetConcatPlaylist unsets any flags that were previously set by one of:

func (*Command) UnsetConcurrentFragments ΒΆ

func (c *Command) UnsetConcurrentFragments() *Command

UnsetConcurrentFragments unsets any flags that were previously set by one of:

func (*Command) UnsetConfigLocations ΒΆ

func (c *Command) UnsetConfigLocations() *Command

UnsetConfigLocations unsets any flags that were previously set by one of:

func (*Command) UnsetConsoleTitle ΒΆ

func (c *Command) UnsetConsoleTitle() *Command

UnsetConsoleTitle unsets any flags that were previously set by one of:

func (*Command) UnsetContinue ΒΆ

func (c *Command) UnsetContinue() *Command

UnsetContinue unsets any flags that were previously set by one of:

func (*Command) UnsetConvertSubs ΒΆ

func (c *Command) UnsetConvertSubs() *Command

UnsetConvertSubs unsets any flags that were previously set by one of:

func (*Command) UnsetConvertThumbnails ΒΆ

func (c *Command) UnsetConvertThumbnails() *Command

UnsetConvertThumbnails unsets any flags that were previously set by one of:

func (*Command) UnsetCookies ΒΆ

func (c *Command) UnsetCookies() *Command

UnsetCookies unsets any flags that were previously set by one of:

func (*Command) UnsetCookiesFromBrowser ΒΆ

func (c *Command) UnsetCookiesFromBrowser() *Command

UnsetCookiesFromBrowser unsets any flags that were previously set by one of:

func (*Command) UnsetDate ΒΆ

func (c *Command) UnsetDate() *Command

UnsetDate unsets any flags that were previously set by one of:

func (*Command) UnsetDateAfter ΒΆ

func (c *Command) UnsetDateAfter() *Command

UnsetDateAfter unsets any flags that were previously set by one of:

func (*Command) UnsetDateBefore ΒΆ

func (c *Command) UnsetDateBefore() *Command

UnsetDateBefore unsets any flags that were previously set by one of:

func (*Command) UnsetDefaultSearch ΒΆ

func (c *Command) UnsetDefaultSearch() *Command

UnsetDefaultSearch unsets any flags that were previously set by one of:

func (*Command) UnsetDownloadArchive ΒΆ

func (c *Command) UnsetDownloadArchive() *Command

UnsetDownloadArchive unsets any flags that were previously set by one of:

func (*Command) UnsetDownloadSections ΒΆ

func (c *Command) UnsetDownloadSections() *Command

UnsetDownloadSections unsets any flags that were previously set by one of:

func (*Command) UnsetDownloader ΒΆ

func (c *Command) UnsetDownloader() *Command

UnsetDownloader unsets any flags that were previously set by one of:

func (*Command) UnsetDownloaderArgs ΒΆ

func (c *Command) UnsetDownloaderArgs() *Command

UnsetDownloaderArgs unsets any flags that were previously set by one of:

func (*Command) UnsetDumpJSON ΒΆ

func (c *Command) UnsetDumpJSON() *Command

UnsetDumpJSON unsets any flags that were previously set by one of:

func (*Command) UnsetDumpPages ΒΆ

func (c *Command) UnsetDumpPages() *Command

UnsetDumpPages unsets any flags that were previously set by one of:

func (*Command) UnsetDumpSingleJSON ΒΆ

func (c *Command) UnsetDumpSingleJSON() *Command

UnsetDumpSingleJSON unsets any flags that were previously set by one of:

func (*Command) UnsetEmbedChapters ΒΆ

func (c *Command) UnsetEmbedChapters() *Command

UnsetEmbedChapters unsets any flags that were previously set by one of:

func (*Command) UnsetEmbedInfoJSON ΒΆ

func (c *Command) UnsetEmbedInfoJSON() *Command

UnsetEmbedInfoJSON unsets any flags that were previously set by one of:

func (*Command) UnsetEmbedMetadata ΒΆ

func (c *Command) UnsetEmbedMetadata() *Command

UnsetEmbedMetadata unsets any flags that were previously set by one of:

func (*Command) UnsetEmbedSubs ΒΆ

func (c *Command) UnsetEmbedSubs() *Command

UnsetEmbedSubs unsets any flags that were previously set by one of:

func (*Command) UnsetEmbedThumbnail ΒΆ

func (c *Command) UnsetEmbedThumbnail() *Command

UnsetEmbedThumbnail unsets any flags that were previously set by one of:

func (*Command) UnsetEnableFileURLs ΒΆ

func (c *Command) UnsetEnableFileURLs() *Command

UnsetEnableFileURLs unsets any flags that were previously set by one of:

func (*Command) UnsetEncoding ΒΆ

func (c *Command) UnsetEncoding() *Command

UnsetEncoding unsets any flags that were previously set by one of:

func (*Command) UnsetExec ΒΆ

func (c *Command) UnsetExec() *Command

UnsetExec unsets any flags that were previously set by one of:

func (*Command) UnsetExecBeforeDownload ΒΆ

func (c *Command) UnsetExecBeforeDownload() *Command

UnsetExecBeforeDownload unsets any flags that were previously set by one of:

func (*Command) UnsetExtractAudio ΒΆ

func (c *Command) UnsetExtractAudio() *Command

UnsetExtractAudio unsets any flags that were previously set by one of:

func (*Command) UnsetExtractorArgs ΒΆ

func (c *Command) UnsetExtractorArgs() *Command

UnsetExtractorArgs unsets any flags that were previously set by one of:

func (*Command) UnsetExtractorRetries ΒΆ

func (c *Command) UnsetExtractorRetries() *Command

UnsetExtractorRetries unsets any flags that were previously set by one of:

func (*Command) UnsetFFmpegLocation ΒΆ

func (c *Command) UnsetFFmpegLocation() *Command

UnsetFFmpegLocation unsets any flags that were previously set by one of:

func (*Command) UnsetFileAccessRetries ΒΆ

func (c *Command) UnsetFileAccessRetries() *Command

UnsetFileAccessRetries unsets any flags that were previously set by one of:

func (*Command) UnsetFixup ΒΆ

func (c *Command) UnsetFixup() *Command

UnsetFixup unsets any flags that were previously set by one of:

func (*Command) UnsetFlatPlaylist ΒΆ

func (c *Command) UnsetFlatPlaylist() *Command

UnsetFlatPlaylist unsets any flags that were previously set by one of:

func (*Command) UnsetForceGenericExtractor ΒΆ

func (c *Command) UnsetForceGenericExtractor() *Command

UnsetForceGenericExtractor unsets any flags that were previously set by one of:

func (*Command) UnsetForceIPv4 ΒΆ

func (c *Command) UnsetForceIPv4() *Command

UnsetForceIPv4 unsets any flags that were previously set by one of:

func (*Command) UnsetForceIPv6 ΒΆ

func (c *Command) UnsetForceIPv6() *Command

UnsetForceIPv6 unsets any flags that were previously set by one of:

func (*Command) UnsetForceKeyframesAtCuts ΒΆ

func (c *Command) UnsetForceKeyframesAtCuts() *Command

UnsetForceKeyframesAtCuts unsets any flags that were previously set by one of:

func (*Command) UnsetForceOverwrites ΒΆ

func (c *Command) UnsetForceOverwrites() *Command

UnsetForceOverwrites unsets any flags that were previously set by one of:

func (*Command) UnsetForceWriteArchive ΒΆ

func (c *Command) UnsetForceWriteArchive() *Command

UnsetForceWriteArchive unsets any flags that were previously set by one of:

func (*Command) UnsetFormat ΒΆ

func (c *Command) UnsetFormat() *Command

UnsetFormat unsets any flags that were previously set by one of:

func (*Command) UnsetFormatSort ΒΆ

func (c *Command) UnsetFormatSort() *Command

UnsetFormatSort unsets any flags that were previously set by one of:

func (*Command) UnsetFormatSortForce ΒΆ

func (c *Command) UnsetFormatSortForce() *Command

UnsetFormatSortForce unsets any flags that were previously set by one of:

func (*Command) UnsetFragmentRetries ΒΆ

func (c *Command) UnsetFragmentRetries() *Command

UnsetFragmentRetries unsets any flags that were previously set by one of:

func (*Command) UnsetGeoBypass ΒΆ

func (c *Command) UnsetGeoBypass() *Command

UnsetGeoBypass unsets any flags that were previously set by one of:

func (*Command) UnsetGeoBypassCountry ΒΆ

func (c *Command) UnsetGeoBypassCountry() *Command

UnsetGeoBypassCountry unsets any flags that were previously set by one of:

func (*Command) UnsetGeoBypassIPBlock ΒΆ

func (c *Command) UnsetGeoBypassIPBlock() *Command

UnsetGeoBypassIPBlock unsets any flags that were previously set by one of:

func (*Command) UnsetGeoVerificationProxy ΒΆ

func (c *Command) UnsetGeoVerificationProxy() *Command

UnsetGeoVerificationProxy unsets any flags that were previously set by one of:

func (*Command) UnsetGetDescription ΒΆ

func (c *Command) UnsetGetDescription() *Command

UnsetGetDescription unsets any flags that were previously set by one of:

func (*Command) UnsetGetDuration ΒΆ

func (c *Command) UnsetGetDuration() *Command

UnsetGetDuration unsets any flags that were previously set by one of:

func (*Command) UnsetGetFilename ΒΆ

func (c *Command) UnsetGetFilename() *Command

UnsetGetFilename unsets any flags that were previously set by one of:

func (*Command) UnsetGetFormat ΒΆ

func (c *Command) UnsetGetFormat() *Command

UnsetGetFormat unsets any flags that were previously set by one of:

func (*Command) UnsetGetID ΒΆ

func (c *Command) UnsetGetID() *Command

UnsetGetID unsets any flags that were previously set by one of:

func (*Command) UnsetGetThumbnail ΒΆ

func (c *Command) UnsetGetThumbnail() *Command

UnsetGetThumbnail unsets any flags that were previously set by one of:

func (*Command) UnsetGetTitle ΒΆ

func (c *Command) UnsetGetTitle() *Command

UnsetGetTitle unsets any flags that were previously set by one of:

func (*Command) UnsetGetURL ΒΆ

func (c *Command) UnsetGetURL() *Command

UnsetGetURL unsets any flags that were previously set by one of:

func (*Command) UnsetHLSPreferFFmpeg ΒΆ

func (c *Command) UnsetHLSPreferFFmpeg() *Command

UnsetHLSPreferFFmpeg unsets any flags that were previously set by one of:

func (*Command) UnsetHLSPreferNative ΒΆ

func (c *Command) UnsetHLSPreferNative() *Command

UnsetHLSPreferNative unsets any flags that were previously set by one of:

func (*Command) UnsetHLSSplitDiscontinuity ΒΆ

func (c *Command) UnsetHLSSplitDiscontinuity() *Command

UnsetHLSSplitDiscontinuity unsets any flags that were previously set by one of:

func (*Command) UnsetHLSUseMPEGTS ΒΆ

func (c *Command) UnsetHLSUseMPEGTS() *Command

UnsetHLSUseMPEGTS unsets any flags that were previously set by one of:

func (*Command) UnsetHTTPChunkSize ΒΆ

func (c *Command) UnsetHTTPChunkSize() *Command

UnsetHTTPChunkSize unsets any flags that were previously set by one of:

func (*Command) UnsetID ΒΆ

func (c *Command) UnsetID() *Command

UnsetID unsets any flags that were previously set by one of:

func (*Command) UnsetIgnoreConfig ΒΆ

func (c *Command) UnsetIgnoreConfig() *Command

UnsetIgnoreConfig unsets any flags that were previously set by one of:

func (*Command) UnsetIgnoreDynamicMPD ΒΆ

func (c *Command) UnsetIgnoreDynamicMPD() *Command

UnsetIgnoreDynamicMPD unsets any flags that were previously set by one of:

func (*Command) UnsetIgnoreErrors ΒΆ

func (c *Command) UnsetIgnoreErrors() *Command

UnsetIgnoreErrors unsets any flags that were previously set by one of:

func (*Command) UnsetIgnoreNoFormatsError ΒΆ

func (c *Command) UnsetIgnoreNoFormatsError() *Command

UnsetIgnoreNoFormatsError unsets any flags that were previously set by one of:

func (*Command) UnsetImpersonate ΒΆ

func (c *Command) UnsetImpersonate() *Command

UnsetImpersonate unsets any flags that were previously set by one of:

func (*Command) UnsetIncludeAds deprecated

func (c *Command) UnsetIncludeAds() *Command

UnsetIncludeAds unsets any flags that were previously set by one of:

Deprecated: No longer supported.

func (*Command) UnsetKeepFragments ΒΆ

func (c *Command) UnsetKeepFragments() *Command

UnsetKeepFragments unsets any flags that were previously set by one of:

func (*Command) UnsetKeepVideo ΒΆ

func (c *Command) UnsetKeepVideo() *Command

UnsetKeepVideo unsets any flags that were previously set by one of:

func (*Command) UnsetLazyPlaylist ΒΆ

func (c *Command) UnsetLazyPlaylist() *Command

UnsetLazyPlaylist unsets any flags that were previously set by one of:

func (*Command) UnsetLegacyServerConnect ΒΆ

func (c *Command) UnsetLegacyServerConnect() *Command

UnsetLegacyServerConnect unsets any flags that were previously set by one of:

func (*Command) UnsetLimitRate ΒΆ

func (c *Command) UnsetLimitRate() *Command

UnsetLimitRate unsets any flags that were previously set by one of:

func (*Command) UnsetListFormats ΒΆ

func (c *Command) UnsetListFormats() *Command

UnsetListFormats unsets any flags that were previously set by one of:

func (*Command) UnsetListFormatsAsTable ΒΆ

func (c *Command) UnsetListFormatsAsTable() *Command

UnsetListFormatsAsTable unsets any flags that were previously set by one of:

func (*Command) UnsetListFormatsOld ΒΆ

func (c *Command) UnsetListFormatsOld() *Command

UnsetListFormatsOld unsets any flags that were previously set by one of:

func (*Command) UnsetListImpersonateTargets ΒΆ

func (c *Command) UnsetListImpersonateTargets() *Command

UnsetListImpersonateTargets unsets any flags that were previously set by one of:

func (*Command) UnsetListSubs ΒΆ

func (c *Command) UnsetListSubs() *Command

UnsetListSubs unsets any flags that were previously set by one of:

func (*Command) UnsetListThumbnails ΒΆ

func (c *Command) UnsetListThumbnails() *Command

UnsetListThumbnails unsets any flags that were previously set by one of:

func (*Command) UnsetLiveFromStart ΒΆ

func (c *Command) UnsetLiveFromStart() *Command

UnsetLiveFromStart unsets any flags that were previously set by one of:

func (*Command) UnsetLoadInfoJSON ΒΆ

func (c *Command) UnsetLoadInfoJSON() *Command

UnsetLoadInfoJSON unsets any flags that were previously set by one of:

func (*Command) UnsetMarkWatched ΒΆ

func (c *Command) UnsetMarkWatched() *Command

UnsetMarkWatched unsets any flags that were previously set by one of:

func (*Command) UnsetMatchFilters ΒΆ

func (c *Command) UnsetMatchFilters() *Command

UnsetMatchFilters unsets any flags that were previously set by one of:

func (*Command) UnsetMatchTitle ΒΆ

func (c *Command) UnsetMatchTitle() *Command

UnsetMatchTitle unsets any flags that were previously set by one of:

func (*Command) UnsetMaxDownloads ΒΆ

func (c *Command) UnsetMaxDownloads() *Command

UnsetMaxDownloads unsets any flags that were previously set by one of:

func (*Command) UnsetMaxFileSize ΒΆ

func (c *Command) UnsetMaxFileSize() *Command

UnsetMaxFileSize unsets any flags that were previously set by one of:

func (*Command) UnsetMaxSleepInterval ΒΆ

func (c *Command) UnsetMaxSleepInterval() *Command

UnsetMaxSleepInterval unsets any flags that were previously set by one of:

func (*Command) UnsetMaxViews ΒΆ

func (c *Command) UnsetMaxViews() *Command

UnsetMaxViews unsets any flags that were previously set by one of:

func (*Command) UnsetMergeOutputFormat ΒΆ

func (c *Command) UnsetMergeOutputFormat() *Command

UnsetMergeOutputFormat unsets any flags that were previously set by one of:

func (*Command) UnsetMetadataFromTitle ΒΆ

func (c *Command) UnsetMetadataFromTitle() *Command

UnsetMetadataFromTitle unsets any flags that were previously set by one of:

func (*Command) UnsetMinFileSize ΒΆ

func (c *Command) UnsetMinFileSize() *Command

UnsetMinFileSize unsets any flags that were previously set by one of:

func (*Command) UnsetMinViews ΒΆ

func (c *Command) UnsetMinViews() *Command

UnsetMinViews unsets any flags that were previously set by one of:

func (*Command) UnsetMtime ΒΆ

func (c *Command) UnsetMtime() *Command

UnsetMtime unsets any flags that were previously set by one of:

func (*Command) UnsetNetrc ΒΆ

func (c *Command) UnsetNetrc() *Command

UnsetNetrc unsets any flags that were previously set by one of:

func (*Command) UnsetNetrcCmd ΒΆ

func (c *Command) UnsetNetrcCmd() *Command

UnsetNetrcCmd unsets any flags that were previously set by one of:

func (*Command) UnsetNetrcLocation ΒΆ

func (c *Command) UnsetNetrcLocation() *Command

UnsetNetrcLocation unsets any flags that were previously set by one of:

func (*Command) UnsetNewline ΒΆ

func (c *Command) UnsetNewline() *Command

UnsetNewline unsets any flags that were previously set by one of:

func (*Command) UnsetOutput ΒΆ

func (c *Command) UnsetOutput() *Command

UnsetOutput unsets any flags that were previously set by one of:

func (*Command) UnsetOutputNaPlaceholder ΒΆ

func (c *Command) UnsetOutputNaPlaceholder() *Command

UnsetOutputNaPlaceholder unsets any flags that were previously set by one of:

func (*Command) UnsetOverwrites ΒΆ

func (c *Command) UnsetOverwrites() *Command

UnsetOverwrites unsets any flags that were previously set by one of:

func (*Command) UnsetParseMetadata ΒΆ

func (c *Command) UnsetParseMetadata() *Command

UnsetParseMetadata unsets any flags that were previously set by one of:

func (*Command) UnsetPart ΒΆ

func (c *Command) UnsetPart() *Command

UnsetPart unsets any flags that were previously set by one of:

func (*Command) UnsetPassword ΒΆ

func (c *Command) UnsetPassword() *Command

UnsetPassword unsets any flags that were previously set by one of:

func (*Command) UnsetPaths ΒΆ

func (c *Command) UnsetPaths() *Command

UnsetPaths unsets any flags that were previously set by one of:

func (*Command) UnsetPlaylist ΒΆ

func (c *Command) UnsetPlaylist() *Command

UnsetPlaylist unsets any flags that were previously set by one of:

func (*Command) UnsetPlaylistEnd ΒΆ

func (c *Command) UnsetPlaylistEnd() *Command

UnsetPlaylistEnd unsets any flags that were previously set by one of:

func (*Command) UnsetPlaylistItems ΒΆ

func (c *Command) UnsetPlaylistItems() *Command

UnsetPlaylistItems unsets any flags that were previously set by one of:

func (*Command) UnsetPlaylistRandom ΒΆ

func (c *Command) UnsetPlaylistRandom() *Command

UnsetPlaylistRandom unsets any flags that were previously set by one of:

func (*Command) UnsetPlaylistReverse ΒΆ

func (c *Command) UnsetPlaylistReverse() *Command

UnsetPlaylistReverse unsets any flags that were previously set by one of:

func (*Command) UnsetPlaylistStart ΒΆ

func (c *Command) UnsetPlaylistStart() *Command

UnsetPlaylistStart unsets any flags that were previously set by one of:

func (*Command) UnsetPluginDirs ΒΆ

func (c *Command) UnsetPluginDirs() *Command

UnsetPluginDirs unsets any flags that were previously set by one of:

func (*Command) UnsetPostOverwrites ΒΆ

func (c *Command) UnsetPostOverwrites() *Command

UnsetPostOverwrites unsets any flags that were previously set by one of:

func (*Command) UnsetPostProcessorArgs ΒΆ

func (c *Command) UnsetPostProcessorArgs() *Command

UnsetPostProcessorArgs unsets any flags that were previously set by one of:

func (*Command) UnsetPreferAVConv deprecated

func (c *Command) UnsetPreferAVConv() *Command

UnsetPreferAVConv unsets any flags that were previously set by one of:

Deprecated: avconv is not officially supported by yt-dlp.

func (*Command) UnsetPreferFFmpeg deprecated

func (c *Command) UnsetPreferFFmpeg() *Command

UnsetPreferFFmpeg unsets any flags that were previously set by one of:

Deprecated: This flag is now default in yt-dlp.

func (*Command) UnsetPreferFreeFormats ΒΆ

func (c *Command) UnsetPreferFreeFormats() *Command

UnsetPreferFreeFormats unsets any flags that were previously set by one of:

func (*Command) UnsetPreferInsecure ΒΆ

func (c *Command) UnsetPreferInsecure() *Command

UnsetPreferInsecure unsets any flags that were previously set by one of:

func (*Command) UnsetPrint ΒΆ

func (c *Command) UnsetPrint() *Command

UnsetPrint unsets any flags that were previously set by one of:

func (*Command) UnsetPrintJSON ΒΆ

func (c *Command) UnsetPrintJSON() *Command

UnsetPrintJSON unsets any flags that were previously set by one of:

func (*Command) UnsetPrintToFile ΒΆ

func (c *Command) UnsetPrintToFile() *Command

UnsetPrintToFile unsets any flags that were previously set by one of:

func (*Command) UnsetPrintTraffic ΒΆ

func (c *Command) UnsetPrintTraffic() *Command

UnsetPrintTraffic unsets any flags that were previously set by one of:

func (*Command) UnsetProgress ΒΆ

func (c *Command) UnsetProgress() *Command

UnsetProgress unsets any flags that were previously set by one of:

func (*Command) UnsetProgressDelta ΒΆ

func (c *Command) UnsetProgressDelta() *Command

UnsetProgressDelta unsets any flags that were previously set by one of:

func (*Command) UnsetProgressFunc ΒΆ

func (c *Command) UnsetProgressFunc() *Command

UnsetProgressFunc can be used to unset the progress function that was previously set with Command.ProgressFunc.

func (*Command) UnsetProgressTemplate ΒΆ

func (c *Command) UnsetProgressTemplate() *Command

UnsetProgressTemplate unsets any flags that were previously set by one of:

func (*Command) UnsetProxy ΒΆ

func (c *Command) UnsetProxy() *Command

UnsetProxy unsets any flags that were previously set by one of:

func (*Command) UnsetQuiet ΒΆ

func (c *Command) UnsetQuiet() *Command

UnsetQuiet unsets any flags that were previously set by one of:

func (*Command) UnsetRecodeVideo ΒΆ

func (c *Command) UnsetRecodeVideo() *Command

UnsetRecodeVideo unsets any flags that were previously set by one of:

func (*Command) UnsetReferer ΒΆ

func (c *Command) UnsetReferer() *Command

UnsetReferer unsets any flags that were previously set by one of:

func (*Command) UnsetRejectTitle ΒΆ

func (c *Command) UnsetRejectTitle() *Command

UnsetRejectTitle unsets any flags that were previously set by one of:

func (*Command) UnsetRemoveChapters ΒΆ

func (c *Command) UnsetRemoveChapters() *Command

UnsetRemoveChapters unsets any flags that were previously set by one of:

func (*Command) UnsetRemuxVideo ΒΆ

func (c *Command) UnsetRemuxVideo() *Command

UnsetRemuxVideo unsets any flags that were previously set by one of:

func (*Command) UnsetReplaceInMetadata ΒΆ

func (c *Command) UnsetReplaceInMetadata() *Command

UnsetReplaceInMetadata unsets any flags that were previously set by one of:

func (*Command) UnsetResizeBuffer ΒΆ

func (c *Command) UnsetResizeBuffer() *Command

UnsetResizeBuffer unsets any flags that were previously set by one of:

func (*Command) UnsetRestrictFilenames ΒΆ

func (c *Command) UnsetRestrictFilenames() *Command

UnsetRestrictFilenames unsets any flags that were previously set by one of:

func (*Command) UnsetRetries ΒΆ

func (c *Command) UnsetRetries() *Command

UnsetRetries unsets any flags that were previously set by one of:

func (*Command) UnsetRetrySleep ΒΆ

func (c *Command) UnsetRetrySleep() *Command

UnsetRetrySleep unsets any flags that were previously set by one of:

func (*Command) UnsetRmCacheDir ΒΆ

func (c *Command) UnsetRmCacheDir() *Command

UnsetRmCacheDir unsets any flags that were previously set by one of:

func (*Command) UnsetSimulate ΒΆ

func (c *Command) UnsetSimulate() *Command

UnsetSimulate unsets any flags that were previously set by one of:

func (*Command) UnsetSkipDownload ΒΆ

func (c *Command) UnsetSkipDownload() *Command

UnsetSkipDownload unsets any flags that were previously set by one of:

func (*Command) UnsetSkipPlaylistAfterErrors ΒΆ

func (c *Command) UnsetSkipPlaylistAfterErrors() *Command

UnsetSkipPlaylistAfterErrors unsets any flags that were previously set by one of:

func (*Command) UnsetSkipUnavailableFragments ΒΆ

func (c *Command) UnsetSkipUnavailableFragments() *Command

UnsetSkipUnavailableFragments unsets any flags that were previously set by one of:

func (*Command) UnsetSleepInterval ΒΆ

func (c *Command) UnsetSleepInterval() *Command

UnsetSleepInterval unsets any flags that were previously set by one of:

func (*Command) UnsetSleepRequests ΒΆ

func (c *Command) UnsetSleepRequests() *Command

UnsetSleepRequests unsets any flags that were previously set by one of:

func (*Command) UnsetSleepSubtitles ΒΆ

func (c *Command) UnsetSleepSubtitles() *Command

UnsetSleepSubtitles unsets any flags that were previously set by one of:

func (*Command) UnsetSocketTimeout ΒΆ

func (c *Command) UnsetSocketTimeout() *Command

UnsetSocketTimeout unsets any flags that were previously set by one of:

func (*Command) UnsetSourceAddress ΒΆ

func (c *Command) UnsetSourceAddress() *Command

UnsetSourceAddress unsets any flags that were previously set by one of:

func (*Command) UnsetSplitChapters ΒΆ

func (c *Command) UnsetSplitChapters() *Command

UnsetSplitChapters unsets any flags that were previously set by one of:

func (*Command) UnsetSponskrub deprecated

func (c *Command) UnsetSponskrub() *Command

UnsetSponskrub unsets any flags that were previously set by one of:

Deprecated: Use Command.SponsorblockMark with "all" as an argument.

func (*Command) UnsetSponskrubArgs deprecated

func (c *Command) UnsetSponskrubArgs() *Command

UnsetSponskrubArgs unsets any flags that were previously set by one of:

Deprecated: No longer applicable.

func (*Command) UnsetSponskrubCut deprecated

func (c *Command) UnsetSponskrubCut() *Command

UnsetSponskrubCut unsets any flags that were previously set by one of:

Deprecated: Use Command.SponsorblockRemove with "all" as an argument.

func (*Command) UnsetSponskrubForce deprecated

func (c *Command) UnsetSponskrubForce() *Command

UnsetSponskrubForce unsets any flags that were previously set by one of:

Deprecated: No longer applicable.

func (*Command) UnsetSponskrubLocation deprecated

func (c *Command) UnsetSponskrubLocation() *Command

UnsetSponskrubLocation unsets any flags that were previously set by one of:

Deprecated: No longer applicable.

func (*Command) UnsetSponsorblock ΒΆ

func (c *Command) UnsetSponsorblock() *Command

UnsetSponsorblock unsets any flags that were previously set by one of:

func (*Command) UnsetSponsorblockAPI ΒΆ

func (c *Command) UnsetSponsorblockAPI() *Command

UnsetSponsorblockAPI unsets any flags that were previously set by one of:

func (*Command) UnsetSponsorblockChapterTitle ΒΆ

func (c *Command) UnsetSponsorblockChapterTitle() *Command

UnsetSponsorblockChapterTitle unsets any flags that were previously set by one of:

func (*Command) UnsetSponsorblockMark ΒΆ

func (c *Command) UnsetSponsorblockMark() *Command

UnsetSponsorblockMark unsets any flags that were previously set by one of:

func (*Command) UnsetSponsorblockRemove ΒΆ

func (c *Command) UnsetSponsorblockRemove() *Command

UnsetSponsorblockRemove unsets any flags that were previously set by one of:

func (*Command) UnsetSubFormat ΒΆ

func (c *Command) UnsetSubFormat() *Command

UnsetSubFormat unsets any flags that were previously set by one of:

func (*Command) UnsetSubLangs ΒΆ

func (c *Command) UnsetSubLangs() *Command

UnsetSubLangs unsets any flags that were previously set by one of:

func (*Command) UnsetThrottledRate ΒΆ

func (c *Command) UnsetThrottledRate() *Command

UnsetThrottledRate unsets any flags that were previously set by one of:

func (*Command) UnsetTrimFilenames ΒΆ

func (c *Command) UnsetTrimFilenames() *Command

UnsetTrimFilenames unsets any flags that were previously set by one of:

func (*Command) UnsetTwoFactor ΒΆ

func (c *Command) UnsetTwoFactor() *Command

UnsetTwoFactor unsets any flags that were previously set by one of:

func (*Command) UnsetUpdate ΒΆ

func (c *Command) UnsetUpdate() *Command

UnsetUpdate unsets any flags that were previously set by one of:

func (*Command) UnsetUseExtractors ΒΆ

func (c *Command) UnsetUseExtractors() *Command

UnsetUseExtractors unsets any flags that were previously set by one of:

func (*Command) UnsetUsePostProcessor ΒΆ

func (c *Command) UnsetUsePostProcessor() *Command

UnsetUsePostProcessor unsets any flags that were previously set by one of:

func (*Command) UnsetUserAgent ΒΆ

func (c *Command) UnsetUserAgent() *Command

UnsetUserAgent unsets any flags that were previously set by one of:

func (*Command) UnsetUsername ΒΆ

func (c *Command) UnsetUsername() *Command

UnsetUsername unsets any flags that were previously set by one of:

func (*Command) UnsetVerbose ΒΆ

func (c *Command) UnsetVerbose() *Command

UnsetVerbose unsets any flags that were previously set by one of:

func (*Command) UnsetVideoMultistreams ΒΆ

func (c *Command) UnsetVideoMultistreams() *Command

UnsetVideoMultistreams unsets any flags that were previously set by one of:

func (*Command) UnsetVideoPassword ΒΆ

func (c *Command) UnsetVideoPassword() *Command

UnsetVideoPassword unsets any flags that were previously set by one of:

func (*Command) UnsetWaitForVideo ΒΆ

func (c *Command) UnsetWaitForVideo() *Command

UnsetWaitForVideo unsets any flags that were previously set by one of:

func (*Command) UnsetWarnings ΒΆ

func (c *Command) UnsetWarnings() *Command

UnsetWarnings unsets any flags that were previously set by one of:

func (*Command) UnsetWindowsFilenames ΒΆ

func (c *Command) UnsetWindowsFilenames() *Command

UnsetWindowsFilenames unsets any flags that were previously set by one of:

func (*Command) UnsetWriteAllThumbnails ΒΆ

func (c *Command) UnsetWriteAllThumbnails() *Command

UnsetWriteAllThumbnails unsets any flags that were previously set by one of:

func (*Command) UnsetWriteAnnotations deprecated

func (c *Command) UnsetWriteAnnotations() *Command

UnsetWriteAnnotations unsets any flags that were previously set by one of:

Deprecated: No supported site has annotations now.

func (*Command) UnsetWriteAutoSubs ΒΆ

func (c *Command) UnsetWriteAutoSubs() *Command

UnsetWriteAutoSubs unsets any flags that were previously set by one of:

func (*Command) UnsetWriteComments ΒΆ

func (c *Command) UnsetWriteComments() *Command

UnsetWriteComments unsets any flags that were previously set by one of:

func (*Command) UnsetWriteDescription ΒΆ

func (c *Command) UnsetWriteDescription() *Command

UnsetWriteDescription unsets any flags that were previously set by one of:

func (c *Command) UnsetWriteDesktopLink() *Command

UnsetWriteDesktopLink unsets any flags that were previously set by one of:

func (*Command) UnsetWriteInfoJSON ΒΆ

func (c *Command) UnsetWriteInfoJSON() *Command

UnsetWriteInfoJSON unsets any flags that were previously set by one of:

func (c *Command) UnsetWriteLink() *Command

UnsetWriteLink unsets any flags that were previously set by one of:

func (*Command) UnsetWritePages ΒΆ

func (c *Command) UnsetWritePages() *Command

UnsetWritePages unsets any flags that were previously set by one of:

func (*Command) UnsetWritePlaylistMetafiles ΒΆ

func (c *Command) UnsetWritePlaylistMetafiles() *Command

UnsetWritePlaylistMetafiles unsets any flags that were previously set by one of:

func (*Command) UnsetWriteSubs ΒΆ

func (c *Command) UnsetWriteSubs() *Command

UnsetWriteSubs unsets any flags that were previously set by one of:

func (*Command) UnsetWriteThumbnail ΒΆ

func (c *Command) UnsetWriteThumbnail() *Command

UnsetWriteThumbnail unsets any flags that were previously set by one of:

func (c *Command) UnsetWriteURLLink() *Command

UnsetWriteURLLink unsets any flags that were previously set by one of:

func (c *Command) UnsetWriteWeblocLink() *Command

UnsetWriteWeblocLink unsets any flags that were previously set by one of:

func (*Command) UnsetXFF ΒΆ

func (c *Command) UnsetXFF() *Command

UnsetXFF unsets any flags that were previously set by one of:

func (*Command) UnsetXattrSetFileSize ΒΆ

func (c *Command) UnsetXattrSetFileSize() *Command

UnsetXattrSetFileSize unsets any flags that were previously set by one of:

func (*Command) UnsetXattrs ΒΆ

func (c *Command) UnsetXattrs() *Command

UnsetXattrs unsets any flags that were previously set by one of:

func (*Command) UnsetYoutubeIncludeDashManifest ΒΆ

func (c *Command) UnsetYoutubeIncludeDashManifest() *Command

UnsetYoutubeIncludeDashManifest unsets any flags that were previously set by one of:

func (*Command) UnsetYoutubeIncludeHLSManifest ΒΆ

func (c *Command) UnsetYoutubeIncludeHLSManifest() *Command

UnsetYoutubeIncludeHLSManifest unsets any flags that were previously set by one of:

func (*Command) UnsetYoutubeSkipDashManifest ΒΆ

func (c *Command) UnsetYoutubeSkipDashManifest() *Command

UnsetYoutubeSkipDashManifest unsets any flags that were previously set by one of:

func (*Command) UnsetYoutubeSkipHLSManifest ΒΆ

func (c *Command) UnsetYoutubeSkipHLSManifest() *Command

UnsetYoutubeSkipHLSManifest unsets any flags that were previously set by one of:

func (*Command) Update ΒΆ

func (c *Command) Update(ctx context.Context) (*Result, error)

Check if updates are available. You cannot update when running from source code; Use git to pull the latest changes

References:

Additional information:

  • Update maps to cli flags: -U/--update.
  • From option group: "General"

func (*Command) UpdateTo ΒΆ

func (c *Command) UpdateTo(ctx context.Context, value string) (*Result, error)

Upgrade/downgrade to a specific version. CHANNEL can be a repository as well. CHANNEL and TAG default to "stable" and "latest" respectively if omitted; See "UPDATE" for details. Supported channels: stable, nightly, master

References:

Additional information:

  • UpdateTo maps to cli flags: --update-to=[CHANNEL]@[TAG].
  • From option group: "General"

func (*Command) UseExtractors ΒΆ

func (c *Command) UseExtractors(names string) *Command

Extractor names to use separated by commas. You can also use regexes, "all", "default" and "end" (end URL matching); e.g. --ies "holodex.*,end,youtube". Prefix the name with a "-" to exclude it, e.g. --ies default,-generic. Use --list-extractors for a list of extractor names.

Additional information:

  • See Command.UnsetUseExtractors, for unsetting the flag.
  • UseExtractors maps to cli flags: --use-extractors/--ies=NAMES.
  • From option group: "General"

func (*Command) UsePostProcessor ΒΆ

func (c *Command) UsePostProcessor(name string) *Command

The (case-sensitive) name of plugin postprocessors to be enabled, and (optionally) arguments to be passed to it, separated by a colon ":". ARGS are a semicolon ";" delimited list of NAME=VALUE. The "when" argument determines when the postprocessor is invoked. It can be one of "pre_process" (after video extraction), "after_filter" (after video passes filter), "video" (after --format; before --print/--output), "before_dl" (before each video download), "post_process" (after each video download; default), "after_move" (after moving the video file to its final location), "after_video" (after downloading and processing all formats of a video), or "playlist" (at end of playlist). This option can be used multiple times to add different postprocessors

Additional information:

  • See Command.UnsetUsePostProcessor, for unsetting the flag.
  • UsePostProcessor maps to cli flags: --use-postprocessor=NAME[:ARGS].
  • From option group: "Post-Processing"

func (*Command) UserAgent ΒΆ

func (c *Command) UserAgent(ua string) *Command

UserAgent sets the "user-agent" flag (no description specified).

Additional information:

  • See Command.UnsetUserAgent, for unsetting the flag.
  • UserAgent maps to cli flags: --user-agent=UA (hidden).
  • From option group: "Workarounds"

func (*Command) Username ΒΆ

func (c *Command) Username(username string) *Command

Login with this account ID

Additional information:

  • See Command.UnsetUsername, for unsetting the flag.
  • Username maps to cli flags: -u/--username=USERNAME.
  • From option group: "Authentication"

func (*Command) Verbose ΒΆ

func (c *Command) Verbose() *Command

Print various debugging information

Additional information:

  • See Command.UnsetVerbose, for unsetting the flag.
  • Verbose maps to cli flags: -v/--verbose.
  • From option group: "Verbosity Simulation"

func (*Command) Version ΒΆ

func (c *Command) Version(ctx context.Context) (*Result, error)

Print program version and exit

Additional information:

  • Version maps to cli flags: --version.
  • From option group: "General"

func (*Command) VideoMultistreams ΒΆ

func (c *Command) VideoMultistreams() *Command

Allow multiple video streams to be merged into a single file

References:

Additional information:

  • See Command.UnsetVideoMultistreams, for unsetting the flag.
  • VideoMultistreams maps to cli flags: --video-multistreams.
  • From option group: "Video Format"

func (*Command) VideoPassword ΒΆ

func (c *Command) VideoPassword(password string) *Command

Video-specific password

Additional information:

  • See Command.UnsetVideoPassword, for unsetting the flag.
  • VideoPassword maps to cli flags: --video-password=PASSWORD.
  • From option group: "Authentication"

func (*Command) WaitForVideo ΒΆ

func (c *Command) WaitForVideo(min string) *Command

Wait for scheduled streams to become available. Pass the minimum number of seconds (or range) to wait between retries

Additional information:

  • See Command.UnsetWaitForVideo, for unsetting the flag.
  • WaitForVideo maps to cli flags: --wait-for-video=MIN[-MAX].
  • From option group: "General"

func (*Command) WindowsFilenames ΒΆ

func (c *Command) WindowsFilenames() *Command

Force filenames to be Windows-compatible

Additional information:

  • See Command.UnsetWindowsFilenames, for unsetting the flag.
  • WindowsFilenames maps to cli flags: --windows-filenames.
  • From option group: "Filesystem"

func (*Command) WriteAllThumbnails ΒΆ

func (c *Command) WriteAllThumbnails() *Command

Write all thumbnail image formats to disk

Additional information:

  • See Command.UnsetWriteAllThumbnails, for unsetting the flag.
  • WriteAllThumbnails maps to cli flags: --write-all-thumbnails.
  • From option group: "Thumbnail"

func (*Command) WriteAnnotations deprecated

func (c *Command) WriteAnnotations() *Command

WriteAnnotations sets the "write-annotations" flag (no description specified).

Additional information:

  • See Command.UnsetWriteAnnotations, for unsetting the flag.
  • WriteAnnotations maps to cli flags: --write-annotations (hidden).
  • From option group: "Filesystem"

Deprecated: No supported site has annotations now.

func (*Command) WriteAutoSubs ΒΆ

func (c *Command) WriteAutoSubs() *Command

Write automatically generated subtitle file

Additional information:

  • See Command.UnsetWriteAutoSubs, for unsetting the flag.
  • WriteAutoSubs maps to cli flags: --write-auto-subs/--write-automatic-subs.
  • From option group: "Subtitle"

func (*Command) WriteComments ΒΆ

func (c *Command) WriteComments() *Command

Retrieve video comments to be placed in the infojson. The comments are fetched even without this option if the extraction is known to be quick

Additional information:

  • See Command.UnsetWriteComments, for unsetting the flag.
  • WriteComments maps to cli flags: --write-comments/--get-comments.
  • From option group: "Filesystem"

func (*Command) WriteDescription ΒΆ

func (c *Command) WriteDescription() *Command

Write video description to a .description file

Additional information:

  • See Command.UnsetWriteDescription, for unsetting the flag.
  • WriteDescription maps to cli flags: --write-description.
  • From option group: "Filesystem"
func (c *Command) WriteDesktopLink() *Command

Write a .desktop Linux internet shortcut

Additional information:

  • See Command.UnsetWriteDesktopLink, for unsetting the flag.
  • WriteDesktopLink maps to cli flags: --write-desktop-link.
  • From option group: "Internet Shortcut"

func (*Command) WriteInfoJSON ΒΆ

func (c *Command) WriteInfoJSON() *Command

Write video metadata to a .info.json file (this may contain personal information)

Additional information:

  • See Command.UnsetWriteInfoJSON, for unsetting the flag.
  • WriteInfoJSON maps to cli flags: --write-info-json.
  • From option group: "Filesystem"
func (c *Command) WriteLink() *Command

Write an internet shortcut file, depending on the current platform (.url, .webloc or .desktop). The URL may be cached by the OS

Additional information:

  • See Command.UnsetWriteLink, for unsetting the flag.
  • WriteLink maps to cli flags: --write-link.
  • From option group: "Internet Shortcut"

func (*Command) WritePages ΒΆ

func (c *Command) WritePages() *Command

Write downloaded intermediary pages to files in the current directory to debug problems

Additional information:

  • See Command.UnsetWritePages, for unsetting the flag.
  • WritePages maps to cli flags: --write-pages.
  • From option group: "Verbosity Simulation"

func (*Command) WritePlaylistMetafiles ΒΆ

func (c *Command) WritePlaylistMetafiles() *Command

Write playlist metadata in addition to the video metadata when using --write-info-json, --write-description etc. (default)

Additional information:

func (*Command) WriteSubs ΒΆ

func (c *Command) WriteSubs() *Command

Write subtitle file

Additional information:

  • See Command.UnsetWriteSubs, for unsetting the flag.
  • WriteSubs maps to cli flags: --write-subs/--write-srt.
  • From option group: "Subtitle"

func (*Command) WriteThumbnail ΒΆ

func (c *Command) WriteThumbnail() *Command

Write thumbnail image to disk

Additional information:

  • See Command.UnsetWriteThumbnail, for unsetting the flag.
  • WriteThumbnail maps to cli flags: --write-thumbnail.
  • From option group: "Thumbnail"
func (c *Command) WriteURLLink() *Command

Write a .url Windows internet shortcut. The OS caches the URL based on the file path

Additional information:

  • See Command.UnsetWriteURLLink, for unsetting the flag.
  • WriteURLLink maps to cli flags: --write-url-link.
  • From option group: "Internet Shortcut"
func (c *Command) WriteWeblocLink() *Command

Write a .webloc macOS internet shortcut

Additional information:

  • See Command.UnsetWriteWeblocLink, for unsetting the flag.
  • WriteWeblocLink maps to cli flags: --write-webloc-link.
  • From option group: "Internet Shortcut"

func (*Command) XFF ΒΆ

func (c *Command) XFF(value string) *Command

How to fake X-Forwarded-For HTTP header to try bypassing geographic restriction. One of "default" (only when known to be useful), "never", an IP block in CIDR notation, or a two-letter ISO 3166-2 country code

Additional information:

  • See Command.UnsetXFF, for unsetting the flag.
  • XFF maps to cli flags: --xff=VALUE.
  • From option group: "Geo-restriction"

func (*Command) XattrSetFileSize ΒΆ

func (c *Command) XattrSetFileSize() *Command

Set file xattribute ytdl.filesize with expected file size

Additional information:

  • See Command.UnsetXattrSetFileSize, for unsetting the flag.
  • XattrSetFileSize maps to cli flags: --xattr-set-filesize.
  • From option group: "Download"

func (*Command) Xattrs ΒΆ

func (c *Command) Xattrs() *Command

Write metadata to the video file's xattrs (using Dublin Core and XDG standards)

Additional information:

  • See Command.UnsetXattrs, for unsetting the flag.
  • Xattrs maps to cli flags: --xattrs/--xattr.
  • From option group: "Post-Processing"

func (*Command) YesPlaylist ΒΆ

func (c *Command) YesPlaylist() *Command

Download the playlist, if the URL refers to a video and a playlist

Additional information:

  • See Command.UnsetPlaylist, for unsetting the flag.
  • YesPlaylist maps to cli flags: --yes-playlist.
  • From option group: "Video Selection"

func (*Command) YoutubeIncludeDashManifest ΒΆ

func (c *Command) YoutubeIncludeDashManifest() *Command

YoutubeIncludeDashManifest sets the "youtube-include-dash-manifest" flag (no description specified).

Additional information:

  • See Command.UnsetYoutubeIncludeDashManifest, for unsetting the flag.
  • YoutubeIncludeDashManifest maps to cli flags: --youtube-include-dash-manifest/--no-youtube-skip-dash-manifest (hidden).
  • From option group: "Extractor"

func (*Command) YoutubeIncludeHLSManifest ΒΆ

func (c *Command) YoutubeIncludeHLSManifest() *Command

YoutubeIncludeHLSManifest sets the "youtube-include-hls-manifest" flag (no description specified).

Additional information:

  • See Command.UnsetYoutubeIncludeHLSManifest, for unsetting the flag.
  • YoutubeIncludeHLSManifest maps to cli flags: --youtube-include-hls-manifest/--no-youtube-skip-hls-manifest (hidden).
  • From option group: "Extractor"

func (*Command) YoutubeSkipDashManifest ΒΆ

func (c *Command) YoutubeSkipDashManifest() *Command

YoutubeSkipDashManifest sets the "youtube-skip-dash-manifest" flag (no description specified).

Additional information:

  • See Command.UnsetYoutubeSkipDashManifest, for unsetting the flag.
  • YoutubeSkipDashManifest maps to cli flags: --youtube-skip-dash-manifest/--no-youtube-include-dash-manifest (hidden).
  • From option group: "Extractor"

func (*Command) YoutubeSkipHLSManifest ΒΆ

func (c *Command) YoutubeSkipHLSManifest() *Command

YoutubeSkipHLSManifest sets the "youtube-skip-hls-manifest" flag (no description specified).

Additional information:

  • See Command.UnsetYoutubeSkipHLSManifest, for unsetting the flag.
  • YoutubeSkipHLSManifest maps to cli flags: --youtube-skip-hls-manifest/--no-youtube-include-hls-manifest (hidden).
  • From option group: "Extractor"

type ConcatPlaylistOption ΒΆ

type ConcatPlaylistOption string

ConcatPlaylistOption are parameter types for [ConcatPlaylist].

var (
	ConcatPlaylistNever      ConcatPlaylistOption = "never"
	ConcatPlaylistAlways     ConcatPlaylistOption = "always"
	ConcatPlaylistMultiVideo ConcatPlaylistOption = "multi_video"
)

type ErrExitCode ΒΆ

type ErrExitCode struct {
	// contains filtered or unexported fields
}

ErrExitCode is returned when the exit code of the yt-dlp process is non-zero.

func (*ErrExitCode) Error ΒΆ

func (e *ErrExitCode) Error() string

func (*ErrExitCode) Unwrap ΒΆ

func (e *ErrExitCode) Unwrap() error

type ErrMisconfig ΒΆ

type ErrMisconfig struct {
	// contains filtered or unexported fields
}

ErrMisconfig is returned when the yt-dlp executable is not found, or is not configured properly.

func (*ErrMisconfig) Error ΒΆ

func (e *ErrMisconfig) Error() string

func (*ErrMisconfig) Unwrap ΒΆ

func (e *ErrMisconfig) Unwrap() error

type ErrParsing ΒΆ

type ErrParsing struct {
	// contains filtered or unexported fields
}

ErrParsing is returned when the yt-dlp process fails due to an invalid flag or argument, possibly due to a version mismatch or go-ytdlp bug.

func (*ErrParsing) Error ΒΆ

func (e *ErrParsing) Error() string

func (*ErrParsing) Unwrap ΒΆ

func (e *ErrParsing) Unwrap() error

type ErrUnknown ΒΆ

type ErrUnknown struct {
	// contains filtered or unexported fields
}

ErrUnknown is returned when the error is unknown according to go-ytdlp.

func (*ErrUnknown) Error ΒΆ

func (e *ErrUnknown) Error() string

func (*ErrUnknown) Unwrap ΒΆ

func (e *ErrUnknown) Unwrap() error

type ExtractedAvailability ΒΆ

type ExtractedAvailability string
const (
	ExtractedAvailabilityPrivate        ExtractedAvailability = "private"
	ExtractedAvailabilityPremiumOnly    ExtractedAvailability = "premium_only"
	ExtractedAvailabilitySubscriberOnly ExtractedAvailability = "subscriber_only"
	ExtractedAvailabilityNeedsAuth      ExtractedAvailability = "needs_auth"
	ExtractedAvailabilityUnlisted       ExtractedAvailability = "unlisted"
	ExtractedAvailabilityPublic         ExtractedAvailability = "public"
)

type ExtractedChapterData ΒΆ

type ExtractedChapterData struct {
	// StartTime of the chapter in seconds.
	StartTime *float64 `json:"start_time,omitempty"`

	// EndTime of the chapter in seconds.
	EndTime *float64 `json:"end_time,omitempty"`

	// Title of the chapter.
	Title *string `json:"title,omitempty"`
}

type ExtractedFormat ΒΆ

type ExtractedFormat struct {
	// URL is the mandatory URL representing the media:
	//   - plain file media: HTTP URL of this file.
	//   - RTMP: RTMP URL.
	//   - HLS: URL of the M3U8 media playlist.
	//   - HDS: URL of the F4M manifest.
	//   - DASH:
	//       - HTTP URL to plain file media (in case of
	//         unfragmented media)
	//       - URL of the MPD manifest or base URL
	//         representing the media if MPD manifest
	//         is parsed from a string (in case of
	//         fragmented media)
	//   - MSS: URL of the ISM manifest.
	URL string `json:"url"`

	// RequestData to send in POST request to the URL.
	RequestData *string `json:"request_data,omitempty"`

	// ManifestURL is the URL of the manifest file in case of fragmented media:
	//   - HLS: URL of the M3U8 master playlist.
	//   - HDS: URL of the F4M manifest.
	//   - DASH: URL of the MPD manifest.
	//   - MSS: URL of the ISM manifest.
	ManifestURL *string `json:"manifest_url,omitempty"`

	// Extension is the video filename extension. Will be calculated from URL if missing.
	Extension *string `json:"ext,omitempty"`

	// A human-readable description of the format ("mp4 container with h264/opus").
	// Calculated from the format_id, width, height. and format_note fields if missing.
	Format *string `json:"format,omitempty"`

	// FormatID is a short description of the format ("mp4_h264_opus" or "19").
	// Technically optional, but strongly recommended.
	FormatID *string `json:"format_id,omitempty"`

	// FormatNote is additional info about the format ("3D" or "DASH video").
	FormatNote *string `json:"format_note,omitempty"`

	// Width of the video, if known.
	Width *float64 `json:"width,omitempty"`

	// Height of the video, if known.
	Height *float64 `json:"height,omitempty"`

	// AspectRatio is the aspect ratio of the video, if known. Automatically calculated
	// from width and height (e.g. 1.78, which would be 16:9).
	AspectRatio *float64 `json:"aspect_ratio,omitempty"`

	// Resolution is the textual description of width and height. Automatically
	// calculated from width and height.
	Resolution *string `json:"resolution,omitempty"`

	// TBR is the average bitrate of audio and video in KBit/s.
	TBR *float64 `json:"tbr,omitempty"`

	// ABR is the average audio bitrate in KBit/s.
	ABR *float64 `json:"abr,omitempty"`

	// ACodev is the name of the audio codec in use.
	ACodec *string `json:"acodec,omitempty"`

	// ASR is the audio sampling rate in Hertz.
	ASR *float64 `json:"asr,omitempty"`

	// AudioChannels contains the number of audio channels.
	AudioChannels *float64 `json:"audio_channels,omitempty"`

	// Average video bitrate in KBit/s.
	VBR *float64 `json:"vbr,omitempty"`

	// FPS is the framerate per second.
	FPS *float64 `json:"fps,omitempty"`

	// VCodev is the name of the video codec in use.
	VCodec *string `json:"vcodec,omitempty"`

	// Container is the name of the container format.
	Container *string `json:"container,omitempty"`

	// FileSize is the number of bytes, if known in advance.
	FileSize *int `json:"filesize,omitempty"`

	// FileSizeApprox is an estimate for the number of bytes.
	FileSizeApprox *int `json:"filesize_approx,omitempty"`

	// PlayerURL is the SWF Player URL (used for rtmpdump).
	PlayerURL *string `json:"player_url,omitempty"`

	// Protocol is the protocol that will be used for the actual download,
	// lower-case. One of "http", "https" or one of the protocols defined in
	// yt-dlp's downloader.PROTOCOL_MAP.
	Protocol *string `json:"protocol,omitempty"`

	// FragmentBaseURL is the base URL for fragments. Each fragment's path value
	// (if present) will be relative to this URL.
	FragmentBaseURL *string `json:"fragment_base_url,omitempty"`

	// Fragments is a list of fragments of a fragmented media. Each fragment entry
	// must contain either an url or a path. If an url is present it should be
	// considered by a client. Otherwise both path and [ExtractedFormat.FragmentBaseURL]
	// must be present.
	Fragments []*ExtractedFragment `json:"fragments,omitempty"`

	// IsFromStart is true if it's a live format that can be downloaded from the start.
	IsFromStart *bool `json:"is_from_start,omitempty"`

	// Preference is the order number of this format. If this field is present,
	// the formats get sorted by this field, regardless of all other values.
	//   - -1 for default (order by other properties).
	//   - -2 or smaller for less than default.
	//   - < -1000 to hide the format (if there is another one which is strictly better)
	Preference *int `json:"preference,omitempty"`

	// SourcePreference is the order number for this video source (quality takes
	// higher priority)
	//   - -1 for default (order by other properties).
	//   - -2 or smaller for less than default.
	SourcePreference *int `json:"source_preference,omitempty"`

	// Language is the language code, e.g. "de" or "en-US".
	Language *string `json:"language,omitempty"`

	// LanguagePreference is the order number of this language, based off a few factors.
	// Is this in the language mentioned in the URL?
	//   - 10 if it's what the URL is about.
	//   - -1 for default (don't know).
	//   - -10 otherwise, other values reserved for now.
	LanguagePreference *int `json:"language_preference,omitempty"`

	// Quality is the order number of the video quality of this format, irrespective
	// of the file format.
	//   - -1 for default (order by other properties).
	//   - -2 or smaller for less than default.
	Quality *float64 `json:"quality,omitempty"`

	// HTTPHeaders are additional HTTP headers to be sent with the request.
	HTTPHeaders map[string]string `json:"http_headers,omitempty"`

	// StretchRatio if given and not 1, indicates that the video's pixels are not
	// square. "width:height" ratio as float.
	StretchedRatio *float64 `json:"stretched_ratio,omitempty"`

	// NoResume is true if the download for this format cannot be resumed (HTTP or RTMP).
	NoResume *bool `json:"no_resume,omitempty"`

	// HasDRM is true if the format is DRM-protected and cannot be downloaded.
	// 'maybe' if the format may have DRM and has to be tested before download.
	HasDRM any `json:"has_drm,omitempty"`

	// ExtraParamToSegmentURL is a query string to append to each fragment's URL,
	// or to update each existing query string with. Only applied by the native
	// HLS/DASH downloaders.
	ExtraParamToSegmentURL *string `json:"extra_param_to_segment_url,omitempty"`

	// Rows is the number of rows in each storyboard fragment, as an integer.
	Rows *int `json:"rows,omitempty"`

	// Columns is the number of columns in each storyboard fragment, as an integer.
	Columns *int `json:"columns,omitempty"`

	// PageURL is the URL of the page containing the video.
	PageURL *string `json:"page_url,omitempty"`

	// App is the application to play this stream.
	App *string `json:"app,omitempty"`

	// PlayPath is the play path for this stream.
	PlayPath *string `json:"play_path,omitempty"`

	// TCURL is the TC URL for this stream.
	TCURL *string `json:"tc_url,omitempty"`

	// FlashVersion is the flash version for this stream.
	FlashVersion *string `json:"flash_version,omitempty"`

	// RTMPLive is true if this is a live stream.
	RTMPLive *bool `json:"rtmp_live,omitempty"`

	// RTMPConn is the RTMP connection for this stream.
	RTMPConn *string `json:"rtmp_conn,omitempty"`

	// RTMPProtocol is the RTMP protocol for this stream.
	RTMPProtocol *string `json:"rtmp_protocol,omitempty"`

	// RTMPRealTime is true if this is a real-time stream.
	RTMPRealTime *bool `json:"rtmp_real_time,omitempty"`
}

ExtractedFormat is format information returned by yt-dlp.

Some intentionally excluded fields:

  • request_data (think this is internal).
  • manifest_stream_number (internal use only).
  • hls_aes (no sample data to use to understand format).
  • downloader_options (internal use only).

type ExtractedFragment ΒΆ

type ExtractedFragment struct {
	// URL of the fragment.
	URL string `json:"url"`

	// Path of the fragment, relative to [ExtractedFormat.FragmentBaseURL].
	Path *string `json:"path,omitempty"`

	// Duration of the fragment in seconds.
	Duration float64 `json:"duration"`

	// Filesize of the fragment in bytes.
	FileSize *int `json:"filesize,omitempty"`
}

type ExtractedHeatmapData ΒΆ

type ExtractedHeatmapData struct {
	// StartTime of the data point in seconds.
	StartTime *float64 `json:"start_time,omitempty"`

	// EndTime of the data point in seconds.
	EndTime *float64 `json:"end_time,omitempty"`

	// Value is the normalized value of the data point (float between 0 and 1).
	Value *float64 `json:"value,omitempty"`
}

type ExtractedInfo ΒΆ

type ExtractedInfo struct {
	// ExtractedFormat fields which can also be returned for ExtractedInfo.
	*ExtractedFormat

	// Type is the type of the video or returned result.
	Type ExtractedType `json:"_type"`

	// Version information is sometimes returned in the result.
	Version *ExtractedVersion `json:"_version,omitempty"`

	// ID is the video identifier.
	ID string `json:"id"`

	// Title contains the video title, unescaped. Set to an empty string if video
	// has no title as opposed to nil which signifies that the extractor failed
	// to obtain a title.
	Title *string `json:"title"`

	// Formats contains a list of each format available, ordered from worst to best
	// quality.
	Formats          []*ExtractedFormat `json:"formats"`
	RequestedFormats []*ExtractedFormat `json:"requested_formats,omitempty"`

	// URL is the final video URL.
	URL *string `json:"url,omitempty"`

	// Filename is the video filename. This is not set when simulation is requested/
	// enabled.
	Filename *string `json:"filename,omitempty"`

	// AltFilename is an alternative filename for the video. This maps to "_filename".
	// See [ExtractedInfo.Filename] for more info.
	AltFilename *string `json:"_filename,omitempty"`

	// Extension is the video filename extension.
	Extension string `json:"ext"`

	// Format is the video format. Defaults to [ExtractorInfo.Extension] (used for get-format functionality).
	Format string `json:"format"`

	// PlayerURL is the SWF Player URL (used for rtmpdump).
	PlayerURL *string `json:"player_url,omitempty"`

	// Direct is true if a direct video file was given (must only be set by GenericIE).
	Direct *bool `json:"direct,omitempty"`

	// AltTitle is a secondary title of the video.
	AltTitle *string `json:"alt_title,omitempty"`

	// DisplayID is an alternative identifier for the video, not necessarily unique,
	// but available before title. Typically, id is something like "4234987",
	// title "Dancing naked mole rats", and display_id "dancing-naked-mole-rats".
	DisplayID *string `json:"display_id,omitempty"`

	// Thumbnails is a list of thumbnails for the video.
	Thumbnails []*ExtractedThumbnail `json:"thumbnails,omitempty"`

	// Thumbnail is a full URL to a video thumbnail image.
	Thumbnail *string `json:"thumbnail,omitempty"`

	// Description contains the full video description.
	Description *string `json:"description,omitempty"`

	// Uploader contains the full name of the video uploader.
	Uploader *string `json:"uploader,omitempty"`

	// License contains the license name the video is licensed under.
	License *string `json:"license,omitempty"`

	// Creator contains the creator of the video.
	Creator *string `json:"creator,omitempty"`

	// Timestamp contains the UNIX timestamp of the moment the video was uploaded.
	Timestamp *float64 `json:"timestamp,omitempty"`

	// UploadDate contains the video upload date in UTC (YYYYMMDD). If not explicitly
	// set, calculated from Timestamp.
	UploadDate *string `json:"upload_date,omitempty"`

	// ReleaseTimestamp contains the UNIX timestamp of the moment the video was
	// released. If it is not clear whether to use Timestamp or this, use the former.
	ReleaseTimestamp *float64 `json:"release_timestamp,omitempty"`

	// ReleaseDate contains the date (YYYYMMDD) when the video was released in UTC.
	// If not explicitly set, calculated from ReleaseTimestamp.
	ReleaseDate *string `json:"release_date,omitempty"`

	// ModifiedTimestamp contains the UNIX timestamp of the moment the video was
	// last modified.
	ModifiedTimestamp *float64 `json:"modified_timestamp,omitempty"`

	// ModifiedDate contains the date (YYYYMMDD) when the video was last modified
	// in UTC. If not explicitly set, calculated from ModifiedTimestamp.
	ModifiedDate *string `json:"modified_date,omitempty"`

	// UploaderID contains the nickname or id of the video uploader.
	UploaderID *string `json:"uploader_id,omitempty"`

	// UploaderURL contains the full URL to a personal webpage of the video uploader.
	UploaderURL *string `json:"uploader_url,omitempty"`

	// Channel contains the full name of the channel the video is uploaded on.
	// Note that channel fields may or may not repeat uploader fields. This depends
	// on a particular extractor.
	Channel *string `json:"channel,omitempty"`

	// ChannelID contains the id of the channel.
	ChannelID *string `json:"channel_id,omitempty"`

	// ChannelURL contains the full URL to a channel webpage.
	ChannelURL *string `json:"channel_url,omitempty"`

	// ChannelFollowerCount contains the number of followers of the channel.
	ChannelFollowerCount *float64 `json:"channel_follower_count,omitempty"`

	// ChannelIsVerified is true if the channel is verified on the platform.
	ChannelIsVerified *bool `json:"channel_is_verified,omitempty"`

	// Location contains the physical location where the video was filmed.
	Location *string `json:"location,omitempty"`

	// Subtitles contains the available subtitles, where the key is the language
	// code, and the value is a list of subtitle formats.
	Subtitles          map[string][]*ExtractedSubtitle `json:"subtitles,omitempty"`
	RequestedSubtitles map[string][]*ExtractedSubtitle `json:"requested_subtitles,omitempty"`

	// AutomaticCaptions contains the automatically generated captions instead of
	// normal subtitles.
	AutomaticCaptions map[string][]*ExtractedSubtitle `json:"automatic_captions,omitempty"`

	// Duration contains the length of the video in seconds.
	Duration *float64 `json:"duration,omitempty"`

	// ViewCount contains how many users have watched the video on the platform.
	ViewCount *float64 `json:"view_count,omitempty"`

	// ConcurrentViewCount contains how many users are currently watching the video
	// on the platform.
	ConcurrentViewCount *float64 `json:"concurrent_view_count,omitempty"`

	// LikeCount contains the number of positive ratings of the video.
	LikeCount *float64 `json:"like_count,omitempty"`

	// DislikeCount contains the number of negative ratings of the video.
	DislikeCount *float64 `json:"dislike_count,omitempty"`

	// RepostCount contains the number of reposts of the video.
	RepostCount *float64 `json:"repost_count,omitempty"`

	// AverageRating contains the average rating give by users, the scale used
	// depends on the webpage.
	AverageRating *float64 `json:"average_rating,omitempty"`

	// CommentCount contains the number of comments on the video.
	CommentCount *float64 `json:"comment_count,omitempty"`

	// Comments contains a list of comments.
	Comments []*ExtractedVideoComment `json:"comments,omitempty"`

	// AgeLimit contains the age restriction for the video (years).
	AgeLimit *float64 `json:"age_limit,omitempty"`

	// WebpageURL contains the URL to the video webpage, if given to yt-dlp it
	// should allow to get the same result again. (It will be set by YoutubeDL if
	// it's missing)
	WebpageURL *string `json:"webpage_url,omitempty"`

	// Categories contains a list of categories that the video falls in, for example
	// ["Sports", "Berlin"].
	Categories []string `json:"categories,omitempty"`

	// Tags contains a list of tags assigned to the video, e.g. ["sweden", "pop music"].
	Tags []string `json:"tags,omitempty"`

	// Cast contains a list of the video cast.
	Cast []string `json:"cast,omitempty"`

	// IsLive is true, false, or nil (=unknown). Whether this video is a live stream
	// that goes on instead of a fixed-length video.
	IsLive *bool `json:"is_live,omitempty"`

	// WasLive is true, false, or nil (=unknown). Whether this video was originally
	// a live stream.
	WasLive *bool `json:"was_live,omitempty"`

	// LiveStatus is nil (=unknown), 'is_live', 'is_upcoming', 'was_live', 'not_live',
	// or 'post_live' (was live, but VOD is not yet processed). If absent, automatically
	// set from IsLive, WasLive.
	LiveStatus *ExtractedLiveStatus `json:"live_status,omitempty"`

	// StartTime is the time in seconds where the reproduction should start, as
	// specified in the URL.
	StartTime *float64 `json:"start_time,omitempty"`

	// EndTime is the time in seconds where the reproduction should end, as
	// specified in the URL.
	EndTime *float64 `json:"end_time,omitempty"`

	// Chapters is a list of chapters.
	Chapters []*ExtractedChapterData `json:"chapters,omitempty"`

	// Heatmap is a list of heatmap data points.
	Heatmap []*ExtractedHeatmapData `json:"heatmap,omitempty"`

	// PlayableInEmbed is whether this video is allowed to play in embedded players
	// on other sites. Can be true (=always allowed), false (=never allowed), nil
	// (=unknown), or a string specifying the criteria for embedability; e.g.
	// 'whitelist'.
	PlayableInEmbed any `json:"playable_in_embed,omitempty"`

	// Availability is under what condition the video is available.
	Availability *ExtractedAvailability `json:"availability,omitempty"`

	// Chapter is the name or title of the chapter the video belongs to.
	Chapter *string `json:"chapter,omitempty"`

	// ChapterNumber is the number of the chapter the video belongs to.
	ChapterNumber *float64 `json:"chapter_number,omitempty"`

	// ChapterID is the ID of the chapter the video belongs to.
	ChapterID *string `json:"chapter_id,omitempty"`

	// Playlist is the name or id of the playlist that contains the video.
	Playlist *string `json:"playlist,omitempty"`

	// PlaylistIndex is the index of the video in the playlist.
	PlaylistIndex *int `json:"playlist_index,omitempty"`

	// PlaylistID is the playlist identifier.
	PlaylistID *string `json:"playlist_id,omitempty"`

	// PlaylistTitle is the playlist title.
	PlaylistTitle *string `json:"playlist_title,omitempty"`

	// PlaylistUploader is the full name of the playlist uploader.
	PlaylistUploader *string `json:"playlist_uploader,omitempty"`

	// PlaylistUploaderID is the nickname or id of the playlist uploader.
	PlaylistUploaderID *string `json:"playlist_uploader_id,omitempty"`

	// PlaylistCount is auto-generated by yt-dlp. It is the total number of videos
	// in the playlist.
	PlaylistCount *int `json:"playlist_count,omitempty"`

	// Series is the title of the series or programme the video episode belongs to.
	Series *string `json:"series,omitempty"`

	// SeriesID is the ID of the series or programme the video episode belongs to.
	SeriesID *string `json:"series_id,omitempty"`

	// Season is the title of the season the video episode belongs to.
	Season *string `json:"season,omitempty"`

	// SeasonNumber is the number of the season the video episode belongs to.
	SeasonNumber *float64 `json:"season_number,omitempty"`

	// SeasonID is the ID of the season the video episode belongs to.
	SeasonID *string `json:"season_id,omitempty"`

	// Episode is the title of the video episode. Unlike mandatory video title field,
	// this field should denote the exact title of the video episode without any
	// kind of decoration.
	Episode *string `json:"episode,omitempty"`

	// EpisodeNumber is the number of the video episode within a season.
	EpisodeNumber *float64 `json:"episode_number,omitempty"`

	// EpisodeID is the ID of the video episode.
	EpisodeID *string `json:"episode_id,omitempty"`

	// Track is the title of the track.
	Track *string `json:"track,omitempty"`

	// TrackNumber is the number of the track within an album or a disc.
	TrackNumber *float64 `json:"track_number,omitempty"`

	// TrackID is the ID of the track (useful in case of custom indexing, e.g. 6.iii).
	TrackID *string `json:"track_id,omitempty"`

	// Artist is the artist(s) of the track.
	Artist *string `json:"artist,omitempty"`

	// Genre is the genre(s) of the track.
	Genre *string `json:"genre,omitempty"`

	// Album is the title of the album the track belongs to.
	Album *string `json:"album,omitempty"`

	// AlbumType is the type of the album (e.g. "Demo", "Full-length", "Split", "Compilation", etc).
	AlbumType *string `json:"album_type,omitempty"`

	// AlbumArtist is the list of all artists appeared on the album (e.g.
	// "Ash Borer / Fell Voices" or "Various Artists", useful for splits
	// and compilations).
	AlbumArtist *string `json:"album_artist,omitempty"`

	// DiscNumber is the number of the disc or other physical medium the track belongs to.
	DiscNumber *float64 `json:"disc_number,omitempty"`

	// ReleaseYear is the year (YYYY) when the album was released.
	ReleaseYear *int `json:"release_year,omitempty"`

	// Composer is the composer of the piece.
	Composer *string `json:"composer,omitempty"`

	// SectionStart is the start time of the section in seconds.
	SectionStart *float64 `json:"section_start,omitempty"`

	// SectionEnd is the end time of the section in seconds.
	SectionEnd *float64 `json:"section_end,omitempty"`

	// Rows is the number of rows in each storyboard fragment, as an integer.
	Rows *int `json:"rows,omitempty"`

	// Columns is the number of columns in each storyboard fragment, as an integer.
	Columns *int `json:"columns,omitempty"`

	// Extractor is the name of the extractor.
	Extractor *string `json:"extractor,omitempty"`

	// ExtractorKey is the key name of the extractor.
	ExtractorKey *string `json:"extractor_key,omitempty"`

	// WebpageURLBasename is the basename of [ExtractedInfo.WebpageURL].
	WebpageURLBasename *string `json:"webpage_url_basename,omitempty"`

	// WebpageURLDomain is the domain name of [ExtractedInfo.WebpageURL].
	WebpageURLDomain *string `json:"webpage_url_domain,omitempty"`

	// Autonumber is a five-digit number that will be increased with each download,
	// starting at zero.
	Autonumber float64 `json:"autonumber"`

	// Epoch is the unix epoch when creating the file.
	Epoch *float64 `json:"epoch,omitempty"`

	// Playlist entries if _type is playlist
	Entries []*ExtractedInfo `json:"entries"`
	// contains filtered or unexported fields
}

func ParseExtractedInfo ΒΆ

func ParseExtractedInfo(msg *json.RawMessage) (info *ExtractedInfo, err error)

ParseExtractedInfo parses the extracted info from msg. ParseExtractedInfo will also clean the returned results to remove some ytdlp-isims, such as "none" for some string fields.

type ExtractedLiveStatus ΒΆ

type ExtractedLiveStatus string
const (
	ExtractedLiveStatusIsLive     ExtractedLiveStatus = "is_live"
	ExtractedLiveStatusIsUpcoming ExtractedLiveStatus = "is_upcoming"
	ExtractedLiveStatusWasLive    ExtractedLiveStatus = "was_live"
	ExtractedLiveStatusNotLive    ExtractedLiveStatus = "not_live"
	ExtractedLiveStatusPostLive   ExtractedLiveStatus = "post_live" // Was live, but VOD is not yet processed.
)

type ExtractedSubtitle ΒΆ

type ExtractedSubtitle struct {
	// URL of the subtitle file.
	URL string `json:"url"`

	// Data contains the subtitle file contents.
	Data *string `json:"data,omitempty"`

	// Name or description of the subtitle.
	Name *string `json:"name,omitempty"`

	// HTTPHeaders are additional HTTP headers to be sent with the request.
	HTTPHeaders map[string]string `json:"http_headers,omitempty"`
}

type ExtractedThumbnail ΒΆ

type ExtractedThumbnail struct {
	// ID is the thumbnail format ID
	ID *string `json:"id,omitempty"`

	// URL of the thumbnail.
	URL string `json:"url"`

	// Preference is the quality ordering of the image.
	Preference *int `json:"preference,omitempty"`

	// Width of the thumbnail.
	Width *int `json:"width,omitempty"`

	// Height of the thumbnail.
	Height *int `json:"height,omitempty"`

	// Deprecated: Resolution is the textual description of width and height as "WIDTHxHEIGHT".
	Resolution *string `json:"resolution,omitempty"`

	// FileSize is the number of bytes, if known in advance.
	FileSize *int `json:"filesize,omitempty"`

	// HTTPHeaders are additional HTTP headers to be sent with the request.
	HTTPHeaders map[string]string `json:"http_headers,omitempty"`
}

type ExtractedType ΒΆ

type ExtractedType string
const (
	ExtractedTypeAny            ExtractedType = "any"
	ExtractedTypeSingle         ExtractedType = "single"
	ExtractedTypePlaylist       ExtractedType = "playlist"
	ExtractedTypeMultiVideo     ExtractedType = "multi_video"
	ExtractedTypeURL            ExtractedType = "url"
	ExtractedTypeURLTransparent ExtractedType = "url_transparent"
)

type ExtractedVersion ΒΆ

type ExtractedVersion struct {
	// CurrentGitHead is the git commit hash of the yt-dlp install that returned
	// this data.
	CurrentGitHead *string `json:"current_git_head,omitempty"`

	// ReleaseGitHead is the git commit hash of the currently available yt-dlp
	// release.
	ReleaseGitHead *string `json:"release_git_head,omitempty"`

	// Repository is the name of the repository where yt-dlp is hosted.
	Repository *string `json:"repository,omitempty"`

	// Version is the version number of the yt-dlp install that returned this data.
	Version *string `json:"version,omitempty"`
}

type ExtractedVideoComment ΒΆ

type ExtractedVideoComment struct {
	// Author is the human-readable name of the comment author.
	Author *string `json:"author,omitempty"`

	// AuthorID is the user ID of the comment author.
	AuthorID *string `json:"author_id,omitempty"`

	// AuthorThumbnail is the thumbnail of the comment author.
	AuthorThumbnail *string `json:"author_thumbnail,omitempty"`

	// AuthorURL is the URL to the comment author's page.
	AuthorURL *string `json:"author_url,omitempty"`

	// AuthorIsVerified is true if the author is verified on the platform.
	AuthorIsVerified *bool `json:"author_is_verified,omitempty"`

	// AuthorIsUploader is true if the comment is made by the video uploader.
	AuthorIsUploader *bool `json:"author_is_uploader,omitempty"`

	// ID is the comment ID.
	ID *string `json:"id,omitempty"`

	// HTML is the comment as HTML.
	HTML *string `json:"html,omitempty"`

	// Text is the plain text of the comment.
	Text *string `json:"text,omitempty"`

	// Timestamp is the UNIX timestamp of comment.
	Timestamp *float64 `json:"timestamp,omitempty"`

	// Parent is the ID of the comment this one is replying to. Set to "root" to
	// indicate that this is a comment to the original video.
	Parent *string `json:"parent,omitempty"`

	// LikeCount is the number of positive ratings of the comment.
	LikeCount *float64 `json:"like_count,omitempty"`

	// DislikeCount is the number of negative ratings of the comment.
	DislikeCount *float64 `json:"dislike_count,omitempty"`

	// IsFavorited is true if the comment is marked as favorite by the video uploader.
	IsFavorited *bool `json:"is_favorited,omitempty"`

	// IsPinned is true if the comment is pinned to the top of the comments.
	IsPinned *bool `json:"is_pinned,omitempty"`
}

type Extractor ΒΆ

type Extractor struct {
	// Name of the extractor.
	Name string `json:"name"`

	// Description of the extractor.
	Description string `json:"description,omitempty"`

	// AgeLimit of the extractor.
	AgeLimit int `json:"age_limit,omitempty"`
}

Extractor contains information about a specific yt-dlp extractor. Extractors are used to extract information from a specific URL, and subsequently download the video/audio.

type FixupOption ΒΆ

type FixupOption string

FixupOption are parameter types for [Fixup].

var (
	FixupNever        FixupOption = "never"
	FixupIgnore       FixupOption = "ignore"
	FixupWarn         FixupOption = "warn"
	FixupDetectOrWarn FixupOption = "detect_or_warn"
	FixupForce        FixupOption = "force"
)

type Flag ΒΆ

type Flag struct {
	ID   string   `json:"id"`   // Unique ID to ensure boolean flags are not duplicated.
	Flag string   `json:"flag"` // Actual flag, e.g. "--version".
	Args []string `json:"args"` // Optional args. If nil, it's a boolean flag.
}

func (*Flag) Clone ΒΆ

func (f *Flag) Clone() *Flag

func (*Flag) Raw ΒΆ

func (f *Flag) Raw() (args []string)

type InstallOptions ΒΆ

type InstallOptions struct {
	// DisableDownload is a simple toggle to never allow downloading, which would
	// be the same as never calling [Install] or [MustInstall] in the first place.
	DisableDownload bool

	// DisableChecksum disables checksum verification when downloading.
	DisableChecksum bool

	// AllowVersionMismatch allows mismatched versions to be used and installed.
	// This will only be used when the yt-dlp executable is resolved outside of
	// go-ytdlp's cache.
	//
	// AllowVersionMismatch is ignored if DisableDownload is true.
	AllowVersionMismatch bool

	// DownloadURL is the exact url to the binary location to download (and store).
	// Leave empty to use GitHub + auto-detected os/arch.
	DownloadURL string
}

InstallOptions are configuration options for installing yt-dlp dynamically (when it's not already installed).

type ProgressCallbackFunc ΒΆ

type ProgressCallbackFunc func(update ProgressUpdate)

ProgressCallbackFunc is a callback function that is called when (if) we receive progress updates from yt-dlp.

type ProgressStatus ΒΆ

type ProgressStatus string

ProgressStatus is the status of the download progress.

const (
	ProgressStatusStarting       ProgressStatus = "starting"
	ProgressStatusDownloading    ProgressStatus = "downloading"
	ProgressStatusPostProcessing ProgressStatus = "post_processing"
	ProgressStatusError          ProgressStatus = "error"
	ProgressStatusFinished       ProgressStatus = "finished"
)

func (ProgressStatus) IsCompletedType ΒΆ

func (s ProgressStatus) IsCompletedType() bool

type ProgressUpdate ΒΆ

type ProgressUpdate struct {
	Info *ExtractedInfo `json:"info"`

	// Status is the current status of the download.
	Status ProgressStatus `json:"status"`
	// TotalBytes is the total number of bytes in the download. If yt-dlp is unable
	// to determine the total bytes, this will be 0.
	TotalBytes int `json:"total_bytes"`
	// DownloadedBytes is the number of bytes that have been downloaded so far.
	DownloadedBytes int `json:"downloaded_bytes"`
	// FragmentIndex is the index of the current fragment being downloaded.
	FragmentIndex int `json:"fragment_index,omitempty"`
	// FragmentCount is the total number of fragments in the download.
	FragmentCount int `json:"fragment_count,omitempty"`

	// Filename is the filename of the video being downloaded, if available. Note that
	// this is not necessarily the same as the destination file, as post-processing
	// may merge multiple files into one.
	Filename string `json:"filename"`

	// Started is the time the download started.
	Started time.Time `json:"started"`
	// Finished is the time the download finished. If the download is still in progress,
	// this will be zero. You can validate with IsZero().
	Finished time.Time `json:"finished,omitempty"`
}

ProgressUpdate is a point-in-time snapshot of the download progress.

func (*ProgressUpdate) Duration ΒΆ

func (p *ProgressUpdate) Duration() time.Duration

Duration returns the duration of the download. If the download is still in progress, it will return the time since the download started.

func (*ProgressUpdate) ETA ΒΆ

func (p *ProgressUpdate) ETA() time.Duration

ETA returns the estimated time until the download is complete. If the download is complete, or hasn't started yet, it will return 0.

func (*ProgressUpdate) Percent ΒΆ

func (p *ProgressUpdate) Percent() float64

Percent returns the percentage of the download that has been completed. If yt-dlp is unable to determine the total bytes, it will return 0.

func (*ProgressUpdate) PercentString ΒΆ

func (p *ProgressUpdate) PercentString() string

PercentString is like Percent, but returns a string representation of the percentage.

type ResolvedInstall ΒΆ

type ResolvedInstall struct {
	Executable string // Path to the yt-dlp executable.
	Version    string // Version of yt-dlp that was resolved. If [InstallOptions.AllowVersionMismatch] is specified, this will be empty.
	FromCache  bool   // Whether the executable was resolved from the cache.
	Downloaded bool   // Whether the executable was downloaded during this invocation.
}

ResolvedInstall is the found yt-dlp executable.

func Install ΒΆ

func Install(ctx context.Context, opts *InstallOptions) (*ResolvedInstall, error)

Install will check to see if yt-dlp is installed (if it's the right version), and if not, will download it from GitHub. If yt-dlp is already installed, it will check to see if the version matches (unless disabled with [AllowVersionMismatch]), and if not, will download the same version that go-ytdlp (the version you are using) was built with.

Note: If Install is not called, go-ytdlp WILL NOT DOWNLOAD yt-dlp. Only use this function if you want to ensure yt-dlp is installed, and are ok with it being downloaded.

type Result ΒΆ

type Result struct {
	// Executable is the path to the yt-dlp executable that was invoked.
	Executable string `json:"executable"`

	// Args are the arguments that were passed to yt-dlp, excluding the executable.
	Args []string `json:"args"`

	// ExitCode is the exit code of the yt-dlp process.
	ExitCode int `json:"exit_code"`

	// Stdout is the stdout of the yt-dlp process, with trailing newlines removed.
	Stdout string `json:"stdout"`

	// Stderr is the stderr of the yt-dlp process, with trailing newlines removed.
	Stderr string `json:"stderr"`

	// OutputLogs are the stdout/stderr logs, sorted by timestamp, and any JSON
	// parsed (if configured with [Command.PrintJson]).
	OutputLogs []*ResultLog `json:"output_logs"`
}

Result contains the yt-dlp execution results, including stdout/stderr, exit code, and any output logs. Note that output logs should already be pre-processed via [Result.OutputLogs], which will be sorted by timestamp, and any JSON parsed (if configured with [Command.PrintJson] or similar).

func (*Result) GetExtractedInfo ΒΆ

func (r *Result) GetExtractedInfo() (info []*ExtractedInfo, err error)

GetExtractedInfo returns the extracted info from the yt-dlp output logs. Note that this will only return info if yt-dlp was invoked with [Command.PrintJson] or similar.

func (*Result) String ΒΆ

func (r *Result) String() string

type ResultLog ΒΆ

type ResultLog struct {
	Timestamp time.Time        `json:"timestamp"`
	Line      string           `json:"line"`
	JSON      *json.RawMessage `json:"json,omitempty"` // May be nil if the log line wasn't valid JSON.
	Pipe      string           `json:"pipe"`           // stdout or stderr.
}

func (*ResultLog) String ΒΆ

func (r *ResultLog) String() string

Directories ΒΆ

Path Synopsis
cmd
codegen Module
Package optiondata contains the raw option data for go-ytdlp.
Package optiondata contains the raw option data for go-ytdlp.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL