Documentation
¶
Index ¶
- Constants
- Variables
- func GetCacheDir() (string, error)
- func MustInstall(ctx context.Context, opts *InstallOptions)
- func MustInstallBun(ctx context.Context, opts *InstallBunOptions)
- func MustInstallFFmpeg(ctx context.Context, opts *InstallFFmpegOptions)
- func MustInstallFFprobe(ctx context.Context, opts *InstallFFmpegOptions)
- func RemoveInstallCache() error
- type Command
- func (c *Command) AbortOnError() *Command
- func (c *Command) AbortOnUnavailableFragments() *Command
- func (c *Command) AddHeaders(fieldvalue string) *Command
- func (c *Command) AgeLimit(years int) *Command
- func (c *Command) AllFormats() *Commanddeprecated
- func (c *Command) AllSubs() *Commanddeprecated
- func (c *Command) AllowDynamicMPD() *Command
- func (c *Command) ApListMSO() *Command
- func (c *Command) ApMSO(mso string) *Command
- func (c *Command) ApPassword(password string) *Command
- func (c *Command) ApUsername(username string) *Command
- func (c *Command) AudioFormat(format string) *Command
- func (c *Command) AudioMultistreams() *Command
- func (c *Command) AudioQuality(quality string) *Command
- func (c *Command) AutoNumberSize(number int) *Commanddeprecated
- func (c *Command) AutoNumberStart(number int) *Commanddeprecated
- func (c *Command) BatchFile(file string) *Command
- func (c *Command) BidiWorkaround() *Command
- func (c *Command) BreakMatchFilters(filter string) *Command
- func (c *Command) BreakOnExisting() *Command
- func (c *Command) BreakOnReject() *Commanddeprecated
- func (c *Command) BreakPerInput() *Command
- func (c *Command) BufferSize(size string) *Command
- func (c *Command) BuildCommand(ctx context.Context, args ...string) *exec.Cmd
- func (c *Command) CacheDir(dir string) *Command
- func (c *Command) CheckAllFormats() *Command
- func (c *Command) CheckFormats() *Command
- func (c *Command) CleanInfoJSON() *Command
- func (c *Command) ClientCertificate(certfile string) *Command
- func (c *Command) ClientCertificateKey(keyfile string) *Command
- func (c *Command) ClientCertificatePassword(password string) *Command
- func (c *Command) Clone() *Command
- func (c *Command) Color(policy string) *Command
- func (c *Command) CompatOptions(opts string) *Command
- func (c *Command) ConcatPlaylist(policy ConcatPlaylistOption) *Command
- func (c *Command) ConcurrentFragments(n int) *Command
- func (c *Command) ConfigLocations(path string) *Command
- func (c *Command) ConsoleTitle() *Command
- func (c *Command) Continue() *Command
- func (c *Command) ConvertSubs(format string) *Command
- func (c *Command) ConvertThumbnails(format string) *Command
- func (c *Command) Cookies(file string) *Command
- func (c *Command) CookiesFromBrowser(browser string) *Command
- func (c *Command) Date(date string) *Command
- func (c *Command) DateAfter(date string) *Command
- func (c *Command) DateBefore(date string) *Command
- func (c *Command) DefaultSearch(prefix string) *Command
- func (c *Command) DownloadArchive(file string) *Command
- func (c *Command) DownloadSections(regex string) *Command
- func (c *Command) Downloader(name string) *Command
- func (c *Command) DownloaderArgs(nameargs string) *Command
- func (c *Command) DumpJSON() *Command
- func (c *Command) DumpPages() *Command
- func (c *Command) DumpSingleJSON() *Command
- func (c *Command) EmbedChapters() *Command
- func (c *Command) EmbedInfoJSON() *Command
- func (c *Command) EmbedMetadata() *Command
- func (c *Command) EmbedSubs() *Command
- func (c *Command) EmbedThumbnail() *Command
- func (c *Command) EnableFileURLs() *Command
- func (c *Command) Encoding(encoding string) *Command
- func (c *Command) Exec(cmd string) *Command
- func (c *Command) ExecBeforeDownload(cmd string) *Commanddeprecated
- func (c *Command) ExtractAudio() *Command
- func (c *Command) ExtractorArgs(ieKeyargs string) *Command
- func (c *Command) ExtractorDescriptions(ctx context.Context) (*Result, error)
- func (c *Command) ExtractorRetries(retries string) *Command
- func (c *Command) FFmpegLocation(path string) *Command
- func (c *Command) FileAccessRetries(retries string) *Command
- func (c *Command) Fixup(policy FixupOption) *Command
- func (c *Command) FlatPlaylist() *Command
- func (c *Command) ForceGenericExtractor() *Commanddeprecated
- func (c *Command) ForceIPv4() *Command
- func (c *Command) ForceIPv6() *Command
- func (c *Command) ForceKeyframesAtCuts() *Command
- func (c *Command) ForceOverwrites() *Command
- func (c *Command) ForceWriteArchive() *Command
- func (c *Command) Format(format string) *Command
- func (c *Command) FormatSort(sortorder string) *Command
- func (c *Command) FormatSortForce() *Command
- func (c *Command) FragmentRetries(retries string) *Command
- func (c *Command) GeoBypass() *Commanddeprecated
- func (c *Command) GeoBypassCountry(code string) *Commanddeprecated
- func (c *Command) GeoBypassIPBlock(ipBlock string) *Commanddeprecated
- func (c *Command) GeoVerificationProxy(url string) *Command
- func (c *Command) GetDescription() *Commanddeprecated
- func (c *Command) GetDuration() *Commanddeprecated
- func (c *Command) GetFilename() *Commanddeprecated
- func (c *Command) GetFlagConfig() *FlagConfig
- func (c *Command) GetFormat() *Commanddeprecated
- func (c *Command) GetID() *Commanddeprecated
- func (c *Command) GetThumbnail() *Commanddeprecated
- func (c *Command) GetTitle() *Commanddeprecated
- func (c *Command) GetURL() *Commanddeprecated
- func (c *Command) HLSPreferFFmpeg() *Commanddeprecated
- func (c *Command) HLSPreferNative() *Commanddeprecated
- func (c *Command) HLSSplitDiscontinuity() *Command
- func (c *Command) HLSUseMPEGTS() *Command
- func (c *Command) HTTPChunkSize(size string) *Command
- func (c *Command) ID() *Commanddeprecated
- func (c *Command) IgnoreConfig() *Command
- func (c *Command) IgnoreDynamicMPD() *Command
- func (c *Command) IgnoreErrors() *Command
- func (c *Command) IgnoreNoFormatsError() *Command
- func (c *Command) Impersonate(client string) *Command
- func (c *Command) JsRuntimes(runtime string) *Command
- func (c *Command) KeepFragments() *Command
- func (c *Command) KeepVideo() *Command
- func (c *Command) LazyPlaylist() *Command
- func (c *Command) LegacyServerConnect() *Command
- func (c *Command) LimitRate(rate string) *Command
- func (c *Command) ListExtractors(ctx context.Context) (*Result, error)
- func (c *Command) ListFormats() *Commanddeprecated
- func (c *Command) ListFormatsAsTable() *Commanddeprecated
- func (c *Command) ListFormatsOld() *Commanddeprecated
- func (c *Command) ListImpersonateTargets() *Command
- func (c *Command) ListSubs() *Command
- func (c *Command) ListThumbnails() *Commanddeprecated
- func (c *Command) LiveFromStart() *Command
- func (c *Command) LoadInfoJSON(file string) *Command
- func (c *Command) MarkWatched() *Command
- func (c *Command) MatchFilters(filter string) *Command
- func (c *Command) MatchTitle(regex string) *Commanddeprecated
- func (c *Command) MaxDownloads(number int) *Command
- func (c *Command) MaxFileSize(size string) *Command
- func (c *Command) MaxSleepInterval(seconds float64) *Command
- func (c *Command) MaxViews(count int) *Commanddeprecated
- func (c *Command) MergeOutputFormat(format string) *Command
- func (c *Command) MetadataFromTitle(format string) *Commanddeprecated
- func (c *Command) MinFileSize(size string) *Command
- func (c *Command) MinViews(count int) *Commanddeprecated
- func (c *Command) Mtime() *Command
- func (c *Command) Netrc() *Command
- func (c *Command) NetrcCmd(netrcCmd string) *Command
- func (c *Command) NetrcLocation(path string) *Command
- func (c *Command) Newline() *Command
- func (c *Command) NoAbortOnError() *Command
- func (c *Command) NoAudioMultistreams() *Command
- func (c *Command) NoBatchFile() *Command
- func (c *Command) NoBreakMatchFilters() *Command
- func (c *Command) NoBreakOnExisting() *Command
- func (c *Command) NoBreakPerInput() *Command
- func (c *Command) NoCacheDir() *Command
- func (c *Command) NoCheckCertificates() *Command
- func (c *Command) NoCheckFormats() *Command
- func (c *Command) NoCleanInfoJSON() *Command
- func (c *Command) NoColors() *Commanddeprecated
- func (c *Command) NoConfigLocations() *Command
- func (c *Command) NoContinue() *Command
- func (c *Command) NoCookies() *Command
- func (c *Command) NoCookiesFromBrowser() *Command
- func (c *Command) NoDownloadArchive() *Command
- func (c *Command) NoEmbedChapters() *Command
- func (c *Command) NoEmbedInfoJSON() *Command
- func (c *Command) NoEmbedMetadata() *Command
- func (c *Command) NoEmbedSubs() *Command
- func (c *Command) NoEmbedThumbnail() *Command
- func (c *Command) NoExec() *Command
- func (c *Command) NoExecBeforeDownload() *Commanddeprecated
- func (c *Command) NoFlatPlaylist() *Command
- func (c *Command) NoForceKeyframesAtCuts() *Command
- func (c *Command) NoForceOverwrites() *Command
- func (c *Command) NoFormatSortForce() *Command
- func (c *Command) NoGeoBypass() *Commanddeprecated
- func (c *Command) NoHLSSplitDiscontinuity() *Command
- func (c *Command) NoHLSUseMPEGTS() *Command
- func (c *Command) NoIgnoreNoFormatsError() *Command
- func (c *Command) NoJsRuntimes() *Command
- func (c *Command) NoKeepFragments() *Command
- func (c *Command) NoKeepVideo() *Command
- func (c *Command) NoLazyPlaylist() *Command
- func (c *Command) NoLiveFromStart() *Command
- func (c *Command) NoMarkWatched() *Command
- func (c *Command) NoMatchFilters() *Command
- func (c *Command) NoMtime() *Command
- func (c *Command) NoOverwrites() *Command
- func (c *Command) NoPart() *Command
- func (c *Command) NoPlaylist() *Command
- func (c *Command) NoPlaylistReverse() *Commanddeprecated
- func (c *Command) NoPluginDirs() *Command
- func (c *Command) NoPostOverwrites() *Command
- func (c *Command) NoPreferFreeFormats() *Command
- func (c *Command) NoProgress() *Command
- func (c *Command) NoQuiet() *Command
- func (c *Command) NoRemoteComponents() *Command
- func (c *Command) NoRemoveChapters() *Command
- func (c *Command) NoResizeBuffer() *Command
- func (c *Command) NoRestrictFilenames() *Command
- func (c *Command) NoSimulate() *Command
- func (c *Command) NoSplitChapters() *Command
- func (c *Command) NoSponsorblock() *Command
- func (c *Command) NoUpdate() *Command
- func (c *Command) NoVideoMultistreams() *Command
- func (c *Command) NoWaitForVideo() *Command
- func (c *Command) NoWarnings() *Command
- func (c *Command) NoWindowsFilenames() *Command
- func (c *Command) NoWriteAutoSubs() *Command
- func (c *Command) NoWriteComments() *Command
- func (c *Command) NoWriteDescription() *Command
- func (c *Command) NoWriteInfoJSON() *Command
- func (c *Command) NoWritePlaylistMetafiles() *Command
- func (c *Command) NoWriteSubs() *Command
- func (c *Command) NoWriteThumbnail() *Command
- func (c *Command) Output(template string) *Command
- func (c *Command) OutputNaPlaceholder(text string) *Command
- func (c *Command) ParseMetadata(fromto string) *Command
- func (c *Command) Part() *Command
- func (c *Command) Password(password string) *Command
- func (c *Command) Paths(path string) *Command
- func (c *Command) PlaylistEnd(number int) *Commanddeprecated
- func (c *Command) PlaylistItems(itemSpec string) *Command
- func (c *Command) PlaylistRandom() *Command
- func (c *Command) PlaylistReverse() *Commanddeprecated
- func (c *Command) PlaylistStart(number int) *Commanddeprecated
- func (c *Command) PluginDirs(dir string) *Command
- func (c *Command) PostOverwrites() *Command
- func (c *Command) PostProcessorArgs(nameargs string) *Command
- func (c *Command) PreferFreeFormats() *Command
- func (c *Command) PreferInsecure() *Command
- func (c *Command) PresetAlias(preset string) *Command
- func (c *Command) Print(template string) *Command
- func (c *Command) PrintJSON() *Command
- func (c *Command) PrintToFile(template, file string) *Command
- func (c *Command) PrintTraffic() *Command
- func (c *Command) Progress() *Command
- func (c *Command) ProgressDelta(seconds float64) *Command
- func (c *Command) ProgressFunc(frequency time.Duration, fn ProgressCallbackFunc) *Command
- func (c *Command) ProgressTemplate(template string) *Command
- func (c *Command) Proxy(url string) *Command
- func (c *Command) Quiet() *Command
- func (c *Command) RecodeVideo(format string) *Command
- func (c *Command) Referer(url string) *Commanddeprecated
- func (c *Command) RejectTitle(regex string) *Commanddeprecated
- func (c *Command) RemoteComponents(component string) *Command
- func (c *Command) RemoveChapters(regex string) *Command
- func (c *Command) RemuxVideo(format string) *Command
- func (c *Command) ReplaceInMetadata(fields, regex, replace string) *Command
- func (c *Command) ResizeBuffer() *Command
- func (c *Command) RestrictFilenames() *Command
- func (c *Command) Retries(retries string) *Command
- func (c *Command) RetrySleep(expr string) *Command
- func (c *Command) RmCacheDir() *Command
- func (c *Command) Run(ctx context.Context, args ...string) (*Result, error)
- func (c *Command) SetCancelMaxWait(value time.Duration) *Command
- func (c *Command) SetEnvVar(key, value string) *Command
- func (c *Command) SetEnvVarInherit(enabled bool) *Command
- func (c *Command) SetExecutable(path string) *Command
- func (c *Command) SetFlagConfig(flagConfig *FlagConfig) *Command
- func (c *Command) SetSeparateProcessGroup(value bool) *Command
- func (c *Command) SetWorkDir(path string) *Command
- func (c *Command) Simulate() *Command
- func (c *Command) SkipDownload() *Command
- func (c *Command) SkipPlaylistAfterErrors(n int) *Command
- func (c *Command) SkipUnavailableFragments() *Command
- func (c *Command) SleepInterval(seconds float64) *Command
- func (c *Command) SleepRequests(seconds float64) *Command
- func (c *Command) SleepSubtitles(seconds int) *Command
- func (c *Command) SocketTimeout(seconds float64) *Command
- func (c *Command) SourceAddress(ip string) *Command
- func (c *Command) SplitChapters() *Command
- func (c *Command) SponsorblockAPI(url string) *Command
- func (c *Command) SponsorblockChapterTitle(template string) *Command
- func (c *Command) SponsorblockMark(cats string) *Command
- func (c *Command) SponsorblockRemove(cats string) *Command
- func (c *Command) SubFormat(format string) *Command
- func (c *Command) SubLangs(langs string) *Command
- func (c *Command) ThrottledRate(rate string) *Command
- func (c *Command) TrimFilenames(length int) *Command
- func (c *Command) TwoFactor(twofactor string) *Command
- func (c *Command) UnsetAbortOnError() *Command
- func (c *Command) UnsetAbortOnUnavailableFragments() *Command
- func (c *Command) UnsetAddHeaders() *Command
- func (c *Command) UnsetAgeLimit() *Command
- func (c *Command) UnsetAllFormats() *Commanddeprecated
- func (c *Command) UnsetAllSubs() *Commanddeprecated
- func (c *Command) UnsetAllowDynamicMPD() *Command
- func (c *Command) UnsetApListMSO() *Command
- func (c *Command) UnsetApMSO() *Command
- func (c *Command) UnsetApPassword() *Command
- func (c *Command) UnsetApUsername() *Command
- func (c *Command) UnsetAudioFormat() *Command
- func (c *Command) UnsetAudioMultistreams() *Command
- func (c *Command) UnsetAudioQuality() *Command
- func (c *Command) UnsetAutoNumberSize() *Commanddeprecated
- func (c *Command) UnsetAutoNumberStart() *Commanddeprecated
- func (c *Command) UnsetBatchFile() *Command
- func (c *Command) UnsetBidiWorkaround() *Command
- func (c *Command) UnsetBreakMatchFilters() *Command
- func (c *Command) UnsetBreakOnExisting() *Command
- func (c *Command) UnsetBreakOnReject() *Commanddeprecated
- func (c *Command) UnsetBreakPerInput() *Command
- func (c *Command) UnsetBufferSize() *Command
- func (c *Command) UnsetCacheDir() *Command
- func (c *Command) UnsetCheckAllFormats() *Command
- func (c *Command) UnsetCheckCertificates() *Command
- func (c *Command) UnsetCheckFormats() *Command
- func (c *Command) UnsetCleanInfoJSON() *Command
- func (c *Command) UnsetClientCertificate() *Command
- func (c *Command) UnsetClientCertificateKey() *Command
- func (c *Command) UnsetClientCertificatePassword() *Command
- func (c *Command) UnsetColor() *Command
- func (c *Command) UnsetColors() *Commanddeprecated
- func (c *Command) UnsetCompatOptions() *Command
- func (c *Command) UnsetConcatPlaylist() *Command
- func (c *Command) UnsetConcurrentFragments() *Command
- func (c *Command) UnsetConfigLocations() *Command
- func (c *Command) UnsetConsoleTitle() *Command
- func (c *Command) UnsetContinue() *Command
- func (c *Command) UnsetConvertSubs() *Command
- func (c *Command) UnsetConvertThumbnails() *Command
- func (c *Command) UnsetCookies() *Command
- func (c *Command) UnsetCookiesFromBrowser() *Command
- func (c *Command) UnsetDate() *Command
- func (c *Command) UnsetDateAfter() *Command
- func (c *Command) UnsetDateBefore() *Command
- func (c *Command) UnsetDefaultSearch() *Command
- func (c *Command) UnsetDownloadArchive() *Command
- func (c *Command) UnsetDownloadSections() *Command
- func (c *Command) UnsetDownloader() *Command
- func (c *Command) UnsetDownloaderArgs() *Command
- func (c *Command) UnsetDumpJSON() *Command
- func (c *Command) UnsetDumpPages() *Command
- func (c *Command) UnsetDumpSingleJSON() *Command
- func (c *Command) UnsetEmbedChapters() *Command
- func (c *Command) UnsetEmbedInfoJSON() *Command
- func (c *Command) UnsetEmbedMetadata() *Command
- func (c *Command) UnsetEmbedSubs() *Command
- func (c *Command) UnsetEmbedThumbnail() *Command
- func (c *Command) UnsetEnableFileURLs() *Command
- func (c *Command) UnsetEncoding() *Command
- func (c *Command) UnsetExec() *Command
- func (c *Command) UnsetExecBeforeDownload() *Commanddeprecated
- func (c *Command) UnsetExtractAudio() *Command
- func (c *Command) UnsetExtractorArgs() *Command
- func (c *Command) UnsetExtractorRetries() *Command
- func (c *Command) UnsetFFmpegLocation() *Command
- func (c *Command) UnsetFileAccessRetries() *Command
- func (c *Command) UnsetFixup() *Command
- func (c *Command) UnsetFlatPlaylist() *Command
- func (c *Command) UnsetForceGenericExtractor() *Commanddeprecated
- func (c *Command) UnsetForceIPv4() *Command
- func (c *Command) UnsetForceIPv6() *Command
- func (c *Command) UnsetForceKeyframesAtCuts() *Command
- func (c *Command) UnsetForceOverwrites() *Command
- func (c *Command) UnsetForceWriteArchive() *Command
- func (c *Command) UnsetFormat() *Command
- func (c *Command) UnsetFormatSort() *Command
- func (c *Command) UnsetFormatSortForce() *Command
- func (c *Command) UnsetFragmentRetries() *Command
- func (c *Command) UnsetGeoBypass() *Commanddeprecated
- func (c *Command) UnsetGeoBypassCountry() *Commanddeprecated
- func (c *Command) UnsetGeoBypassIPBlock() *Commanddeprecated
- func (c *Command) UnsetGeoVerificationProxy() *Command
- func (c *Command) UnsetGetDescription() *Commanddeprecated
- func (c *Command) UnsetGetDuration() *Commanddeprecated
- func (c *Command) UnsetGetFilename() *Commanddeprecated
- func (c *Command) UnsetGetFormat() *Commanddeprecated
- func (c *Command) UnsetGetID() *Commanddeprecated
- func (c *Command) UnsetGetThumbnail() *Commanddeprecated
- func (c *Command) UnsetGetTitle() *Commanddeprecated
- func (c *Command) UnsetGetURL() *Commanddeprecated
- func (c *Command) UnsetHLSPreferFFmpeg() *Commanddeprecated
- func (c *Command) UnsetHLSPreferNative() *Commanddeprecated
- func (c *Command) UnsetHLSSplitDiscontinuity() *Command
- func (c *Command) UnsetHLSUseMPEGTS() *Command
- func (c *Command) UnsetHTTPChunkSize() *Command
- func (c *Command) UnsetID() *Commanddeprecated
- func (c *Command) UnsetIgnoreConfig() *Command
- func (c *Command) UnsetIgnoreDynamicMPD() *Command
- func (c *Command) UnsetIgnoreErrors() *Command
- func (c *Command) UnsetIgnoreNoFormatsError() *Command
- func (c *Command) UnsetImpersonate() *Command
- func (c *Command) UnsetJsRuntimes() *Command
- func (c *Command) UnsetKeepFragments() *Command
- func (c *Command) UnsetKeepVideo() *Command
- func (c *Command) UnsetLazyPlaylist() *Command
- func (c *Command) UnsetLegacyServerConnect() *Command
- func (c *Command) UnsetLimitRate() *Command
- func (c *Command) UnsetListFormats() *Commanddeprecated
- func (c *Command) UnsetListFormatsAsTable() *Commanddeprecated
- func (c *Command) UnsetListFormatsOld() *Commanddeprecated
- func (c *Command) UnsetListImpersonateTargets() *Command
- func (c *Command) UnsetListSubs() *Command
- func (c *Command) UnsetListThumbnails() *Commanddeprecated
- func (c *Command) UnsetLiveFromStart() *Command
- func (c *Command) UnsetLoadInfoJSON() *Command
- func (c *Command) UnsetMarkWatched() *Command
- func (c *Command) UnsetMatchFilters() *Command
- func (c *Command) UnsetMatchTitle() *Commanddeprecated
- func (c *Command) UnsetMaxDownloads() *Command
- func (c *Command) UnsetMaxFileSize() *Command
- func (c *Command) UnsetMaxSleepInterval() *Command
- func (c *Command) UnsetMaxViews() *Commanddeprecated
- func (c *Command) UnsetMergeOutputFormat() *Command
- func (c *Command) UnsetMetadataFromTitle() *Commanddeprecated
- func (c *Command) UnsetMinFileSize() *Command
- func (c *Command) UnsetMinViews() *Commanddeprecated
- func (c *Command) UnsetMtime() *Command
- func (c *Command) UnsetNetrc() *Command
- func (c *Command) UnsetNetrcCmd() *Command
- func (c *Command) UnsetNetrcLocation() *Command
- func (c *Command) UnsetNewline() *Command
- func (c *Command) UnsetOutput() *Command
- func (c *Command) UnsetOutputNaPlaceholder() *Command
- func (c *Command) UnsetOverwrites() *Command
- func (c *Command) UnsetParseMetadata() *Command
- func (c *Command) UnsetPart() *Command
- func (c *Command) UnsetPassword() *Command
- func (c *Command) UnsetPaths() *Command
- func (c *Command) UnsetPlaylist() *Command
- func (c *Command) UnsetPlaylistEnd() *Commanddeprecated
- func (c *Command) UnsetPlaylistItems() *Command
- func (c *Command) UnsetPlaylistRandom() *Command
- func (c *Command) UnsetPlaylistReverse() *Commanddeprecated
- func (c *Command) UnsetPlaylistStart() *Commanddeprecated
- func (c *Command) UnsetPluginDirs() *Command
- func (c *Command) UnsetPostOverwrites() *Command
- func (c *Command) UnsetPostProcessorArgs() *Command
- func (c *Command) UnsetPreferFreeFormats() *Command
- func (c *Command) UnsetPreferInsecure() *Command
- func (c *Command) UnsetPresetAlias() *Command
- func (c *Command) UnsetPrint() *Command
- func (c *Command) UnsetPrintJSON() *Command
- func (c *Command) UnsetPrintToFile() *Command
- func (c *Command) UnsetPrintTraffic() *Command
- func (c *Command) UnsetProgress() *Command
- func (c *Command) UnsetProgressDelta() *Command
- func (c *Command) UnsetProgressFunc() *Command
- func (c *Command) UnsetProgressTemplate() *Command
- func (c *Command) UnsetProxy() *Command
- func (c *Command) UnsetQuiet() *Command
- func (c *Command) UnsetRecodeVideo() *Command
- func (c *Command) UnsetReferer() *Commanddeprecated
- func (c *Command) UnsetRejectTitle() *Commanddeprecated
- func (c *Command) UnsetRemoteComponents() *Command
- func (c *Command) UnsetRemoveChapters() *Command
- func (c *Command) UnsetRemuxVideo() *Command
- func (c *Command) UnsetReplaceInMetadata() *Command
- func (c *Command) UnsetResizeBuffer() *Command
- func (c *Command) UnsetRestrictFilenames() *Command
- func (c *Command) UnsetRetries() *Command
- func (c *Command) UnsetRetrySleep() *Command
- func (c *Command) UnsetRmCacheDir() *Command
- func (c *Command) UnsetSimulate() *Command
- func (c *Command) UnsetSkipDownload() *Command
- func (c *Command) UnsetSkipPlaylistAfterErrors() *Command
- func (c *Command) UnsetSkipUnavailableFragments() *Command
- func (c *Command) UnsetSleepInterval() *Command
- func (c *Command) UnsetSleepRequests() *Command
- func (c *Command) UnsetSleepSubtitles() *Command
- func (c *Command) UnsetSocketTimeout() *Command
- func (c *Command) UnsetSourceAddress() *Command
- func (c *Command) UnsetSplitChapters() *Command
- func (c *Command) UnsetSponsorblock() *Command
- func (c *Command) UnsetSponsorblockAPI() *Command
- func (c *Command) UnsetSponsorblockChapterTitle() *Command
- func (c *Command) UnsetSponsorblockMark() *Command
- func (c *Command) UnsetSponsorblockRemove() *Command
- func (c *Command) UnsetSubFormat() *Command
- func (c *Command) UnsetSubLangs() *Command
- func (c *Command) UnsetThrottledRate() *Command
- func (c *Command) UnsetTrimFilenames() *Command
- func (c *Command) UnsetTwoFactor() *Command
- func (c *Command) UnsetUpdate() *Command
- func (c *Command) UnsetUseExtractors() *Command
- func (c *Command) UnsetUsePostProcessor() *Command
- func (c *Command) UnsetUserAgent() *Commanddeprecated
- func (c *Command) UnsetUsername() *Command
- func (c *Command) UnsetVerbose() *Command
- func (c *Command) UnsetVideoMultistreams() *Command
- func (c *Command) UnsetVideoPassword() *Command
- func (c *Command) UnsetWaitForVideo() *Command
- func (c *Command) UnsetWarnings() *Command
- func (c *Command) UnsetWindowsFilenames() *Command
- func (c *Command) UnsetWriteAllThumbnails() *Command
- func (c *Command) UnsetWriteAutoSubs() *Command
- func (c *Command) UnsetWriteComments() *Command
- func (c *Command) UnsetWriteDescription() *Command
- func (c *Command) UnsetWriteDesktopLink() *Command
- func (c *Command) UnsetWriteInfoJSON() *Command
- func (c *Command) UnsetWriteLink() *Command
- func (c *Command) UnsetWritePages() *Command
- func (c *Command) UnsetWritePlaylistMetafiles() *Command
- func (c *Command) UnsetWriteSubs() *Command
- func (c *Command) UnsetWriteThumbnail() *Command
- func (c *Command) UnsetWriteURLLink() *Command
- func (c *Command) UnsetWriteWeblocLink() *Command
- func (c *Command) UnsetXFF() *Command
- func (c *Command) UnsetXattrs() *Command
- func (c *Command) Update(ctx context.Context) (*Result, error)
- func (c *Command) UpdateTo(ctx context.Context, value string) (*Result, error)
- func (c *Command) UseExtractors(names string) *Command
- func (c *Command) UsePostProcessor(name string) *Command
- func (c *Command) UserAgent(ua string) *Commanddeprecated
- func (c *Command) Username(username string) *Command
- func (c *Command) Verbose() *Command
- func (c *Command) Version(ctx context.Context) (*Result, error)
- func (c *Command) VideoMultistreams() *Command
- func (c *Command) VideoPassword(password string) *Command
- func (c *Command) WaitForVideo(min string) *Command
- func (c *Command) WindowsFilenames() *Command
- func (c *Command) WriteAllThumbnails() *Command
- func (c *Command) WriteAutoSubs() *Command
- func (c *Command) WriteComments() *Command
- func (c *Command) WriteDescription() *Command
- func (c *Command) WriteDesktopLink() *Command
- func (c *Command) WriteInfoJSON() *Command
- func (c *Command) WriteLink() *Command
- func (c *Command) WritePages() *Command
- func (c *Command) WritePlaylistMetafiles() *Command
- func (c *Command) WriteSubs() *Command
- func (c *Command) WriteThumbnail() *Command
- func (c *Command) WriteURLLink() *Command
- func (c *Command) WriteWeblocLink() *Command
- func (c *Command) XFF(value string) *Command
- func (c *Command) Xattrs() *Command
- func (c *Command) YesPlaylist() *Command
- type ConcatPlaylistOption
- type ErrExitCode
- type ErrJSONParsingFlag
- type ErrMisconfig
- type ErrMultipleJSONParsingFlags
- type ErrParsing
- type ErrUnknown
- type ExtractedAvailability
- type ExtractedChapterData
- type ExtractedFormat
- type ExtractedFragment
- type ExtractedHeatmapData
- type ExtractedInfo
- type ExtractedLiveStatus
- type ExtractedSubtitle
- type ExtractedThumbnail
- type ExtractedType
- type ExtractedVersion
- type ExtractedVideoComment
- type Extractor
- type FixupOption
- type Flag
- type FlagConfig
- type FlagPrintToFile
- type FlagReplaceInMetadata
- type Flags
- type FlagsAuthentication
- type FlagsDownload
- type FlagsExtractor
- type FlagsFilesystem
- type FlagsGeneral
- type FlagsGeoRestriction
- type FlagsInternetShortcut
- type FlagsNetwork
- type FlagsPostProcessing
- type FlagsSponsorBlock
- type FlagsSubtitle
- type FlagsThumbnail
- type FlagsVerbositySimulation
- type FlagsVideoFormat
- type FlagsVideoSelection
- type FlagsWorkarounds
- type InstallBunOptions
- type InstallFFmpegOptions
- type InstallOptions
- type ProgressCallbackFunc
- type ProgressStatus
- type ProgressUpdate
- type ResolvedInstall
- func Install(ctx context.Context, opts *InstallOptions) (*ResolvedInstall, error)
- func InstallAll(ctx context.Context) ([]*ResolvedInstall, error)
- func InstallBun(ctx context.Context, opts *InstallBunOptions) (*ResolvedInstall, error)
- func InstallFFmpeg(ctx context.Context, opts *InstallFFmpegOptions) (*ResolvedInstall, error)
- func InstallFFprobe(ctx context.Context, opts *InstallFFmpegOptions) (*ResolvedInstall, error)
- func MustInstallAll(ctx context.Context) []*ResolvedInstall
- type Result
- type ResultLog
Constants ¶
const ( // Channel of yt-dlp that go-ytdlp was generated with. Channel = "stable" // Version of yt-dlp that go-ytdlp was generated with. Version = "2025.12.08" )
Variables ¶
var AllConcatPlaylistOptions = []ConcatPlaylistOption{ ConcatPlaylistNever, ConcatPlaylistAlways, ConcatPlaylistMultiVideo, }
AllConcatPlaylistOptions are all of the possible values for the ConcatPlaylist option.
var AllFixupOptions = []FixupOption{ FixupNever, FixupIgnore, FixupWarn, FixupDetectOrWarn, FixupForce, }
AllFixupOptions are all of the possible values for the Fixup option.
var SupportedExtractors = []*Extractor{}/* 1862 elements not displayed */
Functions ¶
func GetCacheDir ¶
GetCacheDir returns the cache directory for go-ytdlp. Note that it may not be created yet.
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.
func MustInstallBun ¶
func MustInstallBun(ctx context.Context, opts *InstallBunOptions)
MustInstallBun is similar to InstallBun, but panics if there is an error.
func MustInstallFFmpeg ¶
func MustInstallFFmpeg(ctx context.Context, opts *InstallFFmpegOptions)
MustInstallFFmpeg is similar to InstallFFmpeg, but panics if there is an error.
func MustInstallFFprobe ¶
func MustInstallFFprobe(ctx context.Context, opts *InstallFFmpegOptions)
MustInstallFFprobe is similar to InstallFFprobe, but panics if there is an error.
func RemoveInstallCache ¶
func RemoveInstallCache() error
RemoveInstallCache removes the cache directory for go-ytdlp, and clears in-memory install resolve caches for all binaries.
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 ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.Format with `all` as an argument.
func (*Command) AllSubs
deprecated
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"
Deprecated: Use Command.SubLangs with `all` as an argument, in addition to Command.WriteSubs.
func (*Command) AllowDynamicMPD ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use string formatting, e.g. `%(autonumber)03d`.
func (*Command) AutoNumberStart
deprecated
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"
Deprecated: Use internal field formatting like `%(autonumber+NUMBER)s`.
func (*Command) BatchFile ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.BreakMatchFilters instead.
func (*Command) BreakPerInput ¶
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 ¶
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) BuildCommand ¶
BuildCommand builds the command to be executed. args passed here are any additional arguments to be passed to yt-dlp (commonly URLs or similar). This should not be used directly unless you want to reference the arguments passed to yt-dlp.
func (*Command) CacheDir ¶
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) CheckAllFormats ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
Clone returns a copy of the command, with all flags, env vars, executable, working directory, etc copied over.
func (*Command) Color ¶
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 ¶
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:
- Compatibility Options: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#differences-in-default-behavior
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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, 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 ¶
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 ¶
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 ¶
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.
- From option group: "Verbosity Simulation"
func (*Command) DumpSingleJSON ¶
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) EmbedChapters ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.Exec with `before_dl:CMD` as an argument.
func (*Command) ExtractAudio ¶
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 ¶
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:
- Extractor Arguments: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#extractor-arguments
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 ¶
Output descriptions of all supported extractors and exit
Additional information:
- ExtractorDescriptions maps to cli flags: --extractor-descriptions.
- From option group: "General"
func (*Command) ExtractorRetries ¶
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 ¶
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=PATH.
- From option group: "Post-Processing"
func (*Command) FileAccessRetries ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.UseExtractors with `generic,default` as an argument.
func (*Command) ForceIPv4 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
Video format code, see "FORMAT SELECTION" for more details
References:
- Format Selection: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#format-selection
- Filter Formatting: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#filtering-formats
- Format Selection Examples: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#format-selection-examples
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 ¶
Sort the formats by the fields given, see "Sorting Formats" for more details
References:
- Sorting Formats: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#sorting-formats
- Format Selection Examples: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#format-selection-examples
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.XFF with `default` as an argument.
func (*Command) GeoBypassCountry
deprecated
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"
Deprecated: Use Command.XFF with `CODE` as an argument.
func (*Command) GeoBypassIPBlock
deprecated
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"
Deprecated: Use Command.XFF with `IP_BLOCK` as an argument.
func (*Command) GeoVerificationProxy ¶
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
deprecated
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"
Deprecated: Use Command.Print with `description` as an argument.
func (*Command) GetDuration
deprecated
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"
Deprecated: Use Command.Print with `duration_string` as an argument.
func (*Command) GetFilename
deprecated
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"
Deprecated: Use Command.Print with `filename` as an argument.
func (*Command) GetFlagConfig ¶
func (c *Command) GetFlagConfig() *FlagConfig
GetFlagConfig returns a copy of the flag config.
func (*Command) GetFormat
deprecated
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"
Deprecated: Use Command.Print with `format` as an argument.
func (*Command) GetID
deprecated
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"
Deprecated: Use Command.Print with `id` as an argument.
func (*Command) GetThumbnail
deprecated
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"
Deprecated: Use Command.Print with `thumbnail` as an argument.
func (*Command) GetTitle
deprecated
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"
Deprecated: Use Command.Print with `title` as an argument.
func (*Command) GetURL
deprecated
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"
Deprecated: Use Command.Print with `urls` as an argument.
func (*Command) HLSPreferFFmpeg
deprecated
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"
Deprecated: Use Command.Downloader with `m3u8:ffmpeg` as an argument.
func (*Command) HLSPreferNative
deprecated
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"
Deprecated: Use Command.Downloader with `m3u8:native` as an argument.
func (*Command) HLSSplitDiscontinuity ¶
Split HLS playlists to different formats at discontinuities such as ad breaks
Additional information:
- See Command.UnsetHLSSplitDiscontinuity, for unsetting the flag.
- HLSSplitDiscontinuity maps to cli flags: --hls-split-discontinuity.
- From option group: "Extractor"
func (*Command) HLSUseMPEGTS ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.Output with `%(id)s.%(ext)s` as an argument.
func (*Command) IgnoreConfig ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) JsRuntimes ¶
Additional JavaScript runtime to enable, with an optional location for the runtime (either the path to the binary or its containing directory). This option can be used multiple times to enable multiple runtimes. Supported runtimes are (in order of priority, from highest to lowest): deno, node, quickjs, bun. Only "deno" is enabled by default. The highest priority runtime that is both enabled and available will be used. In order to use a lower priority runtime when "deno" is available, --no-js-runtimes needs to be passed before enabling other runtimes
Additional information:
- See Command.UnsetJsRuntimes, for unsetting the flag.
- JsRuntimes maps to cli flags: --js-runtimes=RUNTIME[:PATH].
- From option group: "General"
func (*Command) KeepFragments ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
List all supported extractors and exit
Additional information:
- ListExtractors maps to cli flags: --list-extractors.
- From option group: "General"
func (*Command) ListFormats
deprecated
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"
Deprecated: Use Command.Print with `formats_table` as an argument.
func (*Command) ListFormatsAsTable
deprecated
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"
Deprecated: Use Command.ListFormatsAsTable or Command.CompatOptions with `-list-formats` as an argument.
func (*Command) ListFormatsOld
deprecated
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"
Deprecated: Use Command.CompatOptions with `list-formats` as an argument.
func (*Command) ListImpersonateTargets ¶
List available clients to impersonate.
Additional information:
- See Command.UnsetListImpersonateTargets, for unsetting the flag.
- ListImpersonateTargets maps to cli flags: --list-impersonate-targets.
- From option group: "Network"
func (*Command) ListSubs ¶
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
deprecated
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"
Deprecated: Call Command.Print twice, once with `thumbnails_table` as an argument, then with `playlist:thumbnails_table` as an argument.
func (*Command) LiveFromStart ¶
Download livestreams from the start. Currently experimental and only supported for YouTube and Twitch
Additional information:
- See Command.UnsetLiveFromStart, for unsetting the flag.
- LiveFromStart maps to cli flags: --live-from-start.
- From option group: "General"
func (*Command) LoadInfoJSON ¶
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=FILE.
- From option group: "Filesystem"
func (*Command) MarkWatched ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.MatchFilters instead (e.g. `title ~= (?i)REGEX`).
func (*Command) MaxDownloads ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.MatchFilters instead (e.g. `view_count <=? COUNT`).
func (*Command) MergeOutputFormat ¶
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
deprecated
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"
Deprecated: Use Command.ParseMetadata with `%(title)s:FORMAT` as an argument.
func (*Command) MinFileSize ¶
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
deprecated
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"
Deprecated: Use Command.MatchFilters instead (e.g. `view_count >=? COUNT`).
func (*Command) Mtime ¶
Use the Last-modified header to set the file modification time
Additional information:
- See Command.UnsetMtime, for unsetting the flag.
- Mtime maps to cli flags: --mtime.
- From option group: "Filesystem"
func (*Command) Netrc ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
--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 ¶
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) NoCheckCertificates ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.Color with `no_color` as an argument.
func (*Command) NoConfigLocations ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.NoExec instead.
func (*Command) NoFlatPlaylist ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.XFF with `never` as an argument.
func (*Command) NoHLSSplitDiscontinuity ¶
Do not split HLS playlists into different formats at discontinuities such as ad breaks (default)
Additional information:
- See Command.UnsetHLSSplitDiscontinuity, for unsetting the flag.
- NoHLSSplitDiscontinuity maps to cli flags: --no-hls-split-discontinuity.
- From option group: "Extractor"
func (*Command) NoHLSUseMPEGTS ¶
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 ¶
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) NoJsRuntimes ¶
Clear JavaScript runtimes to enable, including defaults and those provided by previous --js-runtimes
Additional information:
- See Command.UnsetJsRuntimes, for unsetting the flag.
- NoJsRuntimes maps to cli flags: --no-js-runtimes.
- From option group: "General"
func (*Command) NoKeepFragments ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
Do not use the Last-modified header to set the file modification time (default)
Additional information:
- See Command.UnsetMtime, for unsetting the flag.
- NoMtime maps to cli flags: --no-mtime.
- From option group: "Filesystem"
func (*Command) NoOverwrites ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: It is now the default behavior.
func (*Command) NoPluginDirs ¶
Clear plugin directories to search, including defaults and those provided by previous --plugin-dirs
Additional information:
- See Command.UnsetPluginDirs, for unsetting the flag.
- NoPluginDirs maps to cli flags: --no-plugin-dirs.
- From option group: "General"
func (*Command) NoPostOverwrites ¶
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 ¶
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 ¶
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 ¶
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) NoRemoteComponents ¶
Disallow fetching of all remote components, including any previously allowed by --remote-components or defaults.
Additional information:
- See Command.UnsetRemoteComponents, for unsetting the flag.
- NoRemoteComponents maps to cli flags: --no-remote-components.
- From option group: "General"
func (*Command) NoRemoveChapters ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) NoSponsorblock ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
Sanitize filenames only minimally
Additional information:
- See Command.UnsetWindowsFilenames, for unsetting the flag.
- NoWindowsFilenames maps to cli flags: --no-windows-filenames.
- From option group: "Filesystem"
func (*Command) NoWriteAutoSubs ¶
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 ¶
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 ¶
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 ¶
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 ¶
Do not write playlist metadata when using --write-info-json, --write-description etc.
Additional information:
- See Command.UnsetWritePlaylistMetafiles, for unsetting the flag.
- NoWritePlaylistMetafiles maps to cli flags: --no-write-playlist-metafiles.
- From option group: "Filesystem"
func (*Command) NoWriteSubs ¶
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 ¶
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 ¶
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 ¶
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 ¶
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:
- Modifying Metadata: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#modifying-metadata
- Modifying Metadata Examples: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#modifying-metadata-examples
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.PlaylistItems with `:<your-number>` as an argument.
func (*Command) PlaylistItems ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.PlaylistItems with `::-1` as an argument.
func (*Command) PlaylistStart
deprecated
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"
Deprecated: Use Command.PlaylistItems with `<your-number>:` as an argument.
func (*Command) PluginDirs ¶
Path to an additional directory to search for plugins. This option can be used multiple times to add multiple directories. Use "default" to search the default plugin directories (default)
Additional information:
- See Command.UnsetPluginDirs, for unsetting the flag.
- PluginDirs maps to cli flags: --plugin-dirs=DIR.
- From option group: "General"
func (*Command) PostOverwrites ¶
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 ¶
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) PreferFreeFormats ¶
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 ¶
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) PresetAlias ¶
Applies a predefined set of options. e.g. --preset-alias mp3. The following presets are available: mp3, aac, mp4, mkv, sleep. See the "Preset Aliases" section at the end for more info. This option can be used multiple times
Additional information:
- See Command.UnsetPresetAlias, for unsetting the flag.
- PresetAlias maps to cli flags: -t/--preset-alias=PRESET.
- From option group: "General"
func (*Command) Print ¶
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 ¶
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 ¶
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 ¶
Display sent and read HTTP traffic
Additional information:
- See Command.UnsetPrintTraffic, for unsetting the flag.
- PrintTraffic maps to cli flags: --print-traffic.
- From option group: "Verbosity Simulation"
func (*Command) Progress ¶
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 ¶
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.
- See Command.UnsetProgressFunc, for unsetting the progress function.
func (*Command) ProgressTemplate ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.AddHeaders instead (e.g. `Referer:URL`).
func (*Command) RejectTitle
deprecated
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"
Deprecated: Use Command.MatchFilters instead (e.g. `title !~= (?i)REGEX`).
func (*Command) RemoteComponents ¶
Remote components to allow yt-dlp to fetch when required. This option is currently not needed if you are using an official executable or have the requisite version of the yt-dlp-ejs package installed. You can use this option multiple times to allow multiple components. Supported values: ejs:npm (external JavaScript components from npm), ejs:github (external JavaScript components from yt-dlp-ejs GitHub). By default, no remote components are allowed
Additional information:
- See Command.UnsetRemoteComponents, for unsetting the flag.
- RemoteComponents maps to cli flags: --remote-components=COMPONENT.
- From option group: "General"
func (*Command) RemoveChapters ¶
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 ¶
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 ¶
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:
- Modifying Metadata: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#modifying-metadata
- Modifying Metadata Examples: https://github.com/yt-dlp/yt-dlp/blob/2025.12.08/README.md#modifying-metadata-examples
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) SetCancelMaxWait ¶
SetCancelMaxWait sets the maximum wait time before the command is killed, after the context is cancelled. Defaults to 1 second.
func (*Command) SetEnvVar ¶
SetEnvVar sets an environment variable for the command. If value is empty, it will be removed. If the key is "PATH", it will be merged with the parent process's PATH, (where explicit values provided here will take precedence). See also [SetEnvVarInherit].
func (*Command) SetEnvVarInherit ¶
SetEnvVarInherit sets whether the command should inherit environment variables from the parent process. If enabled, the command will inherit the parent process's environment variables, and any environment variables set with [SetEnvVar] will be merged with the parent process's environment variables. If disabled, the command will only use the environment variables set with [SetEnvVar] (with the exception of PATH). Explicitly set env vars with [SetEnvVar] will always take precedence over the parent process's environment variables.
func (*Command) SetExecutable ¶
SetExecutable sets the executable path to yt-dlp for the command.
func (*Command) SetFlagConfig ¶
func (c *Command) SetFlagConfig(flagConfig *FlagConfig) *Command
SetFlagConfig sets the flag config for the command, overriding ALL previously set flags. If nil is provided, a new empty flag config will be used.
func (*Command) SetSeparateProcessGroup ¶
SetSeparateProcessGroup sets whether the command should be run in a separate process group. This is useful to avoid propagating signals from the app process. NOTE: This is only supported on Windows and Unix-like systems.
func (*Command) SetWorkDir ¶
SetWorkDir sets the working directory for the command. Defaults to current working directory.
func (*Command) Simulate ¶
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 ¶
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 ¶
Number of allowed failures until the rest of the playlist is skipped
Additional information:
- See Command.UnsetSkipPlaylistAfterErrors, for unsetting the flag.
- SkipPlaylistAfterErrors maps to cli flags: --skip-playlist-after-errors=N.
- From option group: "Video Selection"
func (*Command) SkipUnavailableFragments ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) SponsorblockAPI ¶
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 ¶
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 ¶
SponsorBlock categories to create chapters for, separated by commas. Available categories are sponsor, intro, outro, selfpromo, preview, filler, interaction, music_offtopic, hook, 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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
UnsetAbortOnError unsets any flags that were previously set by one of:
func (*Command) UnsetAbortOnUnavailableFragments ¶
UnsetAbortOnUnavailableFragments unsets any flags that were previously set by one of:
func (*Command) UnsetAddHeaders ¶
UnsetAddHeaders unsets any flags that were previously set by one of:
func (*Command) UnsetAgeLimit ¶
UnsetAgeLimit unsets any flags that were previously set by one of:
func (*Command) UnsetAllFormats
deprecated
UnsetAllFormats unsets any flags that were previously set by one of:
Deprecated: Use Command.Format with `all` as an argument.
func (*Command) UnsetAllSubs
deprecated
UnsetAllSubs unsets any flags that were previously set by one of:
Deprecated: Use Command.SubLangs with `all` as an argument, in addition to Command.WriteSubs.
func (*Command) UnsetAllowDynamicMPD ¶
UnsetAllowDynamicMPD unsets any flags that were previously set by one of:
func (*Command) UnsetApListMSO ¶
UnsetApListMSO unsets any flags that were previously set by one of:
func (*Command) UnsetApMSO ¶
UnsetApMSO unsets any flags that were previously set by one of:
func (*Command) UnsetApPassword ¶
UnsetApPassword unsets any flags that were previously set by one of:
func (*Command) UnsetApUsername ¶
UnsetApUsername unsets any flags that were previously set by one of:
func (*Command) UnsetAudioFormat ¶
UnsetAudioFormat unsets any flags that were previously set by one of:
func (*Command) UnsetAudioMultistreams ¶
UnsetAudioMultistreams unsets any flags that were previously set by one of:
func (*Command) UnsetAudioQuality ¶
UnsetAudioQuality unsets any flags that were previously set by one of:
func (*Command) UnsetAutoNumberSize
deprecated
UnsetAutoNumberSize unsets any flags that were previously set by one of:
Deprecated: Use string formatting, e.g. `%(autonumber)03d`.
func (*Command) UnsetAutoNumberStart
deprecated
UnsetAutoNumberStart unsets any flags that were previously set by one of:
Deprecated: Use internal field formatting like `%(autonumber+NUMBER)s`.
func (*Command) UnsetBatchFile ¶
UnsetBatchFile unsets any flags that were previously set by one of:
func (*Command) UnsetBidiWorkaround ¶
UnsetBidiWorkaround unsets any flags that were previously set by one of:
func (*Command) UnsetBreakMatchFilters ¶
UnsetBreakMatchFilters unsets any flags that were previously set by one of:
func (*Command) UnsetBreakOnExisting ¶
UnsetBreakOnExisting unsets any flags that were previously set by one of:
func (*Command) UnsetBreakOnReject
deprecated
UnsetBreakOnReject unsets any flags that were previously set by one of:
Deprecated: Use Command.BreakMatchFilters instead.
func (*Command) UnsetBreakPerInput ¶
UnsetBreakPerInput unsets any flags that were previously set by one of:
func (*Command) UnsetBufferSize ¶
UnsetBufferSize unsets any flags that were previously set by one of:
func (*Command) UnsetCacheDir ¶
UnsetCacheDir unsets any flags that were previously set by one of:
func (*Command) UnsetCheckAllFormats ¶
UnsetCheckAllFormats unsets any flags that were previously set by one of:
func (*Command) UnsetCheckCertificates ¶
UnsetCheckCertificates unsets any flags that were previously set by one of:
func (*Command) UnsetCheckFormats ¶
UnsetCheckFormats unsets any flags that were previously set by one of:
func (*Command) UnsetCleanInfoJSON ¶
UnsetCleanInfoJSON unsets any flags that were previously set by one of:
func (*Command) UnsetClientCertificate ¶
UnsetClientCertificate unsets any flags that were previously set by one of:
func (*Command) UnsetClientCertificateKey ¶
UnsetClientCertificateKey unsets any flags that were previously set by one of:
func (*Command) UnsetClientCertificatePassword ¶
UnsetClientCertificatePassword unsets any flags that were previously set by one of:
func (*Command) UnsetColor ¶
UnsetColor unsets any flags that were previously set by one of:
func (*Command) UnsetColors
deprecated
UnsetColors unsets any flags that were previously set by one of:
Deprecated: Use Command.Color with `no_color` as an argument.
func (*Command) UnsetCompatOptions ¶
UnsetCompatOptions unsets any flags that were previously set by one of:
func (*Command) UnsetConcatPlaylist ¶
UnsetConcatPlaylist unsets any flags that were previously set by one of:
func (*Command) UnsetConcurrentFragments ¶
UnsetConcurrentFragments unsets any flags that were previously set by one of:
func (*Command) UnsetConfigLocations ¶
UnsetConfigLocations unsets any flags that were previously set by one of:
func (*Command) UnsetConsoleTitle ¶
UnsetConsoleTitle unsets any flags that were previously set by one of:
func (*Command) UnsetContinue ¶
UnsetContinue unsets any flags that were previously set by one of:
func (*Command) UnsetConvertSubs ¶
UnsetConvertSubs unsets any flags that were previously set by one of:
func (*Command) UnsetConvertThumbnails ¶
UnsetConvertThumbnails unsets any flags that were previously set by one of:
func (*Command) UnsetCookies ¶
UnsetCookies unsets any flags that were previously set by one of:
func (*Command) UnsetCookiesFromBrowser ¶
UnsetCookiesFromBrowser unsets any flags that were previously set by one of:
func (*Command) UnsetDateAfter ¶
UnsetDateAfter unsets any flags that were previously set by one of:
func (*Command) UnsetDateBefore ¶
UnsetDateBefore unsets any flags that were previously set by one of:
func (*Command) UnsetDefaultSearch ¶
UnsetDefaultSearch unsets any flags that were previously set by one of:
func (*Command) UnsetDownloadArchive ¶
UnsetDownloadArchive unsets any flags that were previously set by one of:
func (*Command) UnsetDownloadSections ¶
UnsetDownloadSections unsets any flags that were previously set by one of:
func (*Command) UnsetDownloader ¶
UnsetDownloader unsets any flags that were previously set by one of:
func (*Command) UnsetDownloaderArgs ¶
UnsetDownloaderArgs unsets any flags that were previously set by one of:
func (*Command) UnsetDumpJSON ¶
UnsetDumpJSON unsets any flags that were previously set by one of:
func (*Command) UnsetDumpPages ¶
UnsetDumpPages unsets any flags that were previously set by one of:
func (*Command) UnsetDumpSingleJSON ¶
UnsetDumpSingleJSON unsets any flags that were previously set by one of:
func (*Command) UnsetEmbedChapters ¶
UnsetEmbedChapters unsets any flags that were previously set by one of:
func (*Command) UnsetEmbedInfoJSON ¶
UnsetEmbedInfoJSON unsets any flags that were previously set by one of:
func (*Command) UnsetEmbedMetadata ¶
UnsetEmbedMetadata unsets any flags that were previously set by one of:
func (*Command) UnsetEmbedSubs ¶
UnsetEmbedSubs unsets any flags that were previously set by one of:
func (*Command) UnsetEmbedThumbnail ¶
UnsetEmbedThumbnail unsets any flags that were previously set by one of:
func (*Command) UnsetEnableFileURLs ¶
UnsetEnableFileURLs unsets any flags that were previously set by one of:
func (*Command) UnsetEncoding ¶
UnsetEncoding unsets any flags that were previously set by one of:
func (*Command) UnsetExecBeforeDownload
deprecated
UnsetExecBeforeDownload unsets any flags that were previously set by one of:
Deprecated: Use Command.Exec with `before_dl:CMD` as an argument.
func (*Command) UnsetExtractAudio ¶
UnsetExtractAudio unsets any flags that were previously set by one of:
func (*Command) UnsetExtractorArgs ¶
UnsetExtractorArgs unsets any flags that were previously set by one of:
func (*Command) UnsetExtractorRetries ¶
UnsetExtractorRetries unsets any flags that were previously set by one of:
func (*Command) UnsetFFmpegLocation ¶
UnsetFFmpegLocation unsets any flags that were previously set by one of:
func (*Command) UnsetFileAccessRetries ¶
UnsetFileAccessRetries unsets any flags that were previously set by one of:
func (*Command) UnsetFixup ¶
UnsetFixup unsets any flags that were previously set by one of:
func (*Command) UnsetFlatPlaylist ¶
UnsetFlatPlaylist unsets any flags that were previously set by one of:
func (*Command) UnsetForceGenericExtractor
deprecated
UnsetForceGenericExtractor unsets any flags that were previously set by one of:
Deprecated: Use Command.UseExtractors with `generic,default` as an argument.
func (*Command) UnsetForceIPv4 ¶
UnsetForceIPv4 unsets any flags that were previously set by one of:
func (*Command) UnsetForceIPv6 ¶
UnsetForceIPv6 unsets any flags that were previously set by one of:
func (*Command) UnsetForceKeyframesAtCuts ¶
UnsetForceKeyframesAtCuts unsets any flags that were previously set by one of:
func (*Command) UnsetForceOverwrites ¶
UnsetForceOverwrites unsets any flags that were previously set by one of:
func (*Command) UnsetForceWriteArchive ¶
UnsetForceWriteArchive unsets any flags that were previously set by one of:
func (*Command) UnsetFormat ¶
UnsetFormat unsets any flags that were previously set by one of:
func (*Command) UnsetFormatSort ¶
UnsetFormatSort unsets any flags that were previously set by one of:
func (*Command) UnsetFormatSortForce ¶
UnsetFormatSortForce unsets any flags that were previously set by one of:
func (*Command) UnsetFragmentRetries ¶
UnsetFragmentRetries unsets any flags that were previously set by one of:
func (*Command) UnsetGeoBypass
deprecated
UnsetGeoBypass unsets any flags that were previously set by one of:
Deprecated: Use Command.XFF with `default` as an argument.
func (*Command) UnsetGeoBypassCountry
deprecated
UnsetGeoBypassCountry unsets any flags that were previously set by one of:
Deprecated: Use Command.XFF with `CODE` as an argument.
func (*Command) UnsetGeoBypassIPBlock
deprecated
UnsetGeoBypassIPBlock unsets any flags that were previously set by one of:
Deprecated: Use Command.XFF with `IP_BLOCK` as an argument.
func (*Command) UnsetGeoVerificationProxy ¶
UnsetGeoVerificationProxy unsets any flags that were previously set by one of:
func (*Command) UnsetGetDescription
deprecated
UnsetGetDescription unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `description` as an argument.
func (*Command) UnsetGetDuration
deprecated
UnsetGetDuration unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `duration_string` as an argument.
func (*Command) UnsetGetFilename
deprecated
UnsetGetFilename unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `filename` as an argument.
func (*Command) UnsetGetFormat
deprecated
UnsetGetFormat unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `format` as an argument.
func (*Command) UnsetGetID
deprecated
UnsetGetID unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `id` as an argument.
func (*Command) UnsetGetThumbnail
deprecated
UnsetGetThumbnail unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `thumbnail` as an argument.
func (*Command) UnsetGetTitle
deprecated
UnsetGetTitle unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `title` as an argument.
func (*Command) UnsetGetURL
deprecated
UnsetGetURL unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `urls` as an argument.
func (*Command) UnsetHLSPreferFFmpeg
deprecated
UnsetHLSPreferFFmpeg unsets any flags that were previously set by one of:
Deprecated: Use Command.Downloader with `m3u8:ffmpeg` as an argument.
func (*Command) UnsetHLSPreferNative
deprecated
UnsetHLSPreferNative unsets any flags that were previously set by one of:
Deprecated: Use Command.Downloader with `m3u8:native` as an argument.
func (*Command) UnsetHLSSplitDiscontinuity ¶
UnsetHLSSplitDiscontinuity unsets any flags that were previously set by one of:
func (*Command) UnsetHLSUseMPEGTS ¶
UnsetHLSUseMPEGTS unsets any flags that were previously set by one of:
func (*Command) UnsetHTTPChunkSize ¶
UnsetHTTPChunkSize unsets any flags that were previously set by one of:
func (*Command) UnsetID
deprecated
UnsetID unsets any flags that were previously set by one of:
Deprecated: Use Command.Output with `%(id)s.%(ext)s` as an argument.
func (*Command) UnsetIgnoreConfig ¶
UnsetIgnoreConfig unsets any flags that were previously set by one of:
func (*Command) UnsetIgnoreDynamicMPD ¶
UnsetIgnoreDynamicMPD unsets any flags that were previously set by one of:
func (*Command) UnsetIgnoreErrors ¶
UnsetIgnoreErrors unsets any flags that were previously set by one of:
func (*Command) UnsetIgnoreNoFormatsError ¶
UnsetIgnoreNoFormatsError unsets any flags that were previously set by one of:
func (*Command) UnsetImpersonate ¶
UnsetImpersonate unsets any flags that were previously set by one of:
func (*Command) UnsetJsRuntimes ¶
UnsetJsRuntimes unsets any flags that were previously set by one of:
func (*Command) UnsetKeepFragments ¶
UnsetKeepFragments unsets any flags that were previously set by one of:
func (*Command) UnsetKeepVideo ¶
UnsetKeepVideo unsets any flags that were previously set by one of:
func (*Command) UnsetLazyPlaylist ¶
UnsetLazyPlaylist unsets any flags that were previously set by one of:
func (*Command) UnsetLegacyServerConnect ¶
UnsetLegacyServerConnect unsets any flags that were previously set by one of:
func (*Command) UnsetLimitRate ¶
UnsetLimitRate unsets any flags that were previously set by one of:
func (*Command) UnsetListFormats
deprecated
UnsetListFormats unsets any flags that were previously set by one of:
Deprecated: Use Command.Print with `formats_table` as an argument.
func (*Command) UnsetListFormatsAsTable
deprecated
UnsetListFormatsAsTable unsets any flags that were previously set by one of:
Deprecated: Use Command.ListFormatsAsTable or Command.CompatOptions with `-list-formats` as an argument.
func (*Command) UnsetListFormatsOld
deprecated
UnsetListFormatsOld unsets any flags that were previously set by one of:
Deprecated: Use Command.CompatOptions with `list-formats` as an argument.
func (*Command) UnsetListImpersonateTargets ¶
UnsetListImpersonateTargets unsets any flags that were previously set by one of:
func (*Command) UnsetListSubs ¶
UnsetListSubs unsets any flags that were previously set by one of:
func (*Command) UnsetListThumbnails
deprecated
UnsetListThumbnails unsets any flags that were previously set by one of:
Deprecated: Call Command.Print twice, once with `thumbnails_table` as an argument, then with `playlist:thumbnails_table` as an argument.
func (*Command) UnsetLiveFromStart ¶
UnsetLiveFromStart unsets any flags that were previously set by one of:
func (*Command) UnsetLoadInfoJSON ¶
UnsetLoadInfoJSON unsets any flags that were previously set by one of:
func (*Command) UnsetMarkWatched ¶
UnsetMarkWatched unsets any flags that were previously set by one of:
func (*Command) UnsetMatchFilters ¶
UnsetMatchFilters unsets any flags that were previously set by one of:
func (*Command) UnsetMatchTitle
deprecated
UnsetMatchTitle unsets any flags that were previously set by one of:
Deprecated: Use Command.MatchFilters instead (e.g. `title ~= (?i)REGEX`).
func (*Command) UnsetMaxDownloads ¶
UnsetMaxDownloads unsets any flags that were previously set by one of:
func (*Command) UnsetMaxFileSize ¶
UnsetMaxFileSize unsets any flags that were previously set by one of:
func (*Command) UnsetMaxSleepInterval ¶
UnsetMaxSleepInterval unsets any flags that were previously set by one of:
func (*Command) UnsetMaxViews
deprecated
UnsetMaxViews unsets any flags that were previously set by one of:
Deprecated: Use Command.MatchFilters instead (e.g. `view_count <=? COUNT`).
func (*Command) UnsetMergeOutputFormat ¶
UnsetMergeOutputFormat unsets any flags that were previously set by one of:
func (*Command) UnsetMetadataFromTitle
deprecated
UnsetMetadataFromTitle unsets any flags that were previously set by one of:
Deprecated: Use Command.ParseMetadata with `%(title)s:FORMAT` as an argument.
func (*Command) UnsetMinFileSize ¶
UnsetMinFileSize unsets any flags that were previously set by one of:
func (*Command) UnsetMinViews
deprecated
UnsetMinViews unsets any flags that were previously set by one of:
Deprecated: Use Command.MatchFilters instead (e.g. `view_count >=? COUNT`).
func (*Command) UnsetMtime ¶
UnsetMtime unsets any flags that were previously set by one of:
func (*Command) UnsetNetrc ¶
UnsetNetrc unsets any flags that were previously set by one of:
func (*Command) UnsetNetrcCmd ¶
UnsetNetrcCmd unsets any flags that were previously set by one of:
func (*Command) UnsetNetrcLocation ¶
UnsetNetrcLocation unsets any flags that were previously set by one of:
func (*Command) UnsetNewline ¶
UnsetNewline unsets any flags that were previously set by one of:
func (*Command) UnsetOutput ¶
UnsetOutput unsets any flags that were previously set by one of:
func (*Command) UnsetOutputNaPlaceholder ¶
UnsetOutputNaPlaceholder unsets any flags that were previously set by one of:
func (*Command) UnsetOverwrites ¶
UnsetOverwrites unsets any flags that were previously set by one of:
func (*Command) UnsetParseMetadata ¶
UnsetParseMetadata unsets any flags that were previously set by one of:
func (*Command) UnsetPassword ¶
UnsetPassword unsets any flags that were previously set by one of:
func (*Command) UnsetPaths ¶
UnsetPaths unsets any flags that were previously set by one of:
func (*Command) UnsetPlaylist ¶
UnsetPlaylist unsets any flags that were previously set by one of:
func (*Command) UnsetPlaylistEnd
deprecated
UnsetPlaylistEnd unsets any flags that were previously set by one of:
Deprecated: Use Command.PlaylistItems with `:<your-number>` as an argument.
func (*Command) UnsetPlaylistItems ¶
UnsetPlaylistItems unsets any flags that were previously set by one of:
func (*Command) UnsetPlaylistRandom ¶
UnsetPlaylistRandom unsets any flags that were previously set by one of:
func (*Command) UnsetPlaylistReverse
deprecated
UnsetPlaylistReverse unsets any flags that were previously set by one of:
Deprecated: Use Command.PlaylistItems with `::-1` as an argument.
func (*Command) UnsetPlaylistStart
deprecated
UnsetPlaylistStart unsets any flags that were previously set by one of:
Deprecated: Use Command.PlaylistItems with `<your-number>:` as an argument.
func (*Command) UnsetPluginDirs ¶
UnsetPluginDirs unsets any flags that were previously set by one of:
func (*Command) UnsetPostOverwrites ¶
UnsetPostOverwrites unsets any flags that were previously set by one of:
func (*Command) UnsetPostProcessorArgs ¶
UnsetPostProcessorArgs unsets any flags that were previously set by one of:
func (*Command) UnsetPreferFreeFormats ¶
UnsetPreferFreeFormats unsets any flags that were previously set by one of:
func (*Command) UnsetPreferInsecure ¶
UnsetPreferInsecure unsets any flags that were previously set by one of:
func (*Command) UnsetPresetAlias ¶
UnsetPresetAlias unsets any flags that were previously set by one of:
func (*Command) UnsetPrint ¶
UnsetPrint unsets any flags that were previously set by one of:
func (*Command) UnsetPrintJSON ¶
UnsetPrintJSON unsets any flags that were previously set by one of:
func (*Command) UnsetPrintToFile ¶
UnsetPrintToFile unsets any flags that were previously set by one of:
func (*Command) UnsetPrintTraffic ¶
UnsetPrintTraffic unsets any flags that were previously set by one of:
func (*Command) UnsetProgress ¶
UnsetProgress unsets any flags that were previously set by one of:
func (*Command) UnsetProgressDelta ¶
UnsetProgressDelta unsets any flags that were previously set by one of:
func (*Command) UnsetProgressFunc ¶
UnsetProgressFunc can be used to unset the progress function that was previously set with Command.ProgressFunc.
func (*Command) UnsetProgressTemplate ¶
UnsetProgressTemplate unsets any flags that were previously set by one of:
func (*Command) UnsetProxy ¶
UnsetProxy unsets any flags that were previously set by one of:
func (*Command) UnsetQuiet ¶
UnsetQuiet unsets any flags that were previously set by one of:
func (*Command) UnsetRecodeVideo ¶
UnsetRecodeVideo unsets any flags that were previously set by one of:
func (*Command) UnsetReferer
deprecated
UnsetReferer unsets any flags that were previously set by one of:
Deprecated: Use Command.AddHeaders instead (e.g. `Referer:URL`).
func (*Command) UnsetRejectTitle
deprecated
UnsetRejectTitle unsets any flags that were previously set by one of:
Deprecated: Use Command.MatchFilters instead (e.g. `title !~= (?i)REGEX`).
func (*Command) UnsetRemoteComponents ¶
UnsetRemoteComponents unsets any flags that were previously set by one of:
func (*Command) UnsetRemoveChapters ¶
UnsetRemoveChapters unsets any flags that were previously set by one of:
func (*Command) UnsetRemuxVideo ¶
UnsetRemuxVideo unsets any flags that were previously set by one of:
func (*Command) UnsetReplaceInMetadata ¶
UnsetReplaceInMetadata unsets any flags that were previously set by one of:
func (*Command) UnsetResizeBuffer ¶
UnsetResizeBuffer unsets any flags that were previously set by one of:
func (*Command) UnsetRestrictFilenames ¶
UnsetRestrictFilenames unsets any flags that were previously set by one of:
func (*Command) UnsetRetries ¶
UnsetRetries unsets any flags that were previously set by one of:
func (*Command) UnsetRetrySleep ¶
UnsetRetrySleep unsets any flags that were previously set by one of:
func (*Command) UnsetRmCacheDir ¶
UnsetRmCacheDir unsets any flags that were previously set by one of:
func (*Command) UnsetSimulate ¶
UnsetSimulate unsets any flags that were previously set by one of:
func (*Command) UnsetSkipDownload ¶
UnsetSkipDownload unsets any flags that were previously set by one of:
func (*Command) UnsetSkipPlaylistAfterErrors ¶
UnsetSkipPlaylistAfterErrors unsets any flags that were previously set by one of:
func (*Command) UnsetSkipUnavailableFragments ¶
UnsetSkipUnavailableFragments unsets any flags that were previously set by one of:
func (*Command) UnsetSleepInterval ¶
UnsetSleepInterval unsets any flags that were previously set by one of:
func (*Command) UnsetSleepRequests ¶
UnsetSleepRequests unsets any flags that were previously set by one of:
func (*Command) UnsetSleepSubtitles ¶
UnsetSleepSubtitles unsets any flags that were previously set by one of:
func (*Command) UnsetSocketTimeout ¶
UnsetSocketTimeout unsets any flags that were previously set by one of:
func (*Command) UnsetSourceAddress ¶
UnsetSourceAddress unsets any flags that were previously set by one of:
func (*Command) UnsetSplitChapters ¶
UnsetSplitChapters unsets any flags that were previously set by one of:
func (*Command) UnsetSponsorblock ¶
UnsetSponsorblock unsets any flags that were previously set by one of:
func (*Command) UnsetSponsorblockAPI ¶
UnsetSponsorblockAPI unsets any flags that were previously set by one of:
func (*Command) UnsetSponsorblockChapterTitle ¶
UnsetSponsorblockChapterTitle unsets any flags that were previously set by one of:
func (*Command) UnsetSponsorblockMark ¶
UnsetSponsorblockMark unsets any flags that were previously set by one of:
func (*Command) UnsetSponsorblockRemove ¶
UnsetSponsorblockRemove unsets any flags that were previously set by one of:
func (*Command) UnsetSubFormat ¶
UnsetSubFormat unsets any flags that were previously set by one of:
func (*Command) UnsetSubLangs ¶
UnsetSubLangs unsets any flags that were previously set by one of:
func (*Command) UnsetThrottledRate ¶
UnsetThrottledRate unsets any flags that were previously set by one of:
func (*Command) UnsetTrimFilenames ¶
UnsetTrimFilenames unsets any flags that were previously set by one of:
func (*Command) UnsetTwoFactor ¶
UnsetTwoFactor unsets any flags that were previously set by one of:
func (*Command) UnsetUpdate ¶
UnsetUpdate unsets any flags that were previously set by one of:
func (*Command) UnsetUseExtractors ¶
UnsetUseExtractors unsets any flags that were previously set by one of:
func (*Command) UnsetUsePostProcessor ¶
UnsetUsePostProcessor unsets any flags that were previously set by one of:
func (*Command) UnsetUserAgent
deprecated
UnsetUserAgent unsets any flags that were previously set by one of:
Deprecated: Use Command.AddHeaders instead (e.g. `User-Agent:UA`).
func (*Command) UnsetUsername ¶
UnsetUsername unsets any flags that were previously set by one of:
func (*Command) UnsetVerbose ¶
UnsetVerbose unsets any flags that were previously set by one of:
func (*Command) UnsetVideoMultistreams ¶
UnsetVideoMultistreams unsets any flags that were previously set by one of:
func (*Command) UnsetVideoPassword ¶
UnsetVideoPassword unsets any flags that were previously set by one of:
func (*Command) UnsetWaitForVideo ¶
UnsetWaitForVideo unsets any flags that were previously set by one of:
func (*Command) UnsetWarnings ¶
UnsetWarnings unsets any flags that were previously set by one of:
func (*Command) UnsetWindowsFilenames ¶
UnsetWindowsFilenames unsets any flags that were previously set by one of:
func (*Command) UnsetWriteAllThumbnails ¶
UnsetWriteAllThumbnails unsets any flags that were previously set by one of:
func (*Command) UnsetWriteAutoSubs ¶
UnsetWriteAutoSubs unsets any flags that were previously set by one of:
func (*Command) UnsetWriteComments ¶
UnsetWriteComments unsets any flags that were previously set by one of:
func (*Command) UnsetWriteDescription ¶
UnsetWriteDescription unsets any flags that were previously set by one of:
func (*Command) UnsetWriteDesktopLink ¶
UnsetWriteDesktopLink unsets any flags that were previously set by one of:
func (*Command) UnsetWriteInfoJSON ¶
UnsetWriteInfoJSON unsets any flags that were previously set by one of:
func (*Command) UnsetWriteLink ¶
UnsetWriteLink unsets any flags that were previously set by one of:
func (*Command) UnsetWritePages ¶
UnsetWritePages unsets any flags that were previously set by one of:
func (*Command) UnsetWritePlaylistMetafiles ¶
UnsetWritePlaylistMetafiles unsets any flags that were previously set by one of:
func (*Command) UnsetWriteSubs ¶
UnsetWriteSubs unsets any flags that were previously set by one of:
func (*Command) UnsetWriteThumbnail ¶
UnsetWriteThumbnail unsets any flags that were previously set by one of:
func (*Command) UnsetWriteURLLink ¶
UnsetWriteURLLink unsets any flags that were previously set by one of:
func (*Command) UnsetWriteWeblocLink ¶
UnsetWriteWeblocLink unsets any flags that were previously set by one of:
func (*Command) UnsetXattrs ¶
UnsetXattrs unsets any flags that were previously set by one of:
func (*Command) Update ¶
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 ¶
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 ¶
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 ¶
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
deprecated
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"
Deprecated: Use Command.AddHeaders instead (e.g. `User-Agent:UA`).
func (*Command) Username ¶
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 ¶
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 ¶
Print program version and exit
Additional information:
- Version maps to cli flags: --version.
- From option group: "General"
func (*Command) VideoMultistreams ¶
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 ¶
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 ¶
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 ¶
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 ¶
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) WriteAutoSubs ¶
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 ¶
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 ¶
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 (*Command) WriteDesktopLink ¶
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 ¶
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 (*Command) WriteLink ¶
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 ¶
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 ¶
Write playlist metadata in addition to the video metadata when using --write-info-json, --write-description etc. (default)
Additional information:
- See Command.UnsetWritePlaylistMetafiles, for unsetting the flag.
- WritePlaylistMetafiles maps to cli flags: --write-playlist-metafiles.
- From option group: "Filesystem"
func (*Command) WriteSubs ¶
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 ¶
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 (*Command) WriteURLLink ¶
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 (*Command) WriteWeblocLink ¶
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 ¶
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) Xattrs ¶
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 ¶
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"
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 IsExitCodeError ¶
func IsExitCodeError(err error) (*ErrExitCode, bool)
IsExitCodeError returns true 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 ErrJSONParsingFlag ¶
type ErrJSONParsingFlag struct {
ID string `json:"id,omitempty"`
JSONPath string `json:"json_path,omitempty"`
Flag string `json:"flag,omitempty"`
Err error `json:"error,omitempty"`
}
func IsJSONParsingFlagError ¶
func IsJSONParsingFlagError(err error) (*ErrJSONParsingFlag, bool)
IsJSONParsingFlagError returns true when the error is a JSON parsing error.
func (*ErrJSONParsingFlag) Error ¶
func (e *ErrJSONParsingFlag) Error() string
func (*ErrJSONParsingFlag) Unwrap ¶
func (e *ErrJSONParsingFlag) 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 IsMisconfigError ¶
func IsMisconfigError(err error) (*ErrMisconfig, bool)
IsMisconfigError returns true 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 ErrMultipleJSONParsingFlags ¶
type ErrMultipleJSONParsingFlags struct {
Errors []*ErrJSONParsingFlag `json:"errors,omitempty"`
}
func IsMultipleJSONParsingFlagsError ¶
func IsMultipleJSONParsingFlagsError(err error) (*ErrMultipleJSONParsingFlags, bool)
func (*ErrMultipleJSONParsingFlags) Error ¶
func (e *ErrMultipleJSONParsingFlags) Error() string
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 IsParsingError ¶
func IsParsingError(err error) (*ErrParsing, 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 (*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 IsUnknownError ¶
func IsUnknownError(err error) (*ErrUnknown, bool)
IsUnknownError returns true 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 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".
AllowsMultiple bool `json:"allows_multiple"` // If the flag allows multiple values.
Args []any `json:"args"` // Optional args. If nil, it's a boolean flag.
}
type FlagConfig ¶
type FlagConfig struct {
General FlagsGeneral `json:"general,omitempty,omitzero" jsonschema:"title=Group General"`
Network FlagsNetwork `json:"network,omitempty,omitzero" jsonschema:"title=Group Network"`
GeoRestriction FlagsGeoRestriction `json:"geo_restriction,omitempty,omitzero" jsonschema:"title=Group GeoRestriction"`
VideoSelection FlagsVideoSelection `json:"video_selection,omitempty,omitzero" jsonschema:"title=Group VideoSelection"`
Download FlagsDownload `json:"download,omitempty,omitzero" jsonschema:"title=Group Download"`
Filesystem FlagsFilesystem `json:"filesystem,omitempty,omitzero" jsonschema:"title=Group Filesystem"`
Thumbnail FlagsThumbnail `json:"thumbnail,omitempty,omitzero" jsonschema:"title=Group Thumbnail"`
InternetShortcut FlagsInternetShortcut `json:"internet_shortcut,omitempty,omitzero" jsonschema:"title=Group InternetShortcut"`
VerbositySimulation FlagsVerbositySimulation `json:"verbosity_simulation,omitempty,omitzero" jsonschema:"title=Group VerbositySimulation"`
Workarounds FlagsWorkarounds `json:"workarounds,omitempty,omitzero" jsonschema:"title=Group Workarounds"`
VideoFormat FlagsVideoFormat `json:"video_format,omitempty,omitzero" jsonschema:"title=Group VideoFormat"`
Subtitle FlagsSubtitle `json:"subtitle,omitempty,omitzero" jsonschema:"title=Group Subtitle"`
Authentication FlagsAuthentication `json:"authentication,omitempty,omitzero" jsonschema:"title=Group Authentication"`
PostProcessing FlagsPostProcessing `json:"post_processing,omitempty,omitzero" jsonschema:"title=Group PostProcessing"`
SponsorBlock FlagsSponsorBlock `json:"sponsor_block,omitempty,omitzero" jsonschema:"title=Group SponsorBlock"`
Extractor FlagsExtractor `json:"extractor,omitempty,omitzero" jsonschema:"title=Group Extractor"`
}
FlagConfig holds all information for the flags in which to use for yt-dlp. Note that you can technically set multiple conflicting flags through this type, however, when the FlagConfig.Validate method is called, it will return a ErrMultipleJSONParsingFlags error if there are any conflicts.
func (*FlagConfig) Clone ¶
func (f *FlagConfig) Clone() *FlagConfig
Clone returns a copy of the flag config.
func (*FlagConfig) ToFlags ¶
func (f *FlagConfig) ToFlags() (flags Flags)
func (*FlagConfig) Validate ¶
func (f *FlagConfig) Validate() error
Validate runs validation across all flag groups. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error. Otherwise, any other errors will be returned as a regular wrapped errors.
type FlagPrintToFile ¶
type FlagReplaceInMetadata ¶
type FlagsAuthentication ¶
type FlagsAuthentication struct {
// Login with this account ID
Username *string `` /* 152-byte string literal not displayed */
// Account password. If this option is left out, yt-dlp will ask interactively
Password *string `` /* 201-byte string literal not displayed */
// Two-factor authentication code
TwoFactor *string `` /* 160-byte string literal not displayed */
// Use .netrc authentication data
Netrc *bool `` /* 150-byte string literal not displayed */
// Location of .netrc authentication data; either the path or its containing directory.
// Defaults to ~/.netrc
NetrcLocation *string `` /* 254-byte string literal not displayed */
// Command to execute to get the credentials for an extractor.
NetrcCmd *string `` /* 188-byte string literal not displayed */
// Video-specific password
VideoPassword *string `` /* 170-byte string literal not displayed */
// Adobe Pass multiple-system operator (TV provider) identifier, use --ap-list-mso for a list
// of available MSOs
ApMSO *string `` /* 225-byte string literal not displayed */
// Multiple-system operator account login
ApUsername *string `` /* 175-byte string literal not displayed */
// Multiple-system operator account password. If this option is left out, yt-dlp will ask
// interactively
ApPassword *string `` /* 237-byte string literal not displayed */
// List all supported multiple-system operators
ApListMSO *bool `` /* 180-byte string literal not displayed */
// Path to client certificate file in PEM format. May include the private key
ClientCertificate *string `` /* 239-byte string literal not displayed */
// Path to private key file for client certificate
ClientCertificateKey *string `` /* 227-byte string literal not displayed */
// Password for client certificate private key, if encrypted. If not provided, and the key is
// encrypted, yt-dlp will ask interactively
ClientCertificatePassword *string `` /* 331-byte string literal not displayed */
}
func (*FlagsAuthentication) ToFlags ¶
func (g *FlagsAuthentication) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsAuthentication.Validate should be called first.
func (*FlagsAuthentication) Validate ¶
func (g *FlagsAuthentication) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsDownload ¶
type FlagsDownload struct {
// Number of fragments of a dash/hlsnative video that should be downloaded concurrently
// (default is 1)
ConcurrentFragments *int `` /* 290-byte string literal not displayed */
// Maximum download rate in bytes per second, e.g. 50K or 4.2M
LimitRate *string `` /* 190-byte string literal not displayed */
// Minimum download rate in bytes per second below which throttling is assumed and the video
// data is re-extracted, e.g. 100K
ThrottledRate *string `` /* 278-byte string literal not displayed */
// Number of retries (default is 10), or "infinite"
Retries *string `` /* 172-byte string literal not displayed */
// Number of times to retry on file access error (default is 3), or "infinite"
FileAccessRetries *string `` /* 245-byte string literal not displayed */
// Number of retries for a fragment (default is 10), or "infinite" (DASH, hlsnative and ISM)
FragmentRetries *string `` /* 248-byte string literal not displayed */
// 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
RetrySleep []string `` /* 523-byte string literal not displayed */
SkipUnavailableFragments *bool `` /* 270-byte string literal not displayed */
AbortOnUnavailableFragments *bool `` /* 246-byte string literal not displayed */
// Keep downloaded fragments on disk after downloading is finished
KeepFragments *bool `` /* 212-byte string literal not displayed */
// Delete downloaded fragments after downloading is finished (default)
NoKeepFragments *bool `` /* 221-byte string literal not displayed */
// Size of download buffer, e.g. 1024 or 16K (default is 1024)
BufferSize *string `` /* 194-byte string literal not displayed */
// The buffer size is automatically resized from an initial value of --buffer-size (default)
ResizeBuffer *bool `` /* 236-byte string literal not displayed */
// Do not automatically adjust the buffer size
NoResizeBuffer *bool `` /* 195-byte string literal not displayed */
// 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)
HTTPChunkSize *string `` /* 332-byte string literal not displayed */
PlaylistReverse *bool `` /* 157-byte string literal not displayed */
NoPlaylistReverse *bool `` /* 162-byte string literal not displayed */
// Download playlist videos in random order
PlaylistRandom *bool `` /* 193-byte string literal not displayed */
// Process entries in the playlist as they are received. This disables n_entries,
// --playlist-random and --playlist-reverse
LazyPlaylist *bool `` /* 264-byte string literal not displayed */
// Process videos in the playlist only after the entire playlist is parsed (default)
NoLazyPlaylist *bool `` /* 231-byte string literal not displayed */
HLSPreferNative *bool `` /* 160-byte string literal not displayed */
HLSPreferFFmpeg *bool `` /* 160-byte string literal not displayed */
// 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
HLSUseMPEGTS *bool `` /* 362-byte string literal not displayed */
// Do not use the mpegts container for HLS videos. This is default when not downloading live
// streams
NoHLSUseMPEGTS *bool `` /* 250-byte string literal not displayed */
// 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"
DownloadSections []string `` /* 577-byte string literal not displayed */
// 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,
// 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
Downloader []string `` /* 604-byte string literal not displayed */
// 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
DownloaderArgs []string `` /* 491-byte string literal not displayed */
}
func (*FlagsDownload) ToFlags ¶
func (g *FlagsDownload) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsDownload.Validate should be called first.
func (*FlagsDownload) Validate ¶
func (g *FlagsDownload) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsExtractor ¶
type FlagsExtractor struct {
// Number of retries for known extractor errors (default is 3), or "infinite"
ExtractorRetries *string `` /* 237-byte string literal not displayed */
// Process dynamic DASH manifests (default)
AllowDynamicMPD *bool `` /* 188-byte string literal not displayed */
// Do not process dynamic DASH manifests
IgnoreDynamicMPD *bool `` /* 187-byte string literal not displayed */
// Split HLS playlists to different formats at discontinuities such as ad breaks
HLSSplitDiscontinuity *bool `` /* 261-byte string literal not displayed */
// Do not split HLS playlists into different formats at discontinuities such as ad breaks
// (default)
NoHLSSplitDiscontinuity *bool `` /* 285-byte string literal not displayed */
// 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
ExtractorArgs []string `` /* 316-byte string literal not displayed */
}
func (*FlagsExtractor) ToFlags ¶
func (g *FlagsExtractor) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsExtractor.Validate should be called first.
func (*FlagsExtractor) Validate ¶
func (g *FlagsExtractor) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsFilesystem ¶
type FlagsFilesystem struct {
// File containing URLs to download ("-" for stdin), one URL per line. Lines starting with
// "#", ";" or "]" are considered as comments and ignored
BatchFile *string `` /* 281-byte string literal not displayed */
// Do not read URLs from batch file (default)
NoBatchFile *bool `` /* 178-byte string literal not displayed */
ID *bool `json:"id,omitempty" id:"useid" jsonschema:"title=ID" jsonschema_extras:"uid=useid" jsonschema_description:""`
// 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
Paths *string `` /* 548-byte string literal not displayed */
// Output filename template; see "OUTPUT TEMPLATE" for details
Output *string `` /* 181-byte string literal not displayed */
// Placeholder for unavailable fields in --output (default: "NA")
OutputNaPlaceholder *string `` /* 242-byte string literal not displayed */
AutoNumberSize *int `` /* 153-byte string literal not displayed */
AutoNumberStart *int `` /* 157-byte string literal not displayed */
// Restrict filenames to only ASCII characters, and avoid "&" and spaces in filenames
RestrictFilenames *bool `` /* 247-byte string literal not displayed */
// Allow Unicode characters, "&" and spaces in filenames (default)
NoRestrictFilenames *bool `` /* 233-byte string literal not displayed */
// Force filenames to be Windows-compatible
WindowsFilenames *bool `` /* 199-byte string literal not displayed */
// Sanitize filenames only minimally
NoWindowsFilenames *bool `` /* 197-byte string literal not displayed */
// Limit the filename length (excluding extension) to the specified number of characters
TrimFilenames *int `` /* 234-byte string literal not displayed */
// Do not overwrite any files
NoOverwrites *bool `` /* 165-byte string literal not displayed */
// Overwrite all video and metadata files. This option includes --no-continue
ForceOverwrites *bool `` /* 219-byte string literal not displayed */
// Do not overwrite the video, but overwrite related files (default)
NoForceOverwrites *bool `` /* 215-byte string literal not displayed */
// Resume partially downloaded files/fragments (default)
Continue *bool `` /* 185-byte string literal not displayed */
// Do not resume partially downloaded fragments. If the file is not fragmented, restart
// download of the entire file
NoContinue *bool `` /* 249-byte string literal not displayed */
// Use .part files instead of writing directly into output file (default)
Part *bool `` /* 184-byte string literal not displayed */
// Do not use .part files - write directly into output file
NoPart *bool `` /* 175-byte string literal not displayed */
// Use the Last-modified header to set the file modification time
Mtime *bool `` /* 186-byte string literal not displayed */
// Do not use the Last-modified header to set the file modification time (default)
NoMtime *bool `` /* 208-byte string literal not displayed */
// Write video description to a .description file
WriteDescription *bool `` /* 205-byte string literal not displayed */
// Do not write video description (default)
NoWriteDescription *bool `` /* 204-byte string literal not displayed */
// Write video metadata to a .info.json file (this may contain personal information)
WriteInfoJSON *bool `` /* 229-byte string literal not displayed */
// Do not write video metadata (default)
NoWriteInfoJSON *bool `` /* 190-byte string literal not displayed */
// Write playlist metadata in addition to the video metadata when using --write-info-json,
// --write-description etc. (default)
WritePlaylistMetafiles *bool `` /* 302-byte string literal not displayed */
// Do not write playlist metadata when using --write-info-json, --write-description etc.
NoWritePlaylistMetafiles *bool `` /* 270-byte string literal not displayed */
// Remove some internal metadata such as filenames from the infojson (default)
CleanInfoJSON *bool `` /* 225-byte string literal not displayed */
// Write all fields to the infojson
NoCleanInfoJSON *bool `` /* 187-byte string literal not displayed */
// 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
WriteComments *bool `` /* 285-byte string literal not displayed */
// Do not retrieve video comments unless the extraction is known to be quick
NoWriteComments *bool `` /* 221-byte string literal not displayed */
// JSON file containing the video information (created with the "--write-info-json" option)
LoadInfoJSON *string `` /* 246-byte string literal not displayed */
// Netscape formatted file to read cookies from and dump cookie jar in
Cookies *string `` /* 195-byte string literal not displayed */
// Do not read/dump cookies from/to file (default)
NoCookies *bool `` /* 180-byte string literal not displayed */
// 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
CookiesFromBrowser *string `` /* 713-byte string literal not displayed */
// Do not load cookies from browser (default)
NoCookiesFromBrowser *bool `` /* 215-byte string literal not displayed */
// 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
CacheDir *string `` /* 289-byte string literal not displayed */
// Disable filesystem caching
NoCacheDir *bool `` /* 158-byte string literal not displayed */
// Delete all filesystem cache files
RmCacheDir *bool `` /* 171-byte string literal not displayed */
}
func (*FlagsFilesystem) ToFlags ¶
func (g *FlagsFilesystem) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsFilesystem.Validate should be called first.
func (*FlagsFilesystem) Validate ¶
func (g *FlagsFilesystem) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsGeneral ¶
type FlagsGeneral struct {
// Do not check for updates (default)
NoUpdate *bool `` /* 167-byte string literal not displayed */
// Ignore download and postprocessing errors. The download will be considered successful even
// if the postprocessing fails
IgnoreErrors *bool `` /* 261-byte string literal not displayed */
// Continue with next video on download errors; e.g. to skip unavailable videos in a playlist
// (default)
NoAbortOnError *bool `` /* 249-byte string literal not displayed */
// Abort downloading of further videos if an error occurs
AbortOnError *bool `` /* 198-byte string literal not displayed */
// 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.
UseExtractors *string `` /* 443-byte string literal not displayed */
ForceGenericExtractor *bool `` /* 184-byte string literal not displayed */
// 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
DefaultSearch *string `` /* 530-byte string literal not displayed */
// 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.
IgnoreConfig *bool `` /* 352-byte string literal not displayed */
// Do not load any custom configuration files (default). When given inside a configuration
// file, ignore all previous --config-locations defined in the current file
NoConfigLocations *bool `` /* 322-byte string literal not displayed */
// 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
ConfigLocations []string `` /* 338-byte string literal not displayed */
// Path to an additional directory to search for plugins. This option can be used multiple
// times to add multiple directories. Use "default" to search the default plugin directories
// (default)
PluginDirs []string `` /* 326-byte string literal not displayed */
// Clear plugin directories to search, including defaults and those provided by previous
// --plugin-dirs
NoPluginDirs *bool `` /* 241-byte string literal not displayed */
// Additional JavaScript runtime to enable, with an optional location for the runtime (either
// the path to the binary or its containing directory). This option can be used multiple
// times to enable multiple runtimes. Supported runtimes are (in order of priority, from
// highest to lowest): deno, node, quickjs, bun. Only "deno" is enabled by default. The
// highest priority runtime that is both enabled and available will be used. In order to use
// a lower priority runtime when "deno" is available, --no-js-runtimes needs to be passed
// before enabling other runtimes
JsRuntimes []string `` /* 696-byte string literal not displayed */
// Clear JavaScript runtimes to enable, including defaults and those provided by previous
// --js-runtimes
NoJsRuntimes *bool `` /* 242-byte string literal not displayed */
// Remote components to allow yt-dlp to fetch when required. This option is currently not
// needed if you are using an official executable or have the requisite version of the
// yt-dlp-ejs package installed. You can use this option multiple times to allow multiple
// components. Supported values: ejs:npm (external JavaScript components from npm),
// ejs:github (external JavaScript components from yt-dlp-ejs GitHub). By default, no remote
// components are allowed
RemoteComponents []string `` /* 612-byte string literal not displayed */
// Disallow fetching of all remote components, including any previously allowed by
// --remote-components or defaults.
NoRemoteComponents *bool `` /* 278-byte string literal not displayed */
// Do not extract a playlist's URL result entries; some entry metadata may be missing and
// downloading may be bypassed
FlatPlaylist *bool `` /* 257-byte string literal not displayed */
// Fully extract the videos of a playlist (default)
NoFlatPlaylist *bool `` /* 196-byte string literal not displayed */
// Download livestreams from the start. Currently experimental and only supported for YouTube
// and Twitch
LiveFromStart *bool `` /* 253-byte string literal not displayed */
// Download livestreams from the current time (default)
NoLiveFromStart *bool `` /* 209-byte string literal not displayed */
// Wait for scheduled streams to become available. Pass the minimum number of seconds (or
// range) to wait between retries
WaitForVideo *string `` /* 265-byte string literal not displayed */
// Do not wait for scheduled streams (default)
NoWaitForVideo *bool `` /* 196-byte string literal not displayed */
// Mark videos watched (even with --simulate)
MarkWatched *bool `` /* 183-byte string literal not displayed */
// Do not mark videos watched (default)
NoMarkWatched *bool `` /* 182-byte string literal not displayed */
NoColors *bool `json:"no_colors,omitempty" id:"color" jsonschema:"title=NoColors" jsonschema_extras:"uid=color" jsonschema_description:""`
// 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
Color []string `` /* 445-byte string literal not displayed */
// 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
CompatOptions *string `` /* 330-byte string literal not displayed */
// Applies a predefined set of options. e.g. --preset-alias mp3. The following presets are
// available: mp3, aac, mp4, mkv, sleep. See the "Preset Aliases" section at the end for more
// info. This option can be used multiple times
PresetAlias []string `` /* 366-byte string literal not displayed */
}
func (*FlagsGeneral) ToFlags ¶
func (g *FlagsGeneral) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsGeneral.Validate should be called first.
func (*FlagsGeneral) Validate ¶
func (g *FlagsGeneral) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsGeoRestriction ¶
type FlagsGeoRestriction struct {
// 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
GeoVerificationProxy *string `` /* 364-byte string literal not displayed */
// 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
XFF *string `` /* 332-byte string literal not displayed */
GeoBypass *bool `` /* 133-byte string literal not displayed */
NoGeoBypass *bool `` /* 138-byte string literal not displayed */
GeoBypassCountry *string `` /* 148-byte string literal not displayed */
GeoBypassIPBlock *string `` /* 149-byte string literal not displayed */
}
func (*FlagsGeoRestriction) ToFlags ¶
func (g *FlagsGeoRestriction) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsGeoRestriction.Validate should be called first.
func (*FlagsGeoRestriction) Validate ¶
func (g *FlagsGeoRestriction) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsInternetShortcut ¶
type FlagsInternetShortcut struct {
// Write an internet shortcut file, depending on the current platform (.url, .webloc or
// .desktop). The URL may be cached by the OS
WriteLink *bool `` /* 258-byte string literal not displayed */
// Write a .url Windows internet shortcut. The OS caches the URL based on the file path
WriteURLLink *bool `` /* 228-byte string literal not displayed */
// Write a .webloc macOS internet shortcut
WriteWeblocLink *bool `` /* 195-byte string literal not displayed */
// Write a .desktop Linux internet shortcut
WriteDesktopLink *bool `` /* 200-byte string literal not displayed */
}
func (*FlagsInternetShortcut) ToFlags ¶
func (g *FlagsInternetShortcut) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsInternetShortcut.Validate should be called first.
func (*FlagsInternetShortcut) Validate ¶
func (g *FlagsInternetShortcut) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsNetwork ¶
type FlagsNetwork struct {
// 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
Proxy *string `` /* 305-byte string literal not displayed */
// Time to wait before giving up, in seconds
SocketTimeout *float64 `` /* 190-byte string literal not displayed */
// Client-side IP address to bind to
SourceAddress *string `` /* 182-byte string literal not displayed */
// 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
Impersonate *string `` /* 379-byte string literal not displayed */
// List available clients to impersonate.
ListImpersonateTargets *bool `` /* 226-byte string literal not displayed */
// Make all connections via IPv4
ForceIPv4 *bool `` /* 171-byte string literal not displayed */
// Make all connections via IPv6
ForceIPv6 *bool `` /* 171-byte string literal not displayed */
// Enable file:// URLs. This is disabled by default for security reasons.
EnableFileURLs *bool `` /* 226-byte string literal not displayed */
}
func (*FlagsNetwork) ToFlags ¶
func (g *FlagsNetwork) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsNetwork.Validate should be called first.
func (*FlagsNetwork) Validate ¶
func (g *FlagsNetwork) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsPostProcessing ¶
type FlagsPostProcessing struct {
// Convert video files to audio-only files (requires ffmpeg and ffprobe)
ExtractAudio *bool `` /* 212-byte string literal not displayed */
// 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
AudioFormat *string `` /* 340-byte string literal not displayed */
// 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)
AudioQuality *string `` /* 312-byte string literal not displayed */
// 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
RemuxVideo *string `` /* 511-byte string literal not displayed */
// Re-encode the video into another format if necessary. The syntax and supported formats are
// the same as --remux-video
RecodeVideo *string `` /* 255-byte string literal not displayed */
// 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.
PostProcessorArgs []string `` /* 1128-byte string literal not displayed */
// Keep the intermediate video file on disk after post-processing
KeepVideo *bool `` /* 193-byte string literal not displayed */
// Delete the intermediate video file after post-processing (default)
NoKeepVideo *bool `` /* 202-byte string literal not displayed */
// Overwrite post-processed files (default)
PostOverwrites *bool `` /* 195-byte string literal not displayed */
// Do not overwrite post-processed files
NoPostOverwrites *bool `` /* 197-byte string literal not displayed */
// Embed subtitles in the video (only for mp4, webm and mkv videos)
EmbedSubs *bool `` /* 205-byte string literal not displayed */
// Do not embed subtitles (default)
NoEmbedSubs *bool `` /* 178-byte string literal not displayed */
// Embed thumbnail in the video as cover art
EmbedThumbnail *bool `` /* 192-byte string literal not displayed */
// Do not embed thumbnail (default)
NoEmbedThumbnail *bool `` /* 188-byte string literal not displayed */
// Embed metadata to the video file. Also embeds chapters/infojson if present unless
// --no-embed-chapters/--no-embed-info-json are used
EmbedMetadata *bool `` /* 274-byte string literal not displayed */
// Do not add metadata to file (default)
NoEmbedMetadata *bool `` /* 185-byte string literal not displayed */
// Add chapter markers to the video file
EmbedChapters *bool `` /* 180-byte string literal not displayed */
// Do not add chapter markers (default)
NoEmbedChapters *bool `` /* 184-byte string literal not displayed */
// Embed the infojson as an attachment to mkv/mka video files
EmbedInfoJSON *bool `` /* 208-byte string literal not displayed */
// Do not embed the infojson as an attachment to the video file
NoEmbedInfoJSON *bool `` /* 215-byte string literal not displayed */
MetadataFromTitle *string `` /* 156-byte string literal not displayed */
// 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)
ParseMetadata *string `` /* 347-byte string literal not displayed */
// 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)
ReplaceInMetadata []*FlagReplaceInMetadata `` /* 349-byte string literal not displayed */
// Write metadata to the video file's xattrs (using Dublin Core and XDG standards)
Xattrs *bool `` /* 197-byte string literal not displayed */
// 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
ConcatPlaylist *ConcatPlaylistOption `` /* 577-byte string literal not displayed */
// 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)
Fixup *FixupOption `` /* 401-byte string literal not displayed */
// Location of the ffmpeg binary; either the path to the binary or its containing directory
FFmpegLocation *string `` /* 241-byte string literal not displayed */
// 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
Exec []string `` /* 524-byte string literal not displayed */
// Remove any previously defined --exec
NoExec *bool `` /* 159-byte string literal not displayed */
ExecBeforeDownload *string `` /* 168-byte string literal not displayed */
NoExecBeforeDownload *bool `` /* 173-byte string literal not displayed */
// Convert the subtitles to another format (currently supported: ass, lrc, srt, vtt). Use
// "--convert-subs none" to disable conversion (default)
ConvertSubs *string `` /* 291-byte string literal not displayed */
// 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)
ConvertThumbnails *string `` /* 382-byte string literal not displayed */
// 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
SplitChapters *bool `` /* 362-byte string literal not displayed */
// Do not split video based on chapters (default)
NoSplitChapters *bool `` /* 200-byte string literal not displayed */
// Remove chapters whose title matches the given regular expression. The syntax is the same
// as --download-sections. This option can be used multiple times
RemoveChapters []string `` /* 304-byte string literal not displayed */
// Do not remove any chapters from the file (default)
NoRemoveChapters *bool `` /* 208-byte string literal not displayed */
// 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
ForceKeyframesAtCuts *bool `` /* 358-byte string literal not displayed */
// Do not force keyframes around the chapters when cutting/splitting (default)
NoForceKeyframesAtCuts *bool `` /* 263-byte string literal not displayed */
// 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
UsePostProcessor []string `` /* 937-byte string literal not displayed */
}
func (*FlagsPostProcessing) ToFlags ¶
func (g *FlagsPostProcessing) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsPostProcessing.Validate should be called first.
func (*FlagsPostProcessing) Validate ¶
func (g *FlagsPostProcessing) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsSponsorBlock ¶
type FlagsSponsorBlock struct {
// SponsorBlock categories to create chapters for, separated by commas. Available categories
// are sponsor, intro, outro, selfpromo, preview, filler, interaction, music_offtopic, hook,
// 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
SponsorblockMark *string `` /* 581-byte string literal not displayed */
// 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
SponsorblockRemove *string `` /* 494-byte string literal not displayed */
// 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"
SponsorblockChapterTitle *string `` /* 436-byte string literal not displayed */
// Disable both --sponsorblock-mark and --sponsorblock-remove
NoSponsorblock *bool `` /* 211-byte string literal not displayed */
// SponsorBlock API location, defaults to https://sponsor.ajay.app
SponsorblockAPI *string `` /* 220-byte string literal not displayed */
}
func (*FlagsSponsorBlock) ToFlags ¶
func (g *FlagsSponsorBlock) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsSponsorBlock.Validate should be called first.
func (*FlagsSponsorBlock) Validate ¶
func (g *FlagsSponsorBlock) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsSubtitle ¶
type FlagsSubtitle struct {
// Write subtitle file
WriteSubs *bool `` /* 160-byte string literal not displayed */
// Do not write subtitle file (default)
NoWriteSubs *bool `` /* 182-byte string literal not displayed */
// Write automatically generated subtitle file
WriteAutoSubs *bool `` /* 199-byte string literal not displayed */
// Do not write auto-generated subtitles (default)
NoWriteAutoSubs *bool `` /* 208-byte string literal not displayed */
AllSubs *bool `` /* 133-byte string literal not displayed */
// List available subtitles of each video. Simulate unless --no-simulate is used
ListSubs *bool `` /* 214-byte string literal not displayed */
// Subtitle format; accepts formats preference separated by "/", e.g. "srt" or "ass/srt/best"
SubFormat *string `` /* 239-byte string literal not displayed */
// 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
SubLangs *string `` /* 526-byte string literal not displayed */
}
func (*FlagsSubtitle) ToFlags ¶
func (g *FlagsSubtitle) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsSubtitle.Validate should be called first.
func (*FlagsSubtitle) Validate ¶
func (g *FlagsSubtitle) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsThumbnail ¶
type FlagsThumbnail struct {
// Write thumbnail image to disk
WriteThumbnail *bool `` /* 180-byte string literal not displayed */
// Do not write thumbnail image to disk (default)
NoWriteThumbnail *bool `` /* 202-byte string literal not displayed */
// Write all thumbnail image formats to disk
WriteAllThumbnails *bool `` /* 201-byte string literal not displayed */
// List available thumbnails of each video. Simulate unless --no-simulate is used
ListThumbnails *bool `` /* 231-byte string literal not displayed */
}
func (*FlagsThumbnail) ToFlags ¶
func (g *FlagsThumbnail) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsThumbnail.Validate should be called first.
func (*FlagsThumbnail) Validate ¶
func (g *FlagsThumbnail) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsVerbositySimulation ¶
type FlagsVerbositySimulation struct {
// Activate quiet mode. If used with --verbose, print the log to stderr
Quiet *bool `` /* 182-byte string literal not displayed */
// Deactivate quiet mode. (Default)
NoQuiet *bool `` /* 151-byte string literal not displayed */
// Ignore warnings
NoWarnings *bool `` /* 152-byte string literal not displayed */
// Do not download the video and do not write anything to disk
Simulate *bool `` /* 185-byte string literal not displayed */
// Download the video even if printing/listing options are used
NoSimulate *bool `` /* 191-byte string literal not displayed */
// Ignore "No video formats" error. Useful for extracting metadata even if the videos are not
// actually available for download (experimental)
IgnoreNoFormatsError *bool `` /* 322-byte string literal not displayed */
// Throw error when no downloadable video formats are found (default)
NoIgnoreNoFormatsError *bool `` /* 254-byte string literal not displayed */
// Do not download the video but write all related files
SkipDownload *bool `` /* 198-byte string literal not displayed */
// 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
Print []string `` /* 459-byte string literal not displayed */
// 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
PrintToFile []*FlagPrintToFile `` /* 332-byte string literal not displayed */
GetURL *bool `json:"get_url,omitempty" id:"geturl" jsonschema:"title=GetURL" jsonschema_extras:"uid=geturl" jsonschema_description:""`
GetTitle *bool `` /* 127-byte string literal not displayed */
GetID *bool `json:"get_id,omitempty" id:"getid" jsonschema:"title=GetID" jsonschema_extras:"uid=getid" jsonschema_description:""`
GetThumbnail *bool `` /* 143-byte string literal not displayed */
GetDescription *bool `` /* 151-byte string literal not displayed */
GetDuration *bool `` /* 139-byte string literal not displayed */
GetFilename *bool `` /* 139-byte string literal not displayed */
GetFormat *bool `` /* 131-byte string literal not displayed */
// Quiet, but print JSON information for each video. Simulate unless --no-simulate is used.
// See "OUTPUT TEMPLATE" for a description of available keys
DumpJSON *bool `` /* 275-byte string literal not displayed */
// 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
DumpSingleJSON *bool `` /* 352-byte string literal not displayed */
PrintJSON *bool `` /* 133-byte string literal not displayed */
// Force download archive entries to be written as far as no errors occur, even if -s or
// another simulation option is used
ForceWriteArchive *bool `` /* 305-byte string literal not displayed */
// Output progress bar as new lines
Newline *bool `` /* 182-byte string literal not displayed */
// Do not print progress bar
NoProgress *bool `` /* 160-byte string literal not displayed */
// Show progress bar, even if in quiet mode
Progress *bool `` /* 170-byte string literal not displayed */
// Display progress in console titlebar
ConsoleTitle *bool `` /* 179-byte string literal not displayed */
// 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"
ProgressTemplate *string `` /* 548-byte string literal not displayed */
// Time between progress output (default: 0)
ProgressDelta *float64 `` /* 190-byte string literal not displayed */
// Print various debugging information
Verbose *bool `` /* 157-byte string literal not displayed */
// Print downloaded pages encoded using base64 to debug problems (very verbose)
DumpPages *bool `` /* 235-byte string literal not displayed */
// Write downloaded intermediary pages to files in the current directory to debug problems
WritePages *bool `` /* 224-byte string literal not displayed */
// Display sent and read HTTP traffic
PrintTraffic *bool `` /* 189-byte string literal not displayed */
}
func (*FlagsVerbositySimulation) ToFlags ¶
func (g *FlagsVerbositySimulation) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsVerbositySimulation.Validate should be called first.
func (*FlagsVerbositySimulation) Validate ¶
func (g *FlagsVerbositySimulation) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsVideoFormat ¶
type FlagsVideoFormat struct {
// Video format code, see "FORMAT SELECTION" for more details
Format *string `` /* 178-byte string literal not displayed */
// Sort the formats by the fields given, see "Sorting Formats" for more details
FormatSort *string `` /* 215-byte string literal not displayed */
// Force user specified sort order to have precedence over all fields, see "Sorting Formats"
// for more details
FormatSortForce *bool `` /* 268-byte string literal not displayed */
// Some fields have precedence over the user specified sort order (default)
NoFormatSortForce *bool `` /* 237-byte string literal not displayed */
// Allow multiple video streams to be merged into a single file
VideoMultistreams *bool `` /* 245-byte string literal not displayed */
// Only one video stream is downloaded for each output file (default)
NoVideoMultistreams *bool `` /* 256-byte string literal not displayed */
// Allow multiple audio streams to be merged into a single file
AudioMultistreams *bool `` /* 245-byte string literal not displayed */
// Only one audio stream is downloaded for each output file (default)
NoAudioMultistreams *bool `` /* 256-byte string literal not displayed */
AllFormats *bool `` /* 127-byte string literal not displayed */
// 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
PreferFreeFormats *bool `` /* 328-byte string literal not displayed */
// Don't give any special preference to free containers (default)
NoPreferFreeFormats *bool `` /* 235-byte string literal not displayed */
// Make sure formats are selected only from those that are actually downloadable
CheckFormats *bool `` /* 222-byte string literal not displayed */
// Check all formats for whether they are actually downloadable
CheckAllFormats *bool `` /* 212-byte string literal not displayed */
// Do not check that the formats are actually downloadable
NoCheckFormats *bool `` /* 205-byte string literal not displayed */
// List available formats of each video. Simulate unless --no-simulate is used
ListFormats *bool `` /* 214-byte string literal not displayed */
ListFormatsAsTable *bool `` /* 167-byte string literal not displayed */
ListFormatsOld *bool `` /* 158-byte string literal not displayed */
// 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)
MergeOutputFormat *string `` /* 341-byte string literal not displayed */
}
func (*FlagsVideoFormat) ToFlags ¶
func (g *FlagsVideoFormat) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsVideoFormat.Validate should be called first.
func (*FlagsVideoFormat) Validate ¶
func (g *FlagsVideoFormat) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsVideoSelection ¶
type FlagsVideoSelection struct {
PlaylistStart *int `` /* 147-byte string literal not displayed */
PlaylistEnd *int `` /* 139-byte string literal not displayed */
// 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
PlaylistItems *string `` /* 517-byte string literal not displayed */
MatchTitle *string `` /* 135-byte string literal not displayed */
RejectTitle *string `` /* 139-byte string literal not displayed */
// Abort download if filesize is smaller than SIZE, e.g. 50k or 44.6M
MinFileSize *string `` /* 207-byte string literal not displayed */
// Abort download if filesize is larger than SIZE, e.g. 50k or 44.6M
MaxFileSize *string `` /* 206-byte string literal not displayed */
// 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
Date *string `` /* 337-byte string literal not displayed */
// Download only videos uploaded on or before this date. The date formats accepted are the
// same as --date
DateBefore *string `` /* 236-byte string literal not displayed */
// Download only videos uploaded on or after this date. The date formats accepted are the
// same as --date
DateAfter *string `` /* 231-byte string literal not displayed */
MinViews *int `` /* 129-byte string literal not displayed */
MaxViews *int `` /* 129-byte string literal not displayed */
// 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
MatchFilters []string `` /* 974-byte string literal not displayed */
// Do not use any --match-filters (default)
NoMatchFilters *bool `` /* 188-byte string literal not displayed */
// Same as "--match-filters" but stops the download process when a video is rejected
BreakMatchFilters *string `` /* 255-byte string literal not displayed */
// Do not use any --break-match-filters (default)
NoBreakMatchFilters *bool `` /* 223-byte string literal not displayed */
// Download only the video, if the URL refers to a video and a playlist
NoPlaylist *bool `` /* 203-byte string literal not displayed */
// Download the playlist, if the URL refers to a video and a playlist
YesPlaylist *bool `` /* 203-byte string literal not displayed */
// Download only videos suitable for the given age
AgeLimit *int `` /* 176-byte string literal not displayed */
// Download only videos not listed in the archive file. Record the IDs of all downloaded
// videos in it
DownloadArchive *string `` /* 255-byte string literal not displayed */
// Do not use archive file (default)
NoDownloadArchive *bool `` /* 195-byte string literal not displayed */
// Abort after downloading NUMBER files
MaxDownloads *int `` /* 181-byte string literal not displayed */
// Stop the download process when encountering a file that is in the archive supplied with
// the --download-archive option
BreakOnExisting *bool `` /* 277-byte string literal not displayed */
// Do not stop the download process when encountering a file that is in the archive (default)
NoBreakOnExisting *bool `` /* 255-byte string literal not displayed */
BreakOnReject *bool `` /* 152-byte string literal not displayed */
// Alters --max-downloads, --break-on-existing, --break-match-filters, and autonumber to
// reset per input URL
BreakPerInput *bool `` /* 253-byte string literal not displayed */
// --break-on-existing and similar options terminates the entire download queue
NoBreakPerInput *bool `` /* 229-byte string literal not displayed */
// Number of allowed failures until the rest of the playlist is skipped
SkipPlaylistAfterErrors *int `` /* 263-byte string literal not displayed */
}
func (*FlagsVideoSelection) ToFlags ¶
func (g *FlagsVideoSelection) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsVideoSelection.Validate should be called first.
func (*FlagsVideoSelection) Validate ¶
func (g *FlagsVideoSelection) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type FlagsWorkarounds ¶
type FlagsWorkarounds struct {
// Force the specified encoding (experimental)
Encoding *string `` /* 169-byte string literal not displayed */
// Explicitly allow HTTPS connection to servers that do not support RFC 5746 secure
// renegotiation
LegacyServerConnect *bool `` /* 270-byte string literal not displayed */
// Suppress HTTPS certificate validation
NoCheckCertificates *bool `` /* 211-byte string literal not displayed */
// Use an unencrypted connection to retrieve information about the video (Currently supported
// only for YouTube)
PreferInsecure *bool `` /* 261-byte string literal not displayed */
UserAgent *string `` /* 133-byte string literal not displayed */
Referer *string `json:"referer,omitempty" id:"referer" jsonschema:"title=Referer" jsonschema_extras:"uid=referer" jsonschema_description:""`
// Specify a custom HTTP header and its value, separated by a colon ":". You can use this
// option multiple times
AddHeaders []string `` /* 239-byte string literal not displayed */
// Work around terminals that lack bidirectional text support. Requires bidiv or fribidi
// executable in PATH
BidiWorkaround *bool `` /* 257-byte string literal not displayed */
// Number of seconds to sleep between requests during data extraction
SleepRequests *float64 `` /* 233-byte string literal not displayed */
// Number of seconds to sleep before each download. This is the minimum time to sleep when
// used along with --max-sleep-interval
SleepInterval *float64 `` /* 273-byte string literal not displayed */
// Maximum number of seconds to sleep. Can only be used along with --min-sleep-interval
MaxSleepInterval *float64 `` /* 248-byte string literal not displayed */
// Number of seconds to sleep before each subtitle download
SleepSubtitles *int `` /* 227-byte string literal not displayed */
}
func (*FlagsWorkarounds) ToFlags ¶
func (g *FlagsWorkarounds) ToFlags() (flags Flags)
ToFlags returns the generated flags based off the provided configuration. FlagsWorkarounds.Validate should be called first.
func (*FlagsWorkarounds) Validate ¶
func (g *FlagsWorkarounds) Validate() error
Validate ensures all flags have appropriate values. If there are validation-specific errors, they will be returned as a ErrMultipleJSONParsingFlags error.
type InstallBunOptions ¶
type InstallBunOptions struct {
// DisableDownload is a simple toggle to never allow downloading, which would
// be the same as never calling [InstallBun] or [MustInstallBun] in the first place.
DisableDownload bool
// DisableSystem is a simple toggle to never allow resolving from the system PATH.
DisableSystem bool
// DownloadURL is the exact url to the binary location to download (and store).
// Leave empty to use GitHub (windows, linux) and evermeet.cx (macos) +
// auto-detected os/arch.
DownloadURL string
}
type InstallFFmpegOptions ¶
type InstallFFmpegOptions struct {
// DisableDownload is a simple toggle to never allow downloading, which would
// be the same as never calling [InstallFFmpeg] or [MustInstallFFmpeg] in the first place.
DisableDownload bool
// DisableSystem is a simple toggle to never allow resolving from the system PATH.
DisableSystem bool
// DownloadURL is the exact url to the binary location to download (and store).
// Leave empty to use GitHub (windows, linux) and evermeet.cx (macos) +
// auto-detected os/arch.
DownloadURL 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
// DisableSystem is a simple toggle to never allow resolving from the system PATH.
DisableSystem 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 executable.
Version string // Version 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 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.
func InstallAll ¶
func InstallAll(ctx context.Context) ([]*ResolvedInstall, error)
InstallAll installs all dependencies for go-ytdlp concurrently, using default options. Note that this will not work on all platforms, as some dependencies are only supported on certain platforms.
func InstallBun ¶
func InstallBun(ctx context.Context, opts *InstallBunOptions) (*ResolvedInstall, error)
InstallBun will attempt to download and install bun for the current platform. If the binary is already installed or found in the PATH, it will return the resolved binary unless InstallBunOptions.DisableSystem is set to true. Note that downloading of bun is only supported on a handful of platforms, and so it is still recommended to install bun via other means.
func InstallFFmpeg ¶
func InstallFFmpeg(ctx context.Context, opts *InstallFFmpegOptions) (*ResolvedInstall, error)
InstallFFmpeg will attempt to download and install FFmpeg for the current platform. If the binary is already installed or found in the PATH, it will return the resolved binary unless InstallFFmpegOptions.DisableSystem is set to true. Note that downloading of ffmpeg and ffprobe is only supported on a handful of platforms, and so it is still recommended to install ffmpeg/ffprobe via other means.
func InstallFFprobe ¶
func InstallFFprobe(ctx context.Context, opts *InstallFFmpegOptions) (*ResolvedInstall, error)
InstallFFprobe will attempt to download and install FFprobe for the current platform. If the binary is already installed or found in the PATH, it will return the resolved binary unless InstallFFmpegOptions.DisableSystem is set to true. Note that downloading of ffmpeg and ffprobe is only supported on a handful of platforms, and so it is still recommended to install ffmpeg/ffprobe via other means.
func MustInstallAll ¶
func MustInstallAll(ctx context.Context) []*ResolvedInstall
MustInstallAll is similar to InstallAll, but panics if there is an error.
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.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package optiondata contains the raw option data for go-ytdlp.
|
Package optiondata contains the raw option data for go-ytdlp. |

