ConvertTo-YTdlpArgumentList

SYNOPSIS

Converts Invoke-YTdlp parameters into yt-dlp command line arguments

SYNTAX

ConvertTo-YTdlpArgumentList [-BoundParameter] <IDictionary> [-ProgressAction <ActionPreference>]
 [<CommonParameters>]

DESCRIPTION

The ConvertTo-YTdlpArgumentList function translates the PowerShell parameters used by Invoke-YTdlp into the matching yt-dlp command line options.

  • Value parameters become [ –option value ]
  • Switch parameters become [ –option ] only when they are set to true
  • Array values are joined with a comma

EXAMPLES

EXAMPLE 1

ConvertTo-YTdlpArgumentList -BoundParameter @{ ExtractAudio = [switch]$true; AudioFormat = 'mp3' }

Returns: –extract-audio –audio-format mp3

PARAMETERS

-BoundParameter

The bound parameters ($PSBoundParameters) to convert

Type: IDictionary
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

N/A

OUTPUTS

System.String[]

NOTES

Copyright 1990-2026 Celerium

NAME: ConvertTo-YTdlpArgumentList Type: Private

AUTHOR:  David Schulte
DATE:    2025-11-11
EMAIL:   celerium@Celerium.org

TODO:

https://github.com/yt-dlp/yt-dlp#usage-and-options