#!/bin/bash # __ __ # ____ ___ ______ / /___ ____ _____/ /__ _____ # / __ `/ / / / __ \/ / __ \/ __ `/ __ / _ \/ ___/ # / /_/ / /_/ / / / / / /_/ / /_/ / /_/ / __/ / # \__, /\__,_/_/ /_/_/\____/\__,_/\__,_/\___/_/ # /____/ # --------------------------------------------------- # Author :: Miris /// GitHub :: MirisWisdom/Albumin # --------------------------------------------------- # This simple Bash script lets you download the video # using yt-dlp, and then takes care of extracting its # audio into a file for each song w/ ffmpeg! # It does not re-encode or tag any of the audio files # due to raw preservation being its purpose. # You should run it line by line rather than blindly! # Feel free to tweak & suggest improvements! # --------------------------------------------------- # We'll be using the ID for both file and directory. VIDEO_ID='A9sOb_r6Hy0' # Create and enter the new directory. mkdir -p "${VIDEO_ID}" && cd "${VIDEO_ID}" # Download the audio file using yt-dlp. yt-dlp -x -f bestaudio "${VIDEO_ID}" -o "${VIDEO_ID}.%%(ext)s" # Figure out the downloaded file name and extension. SRC_FILE=$(ls "${VIDEO_ID}".*) # ls command should only output the downloaded file name! FILE_EXT=${SRC_FILE:12} # file id + dot = 12 characters; extension length varies! ffmpeg -ss 00:00:00 -to 00:03:39 -i "${SRC_FILE}" -vn -acodec copy "01. L’indecis - Soulful.${FILE_EXT}" ffmpeg -ss 00:03:39 -to 00:05:54 -i "${SRC_FILE}" -vn -acodec copy "02. nymano x Pandrezz - Fireworks.${FILE_EXT}" ffmpeg -ss 00:05:54 -to 00:08:10 -i "${SRC_FILE}" -vn -acodec copy "03. oddfish - Indelible.${FILE_EXT}" ffmpeg -ss 00:08:10 -to 00:10:28 -i "${SRC_FILE}" -vn -acodec copy "04. Pandrezz - Takin You For a Ride.${FILE_EXT}" ffmpeg -ss 00:10:28 -to 00:13:55 -i "${SRC_FILE}" -vn -acodec copy "05. Cap Kendricks - The One.${FILE_EXT}" ffmpeg -ss 00:13:55 -to 00:16:54 -i "${SRC_FILE}" -vn -acodec copy "06. Philanthrope x Yasper - Slopes.${FILE_EXT}" ffmpeg -ss 00:16:54 -to 00:19:23 -i "${SRC_FILE}" -vn -acodec copy "07. j’san - good morning sunshine.${FILE_EXT}" ffmpeg -ss 00:19:23 -to 00:21:57 -i "${SRC_FILE}" -vn -acodec copy "08. chief - yesterday.${FILE_EXT}" ffmpeg -ss 00:21:57 -to 00:24:49 -i "${SRC_FILE}" -vn -acodec copy "09. L’indecis - Blind.${FILE_EXT}" ffmpeg -ss 00:24:49 -to 00:29:31 -i "${SRC_FILE}" -vn -acodec copy "10. Ruck P - Destination.${FILE_EXT}" ffmpeg -ss 00:29:31 -to 00:31:52 -i "${SRC_FILE}" -vn -acodec copy "11. mommy x Philanthrope - embrace w/ monma , cocabona & Misha.${FILE_EXT}" ffmpeg -ss 00:31:52 -to 00:35:26 -i "${SRC_FILE}" -vn -acodec copy "12. Gonza - Relax your Mind.${FILE_EXT}" ffmpeg -ss 00:35:26 -to 00:39:04 -i "${SRC_FILE}" -vn -acodec copy "13. Ruck P - Spring in La Coruña.${FILE_EXT}" ffmpeg -ss 00:39:04 -to 00:41:28 -i "${SRC_FILE}" -vn -acodec copy "14. santpoort - the great ocean road.${FILE_EXT}" ffmpeg -ss 00:41:28 -to 00:43:34 -i "${SRC_FILE}" -vn -acodec copy "15. The Breed - Chocolate covered Dreams.${FILE_EXT}" ffmpeg -ss 00:43:34 -to 00:46:20 -i "${SRC_FILE}" -vn -acodec copy "16. plusma - albatros.${FILE_EXT}" ffmpeg -ss 00:46:20 -to 00:48:00 -i "${SRC_FILE}" -vn -acodec copy "17. mommy x Philanthrope - throwback port.${FILE_EXT}" ffmpeg -ss 00:48:00 -to 00:50:48 -i "${SRC_FILE}" -vn -acodec copy "18. C Y G N - Mindfulness.${FILE_EXT}" ffmpeg -ss 00:50:48 -to 00:51:56 -i "${SRC_FILE}" -vn -acodec copy "19. masked man - coupe_90.${FILE_EXT}" ffmpeg -ss 00:51:56 -to 00:54:38 -i "${SRC_FILE}" -vn -acodec copy "20. FloFilz x Psalm Trees - Smooth wit’ any groove.${FILE_EXT}" ffmpeg -ss 00:54:38 -to 00:57:27 -i "${SRC_FILE}" -vn -acodec copy "21. Birocratic _ Belly Breathing.${FILE_EXT}" ffmpeg -ss 00:57:27 -to 00:59:53 -i "${SRC_FILE}" -vn -acodec copy "22. j’san - movie scene.${FILE_EXT}" ffmpeg -ss 00:59:53 -to 01:02:29 -i "${SRC_FILE}" -vn -acodec copy "23. Kupla - Tiger.${FILE_EXT}" ffmpeg -ss 01:02:29 -to 01:05:41 -i "${SRC_FILE}" -vn -acodec copy "24. Flitz & Suppe - About the Distance.${FILE_EXT}" ffmpeg -ss 01:05:41 -to 01:07:56 -i "${SRC_FILE}" -vn -acodec copy "25. swuM - this again w/ quickly , quickly.${FILE_EXT}" ffmpeg -ss 01:07:56 -to 01:10:27 -i "${SRC_FILE}" -vn -acodec copy "26. Tesk - burn my mind.${FILE_EXT}" ffmpeg -ss 01:10:27 -to 01:12:46 -i "${SRC_FILE}" -vn -acodec copy "27. j'san x nymano - autumn breeze.${FILE_EXT}" ffmpeg -ss 01:12:46 -to 01:15:14 -i "${SRC_FILE}" -vn -acodec copy "28. Joe Corfield - Wildflower.${FILE_EXT}" ffmpeg -ss 01:15:14 -to 01:17:47 -i "${SRC_FILE}" -vn -acodec copy "29. mommy X delayde - flashes of calm.${FILE_EXT}" ffmpeg -ss 01:17:47 -to 01:20:59 -i "${SRC_FILE}" -vn -acodec copy "30. harris cole - larkspur.${FILE_EXT}" ffmpeg -ss 01:20:59 -to 01:23:32 -i "${SRC_FILE}" -vn -acodec copy "31. hm surf - couch day.${FILE_EXT}" ffmpeg -ss 01:23:32 -to 01:26:01 -i "${SRC_FILE}" -vn -acodec copy "32. invention_ - ebb//flo.${FILE_EXT}" ffmpeg -ss 01:26:01 -to 01:28:51 -i "${SRC_FILE}" -vn -acodec copy "33. Ian Ewing x Philanthrope - Smart Girl in a Skurt.${FILE_EXT}" ffmpeg -ss 01:28:51 -to 01:32:22 -i "${SRC_FILE}" -vn -acodec copy "34. seneca b - sunshine.${FILE_EXT}" ffmpeg -ss 01:32:22 -to 01:34:24 -i "${SRC_FILE}" -vn -acodec copy "35. Sarcastic Sounds x Beowulf - Runaway (Ft. Mishaal).${FILE_EXT}" ffmpeg -ss 01:34:24 -to 01:36:48 -i "${SRC_FILE}" -vn -acodec copy "36. leavv - Candle.${FILE_EXT}" ffmpeg -ss 01:36:48 -to 01:39:54 -i "${SRC_FILE}" -vn -acodec copy "37. Aso - Closer.${FILE_EXT}" ffmpeg -ss 01:39:54 -to 01:42:30 -i "${SRC_FILE}" -vn -acodec copy "38. Smeyeul - Distant Travels.${FILE_EXT}" ffmpeg -ss 01:42:30 -to 01:44:16 -i "${SRC_FILE}" -vn -acodec copy "39. digitalluc - Float.${FILE_EXT}" ffmpeg -ss 01:44:16 -to 01:46:41 -i "${SRC_FILE}" -vn -acodec copy "40. invention_ - landrace.${FILE_EXT}" ffmpeg -ss 01:46:41 -to 01:49:56 -i "${SRC_FILE}" -vn -acodec copy "41. Ian Ewing - LuvnYou.${FILE_EXT}" ffmpeg -ss 01:49:56 -to 01:53:10 -i "${SRC_FILE}" -vn -acodec copy "42. Toonorth - Silience.${FILE_EXT}" ffmpeg -ss 01:53:10 -to 01:55:39 -i "${SRC_FILE}" -vn -acodec copy "43. hm surf - oracle night.${FILE_EXT}" ffmpeg -ss 01:55:39 -to 01:58:30 -i "${SRC_FILE}" -vn -acodec copy "44. arbour x Underbelly - borren.${FILE_EXT}" ffmpeg -ss 01:58:30 -to 02:00:40 -i "${SRC_FILE}" -vn -acodec copy "45. Amonos - Montrose.${FILE_EXT}"