Nushell CLI command to download the highest-quality opus audio file through yt-dlp
Nushell CLI command to download the highest-quality opus audio file through yt-dlp
Command dl opus
to download highest quality audio as or into an opus file through yt-dlp.
Add to config.nu
:
nu
# Download highest quality Opus audio as/into .opus file def "dl opus" [url: string] { yt-dlp --extract-audio --audio-quality 0 --audio-format opus $"($url)" }
Usage:
nu
dl opus <url>
I have set up dl
as an alias for yt-dlp
via alias dl = yt-dlp
. The def
above adds an overlaying sub-command.