Skip to content

Commit cebce65

Browse files
authored
Add default user configuration script for yt-dlp
This file contains user configuration settings for yt-dlp, including download paths, UI paths, and various options for video and audio processing.
1 parent 2eb03ae commit cebce65

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

powershell/config.ps1

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<#*==========================================================================
2+
* ℹ This is your user configuration (config.ps1)
3+
This file must be next to "yt-download.ps1"
4+
Check https://github.com/Fred-Vatin/run-yt-dlp-from-browser/wiki/How-to-setup-and-use%E2%80%AF%3F
5+
===========================================================================#>
6+
7+
# This folder name must exist as a child in the user downloads directory defined by the OS
8+
New-Variable -Name DownloadFolderName -Value "yt-dlp" -Option Constant
9+
# If of some reason you want to use another parent download directory you can uncomment this line
10+
# Keep in mind that files will be downloaded to "$DownloadsPath/DownloadFolderName"
11+
# New-Variable -Name DownloadsPath -Value "D:/Download" -Option Constant
12+
# Open the file explorer and select the downloaded file
13+
New-Variable -Name SelectDownloadedFile -Value $true -Option Constant
14+
15+
New-Variable -Name UI_Path -Value "D:/Programmes/Internet/youtube-dl/YDL-UI_Portable/YDL-UI.exe" -Option Constant
16+
17+
New-Variable -Name UseBrowserCookies -Value $true -Option Constant # true is recommended
18+
# Must be the name of a yt-dlp supported browser and optionnaly the name of the profile directory containing the cookies you need
19+
New-Variable -Name browserCookies -Value "firefox:oo49eawy.Youtube" -Option Constant
20+
New-Variable -Name myCookies -Value "D:/pathTo/cookies.txt" # it is recommended to not use such a file for security reason.
21+
22+
New-Variable -Name templateNameChannel -Value "%(uploader|)s%(uploader& - )s%(title).70s.%(ext)s" -Option Constant
23+
New-Variable -Name templateNameTitle -Value "%(title).70s.%(ext)s" -Option Constant
24+
# if useTitle is true then use $templateNameTitle else $templateNameChannel
25+
New-Variable -Name useTitle -Value $true -Option Constant
26+
27+
# default quality for video (make it compatible to upload on 𝕏)
28+
New-Variable -Name videoQuality -Value "bestvideo*[vcodec^=avc1]+bestaudio[acodec^=mp4a]/bestvideo*+bestaudio/best"
29+
# Videos will use this container
30+
New-Variable -Name videoContainer -Value "mp4" -Option Constant
31+
# set URLs for which the script will detect as audio
32+
New-Variable -Name autoAudio -Value @("https://music.youtube.com/watch?v=") -Option Constant
33+
# set default js runtime required in the new yt-dlp versions. This will improve download speed a lot. The download can also fail without it.
34+
# Just comment to let yt-dlp search for installed js runtime or use a fallback (slow)
35+
# check: https://github.com/yt-dlp/yt-dlp/wiki/ejs
36+
New-Variable -Name jsRuntime -Value "bun" -Option Constant
37+
38+
# If some chars display weirdly or you want to be sure to see the original yt-dlp output, set it to $false
39+
New-Variable -Name UseColorfulOutput -Value $true -Option Constant
40+
41+
# Play a sound in case of Success or Error. On Linux, the same sound will be played
42+
New-Variable -Name PlaySound -Value $true -Option Constant

0 commit comments

Comments
 (0)