From df29da3e0e51f407f65680e4b3fdd380d301f33a Mon Sep 17 00:00:00 2001 From: Grant Shangreaux Date: Fri, 17 Feb 2023 08:07:11 -0600 Subject: 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). --- downloader.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) -- cgit v1.2.3