aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGrant Shangreaux <shoshin@cicadas.surf>2023-02-17 08:07:11 -0600
committercolin <colin@cicadas.surf>2023-02-17 07:25:28 -0800
commitdf29da3e0e51f407f65680e4b3fdd380d301f33a (patch)
tree123bccd97686450f9bd875df83cc8b4fc1613b0c
parent9844fc0c9a2c0eaa56431b756c839fd1bdfc269a (diff)
Add: --format-sort --prefer-free-formats instead of --audio-format
Turns out --audio-format is related to the -x flag which converts media after it has been downloaded. Instead, prefer using the FORMAT SELECTION features of youtube-dl to set the preferred media types when downloading. The specific change is tied primarily to sites that may offer multiple audio format downloads and will prefer free formats over others. This is to work around the issue where HTML5 media containers can not play (all?) m4a tracks because of the non-free format being unsupported (in firefox at least).
-rw-r--r--downloader.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/downloader.lisp b/downloader.lisp
index 07ecb84..cafe46b 100644
--- a/downloader.lisp
+++ b/downloader.lisp
@@ -66,7 +66,7 @@
(trackinfo-file
(trackinfo-file tmpdir tmpname)))
(uiop:run-program
- (format nil "youtube-dl --audio-format opus --playlist-end 1 --write-info-json -x -o \"~a/~a.%(ext)s\" '~a'"
+ (format nil "youtube-dl --format-sort aext --prefer-free-formats --playlist-end 1 --write-info-json -x -o \"~a/~a.%(ext)s\" '~a'"
tmpdir tmpname url))
(let* ((info
(trackinfo trackinfo-file))