#!/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='Do5_wU9X1pc' # 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 0:00:00 -to 0:02:17 -i "${SRC_FILE}" -vn -acodec copy "01. theme of suzuka (f1 racing championship).${FILE_EXT}" ffmpeg -ss 0:02:17 -to 0:04:03 -i "${SRC_FILE}" -vn -acodec copy "02. 08 (zeus carnage heart second).${FILE_EXT}" ffmpeg -ss 0:04:03 -to 0:05:59 -i "${SRC_FILE}" -vn -acodec copy "03. horizon (moon remix rpg adventure).${FILE_EXT}" ffmpeg -ss 0:05:59 -to 0:08:00 -i "${SRC_FILE}" -vn -acodec copy "04. beats from above (klonoa - door to phantomile).${FILE_EXT}" ffmpeg -ss 0:08:00 -to 0:09:23 -i "${SRC_FILE}" -vn -acodec copy "05. (jojo's bizarre adventure).${FILE_EXT}" ffmpeg -ss 0:09:23 -to 0:11:15 -i "${SRC_FILE}" -vn -acodec copy "06. dark ages 1 (norse by norsewest - the return of the lost vikings).${FILE_EXT}" ffmpeg -ss 0:11:15 -to 0:13:46 -i "${SRC_FILE}" -vn -acodec copy "07. 05 (ford racing).${FILE_EXT}" ffmpeg -ss 0:13:46 -to 0:15:29 -i "${SRC_FILE}" -vn -acodec copy "08. bgm03 (g-police).${FILE_EXT}" ffmpeg -ss 0:15:29 -to 0:17:02 -i "${SRC_FILE}" -vn -acodec copy "09. 7 (barbie super sports).${FILE_EXT}" ffmpeg -ss 0:17:02 -to 0:18:32 -i "${SRC_FILE}" -vn -acodec copy "10. (diver's dream).${FILE_EXT}" ffmpeg -ss 0:18:32 -to 0:20:13 -i "${SRC_FILE}" -vn -acodec copy "11. 28 (pro pinball big race usa).${FILE_EXT}" ffmpeg -ss 0:20:13 -to 0:23:04 -i "${SRC_FILE}" -vn -acodec copy "12. quiet curves (r4 - ridge racer type 4).${FILE_EXT}" ffmpeg -ss 0:23:04 -to 0:25:02 -i "${SRC_FILE}" -vn -acodec copy "13. 03 (rushdown).${FILE_EXT}" ffmpeg -ss 0:25:02 -to 0:27:07 -i "${SRC_FILE}" -vn -acodec copy "14. bgm16 (ling rise).${FILE_EXT}" ffmpeg -ss 0:27:07 -to 0:29:05 -i "${SRC_FILE}" -vn -acodec copy "15. 4 (ronaldo v-football).${FILE_EXT}" ffmpeg -ss 0:29:05 -to 0:31:06 -i "${SRC_FILE}" -vn -acodec copy "16. 11 (lattice 200ec7).${FILE_EXT}" ffmpeg -ss 0:31:06 -to 0:34:02 -i "${SRC_FILE}" -vn -acodec copy "17. how do you think (planet dob).${FILE_EXT}" ffmpeg -ss 0:34:02 -to 0:36:34 -i "${SRC_FILE}" -vn -acodec copy "18. winner takes all (sengoku cyber - fujimaru jigokuhen).${FILE_EXT}" ffmpeg -ss 0:36:34 -to 0:38:02 -i "${SRC_FILE}" -vn -acodec copy "19. ending (sengoku cyber - fujimaru jigokuhen).${FILE_EXT}" ffmpeg -ss 0:38:02 -to 0:40:09 -i "${SRC_FILE}" -vn -acodec copy "20. cosmic surfin' (planet dob).${FILE_EXT}" ffmpeg -ss 0:40:09 -to 0:42:34 -i "${SRC_FILE}" -vn -acodec copy "21. 08 (sydney 2000).${FILE_EXT}" ffmpeg -ss 0:42:34 -to 0:43:21 -i "${SRC_FILE}" -vn -acodec copy "22. 08 (devil dice).${FILE_EXT}" ffmpeg -ss 0:43:21 -to 0:45:12 -i "${SRC_FILE}" -vn -acodec copy "23. bgm21 (raycrisis - series termination).${FILE_EXT}" ffmpeg -ss 0:45:12 -to 0:46:32 -i "${SRC_FILE}" -vn -acodec copy "24. free fishing menu (fisherman's bait 3).${FILE_EXT}" ffmpeg -ss 0:46:32 -to 0:46:51 -i "${SRC_FILE}" -vn -acodec copy "25. 60 unknown title 4 (zill o'll).${FILE_EXT}" ffmpeg -ss 0:46:51 -to 0:48:30 -i "${SRC_FILE}" -vn -acodec copy "26. 52 (raystorm).${FILE_EXT}" ffmpeg -ss 0:48:30 -to 0:50:14 -i "${SRC_FILE}" -vn -acodec copy "27. theme of magny-cours (f1 racing championship).${FILE_EXT}" ffmpeg -ss 0:50:14 -to 0:52:12 -i "${SRC_FILE}" -vn -acodec copy "28. montage (ace combat 3 - electrosphere).${FILE_EXT}" ffmpeg -ss 0:52:12 -to 0:53:12 -i "${SRC_FILE}" -vn -acodec copy "29. boss - musashi (soul of the samurai).${FILE_EXT}" ffmpeg -ss 0:53:12 -to 0:55:04 -i "${SRC_FILE}" -vn -acodec copy "30. boss - monster karasu (soul of the samurai).${FILE_EXT}" ffmpeg -ss 0:55:04 -to 0:57:05 -i "${SRC_FILE}" -vn -acodec copy "31. 16 keep challenging (lord of fist).${FILE_EXT}" ffmpeg -ss 0:57:05 -to 0:58:06 -i "${SRC_FILE}" -vn -acodec copy "32. 19 (uchuu goushouden - bakuretsu akindo).${FILE_EXT}" ffmpeg -ss 0:58:06 -to 0:59:47 -i "${SRC_FILE}" -vn -acodec copy "33. main theme (t kara hajimaru monogatari).${FILE_EXT}" ffmpeg -ss 0:59:47 -to 1:01:47 -i "${SRC_FILE}" -vn -acodec copy "34. temple of ghosts (threads of fate).${FILE_EXT}" ffmpeg -ss 1:01:47 -to 1:02:35 -i "${SRC_FILE}" -vn -acodec copy "35. save & load (racing lagoon).${FILE_EXT}" ffmpeg -ss 1:02:35 -to 1:04:39 -i "${SRC_FILE}" -vn -acodec copy "36. free area (juggernaut).${FILE_EXT}" ffmpeg -ss 1:04:39 -to 1:06:09 -i "${SRC_FILE}" -vn -acodec copy "37. 11 (devil dice).${FILE_EXT}" ffmpeg -ss 1:06:09 -to 1:08:08 -i "${SRC_FILE}" -vn -acodec copy "38. silver stream (rage racer).${FILE_EXT}" ffmpeg -ss 1:08:08 -to 1:08:56 -i "${SRC_FILE}" -vn -acodec copy "39. ending 1 (dance dance revolution 5thmix).${FILE_EXT}" ffmpeg -ss 1:08:56 -to 1:10:23 -i "${SRC_FILE}" -vn -acodec copy "40. gentle stress [amd sexual mix] (dance dance revolution 3rdmix).${FILE_EXT}" ffmpeg -ss 1:10:23 -to 1:11:40 -i "${SRC_FILE}" -vn -acodec copy "41. 20 (monaco grand prix).${FILE_EXT}" ffmpeg -ss 1:11:40 -to 1:13:15 -i "${SRC_FILE}" -vn -acodec copy "42. mt katatsumuri (persona 2 - eternal punishment).${FILE_EXT}" ffmpeg -ss 1:13:15 -to 1:14:49 -i "${SRC_FILE}" -vn -acodec copy "43. double clutch (wangan trial).${FILE_EXT}" ffmpeg -ss 1:14:49 -to 1:16:54 -i "${SRC_FILE}" -vn -acodec copy "44. cygnus rift (need for speed - high stakes).${FILE_EXT}" ffmpeg -ss 1:16:54 -to 1:18:58 -i "${SRC_FILE}" -vn -acodec copy "45. hiding place [comfortable mix] (parasite eve 2).${FILE_EXT}" ffmpeg -ss 1:18:58 -to 1:21:09 -i "${SRC_FILE}" -vn -acodec copy "46. searching for love (gamera 2000).${FILE_EXT}" ffmpeg -ss 1:21:09 -to 1:22:20 -i "${SRC_FILE}" -vn -acodec copy "47. 06 (puma street soccer).${FILE_EXT}" ffmpeg -ss 1:22:20 -to 1:24:42 -i "${SRC_FILE}" -vn -acodec copy "48. theme of hockenheim (f1 racing championship).${FILE_EXT}" ffmpeg -ss 1:24:42 -to 1:26:00 -i "${SRC_FILE}" -vn -acodec copy "49. theme of monte carlo (f1 racing championship).${FILE_EXT}" ffmpeg -ss 1:26:00 -to 1:28:13 -i "${SRC_FILE}" -vn -acodec copy "50. alcajazz theme (aironauts).${FILE_EXT}" ffmpeg -ss 1:28:13 -to 1:31:19 -i "${SRC_FILE}" -vn -acodec copy "51. menu theme (toca 2 - touring cars).${FILE_EXT}" ffmpeg -ss 1:31:19 -to 1:33:11 -i "${SRC_FILE}" -vn -acodec copy "52. bgm02 (anna kournikova's smash court tennis).${FILE_EXT}" ffmpeg -ss 1:33:11 -to 1:34:33 -i "${SRC_FILE}" -vn -acodec copy "53. 01 (lifescape 2 - body bionics).${FILE_EXT}" ffmpeg -ss 1:34:33 -to 1:37:06 -i "${SRC_FILE}" -vn -acodec copy "54. flight theme_trick trail (no fear downhill mountain biking).${FILE_EXT}" ffmpeg -ss 1:37:06 -to 1:39:25 -i "${SRC_FILE}" -vn -acodec copy "55. in-game 4 (wreckin' crew).${FILE_EXT}" ffmpeg -ss 1:39:25 -to 1:41:58 -i "${SRC_FILE}" -vn -acodec copy "56. 03 sentidub (sentient).${FILE_EXT}" ffmpeg -ss 1:41:58 -to 1:43:25 -i "${SRC_FILE}" -vn -acodec copy "57. car setup (michelin rally masters - race of champions).${FILE_EXT}" ffmpeg -ss 1:43:25 -to 1:43:54 -i "${SRC_FILE}" -vn -acodec copy "58. 33 (pro pinball big race usa).${FILE_EXT}" ffmpeg -ss 1:43:54 -to 1:45:33 -i "${SRC_FILE}" -vn -acodec copy "59. discovery (kaze no notam).${FILE_EXT}" ffmpeg -ss 1:45:33 -to 1:46:28 -i "${SRC_FILE}" -vn -acodec copy "60. epilogue (r4 - ridge racer type 4).${FILE_EXT}" ffmpeg -ss 1:46:28 -to 1:49:17 -i "${SRC_FILE}" -vn -acodec copy "61. 02 (tank racer).${FILE_EXT}" ffmpeg -ss 1:49:17 -to 1:51:32 -i "${SRC_FILE}" -vn -acodec copy "62. bgm07 (naniwa wangan battle).${FILE_EXT}" ffmpeg -ss 1:51:32 -to 1:53:34 -i "${SRC_FILE}" -vn -acodec copy "63. silhouette dance (r4 - ridge racer type 4).${FILE_EXT}" ffmpeg -ss 1:53:34 -to 1:55:40 -i "${SRC_FILE}" -vn -acodec copy "64. breaks [remix] (music 2000).${FILE_EXT}" ffmpeg -ss 1:55:40 -to 1:58:21 -i "${SRC_FILE}" -vn -acodec copy "65. some kinds of love (planet dob).${FILE_EXT}" ffmpeg -ss 1:58:21 -to 2:01:42 -i "${SRC_FILE}" -vn -acodec copy "66. blame [grooverider jeep mix] (gran turismo 2).${FILE_EXT}" ffmpeg -ss 2:01:42 -to 2:03:36 -i "${SRC_FILE}" -vn -acodec copy "67. dark ruins (ape escape).${FILE_EXT}" ffmpeg -ss 2:03:36 -to 2:05:39 -i "${SRC_FILE}" -vn -acodec copy "68. score ranking (zanac x zanac).${FILE_EXT}" ffmpeg -ss 2:05:39 -to 2:07:40 -i "${SRC_FILE}" -vn -acodec copy "69. snowfield story (zanac x zanac).${FILE_EXT}" ffmpeg -ss 2:07:40 -to 2:09:25 -i "${SRC_FILE}" -vn -acodec copy "70. design the skyline [against gravity mix] (jet de go).${FILE_EXT}" ffmpeg -ss 2:09:25 -to 2:11:30 -i "${SRC_FILE}" -vn -acodec copy "71. lucid rhythms (r4 - ridge racer type 4).${FILE_EXT}" ffmpeg -ss 2:11:30 -to 2:13:10 -i "${SRC_FILE}" -vn -acodec copy "72. queen's (racing lagoon).${FILE_EXT}" ffmpeg -ss 2:13:10 -to 2:14:39 -i "${SRC_FILE}" -vn -acodec copy "73. 04 (fox junction).${FILE_EXT}" ffmpeg -ss 2:14:39 -to 2:16:30 -i "${SRC_FILE}" -vn -acodec copy "74. secret life (rollcage stage 2).${FILE_EXT}" ffmpeg -ss 2:16:30 -to 2:17:46 -i "${SRC_FILE}" -vn -acodec copy "75. loop demo (racing lagoon).${FILE_EXT}" ffmpeg -ss 2:17:46 -to 2:19:57 -i "${SRC_FILE}" -vn -acodec copy "76. raceway (speed punks).${FILE_EXT}" ffmpeg -ss 2:19:57 -to 2:21:36 -i "${SRC_FILE}" -vn -acodec copy "77. type a (billiards).${FILE_EXT}" ffmpeg -ss 2:21:36 -to 2:23:11 -i "${SRC_FILE}" -vn -acodec copy "78. fright flight [parappa's version] (um jammer lammy).${FILE_EXT}" ffmpeg -ss 2:23:11 -to 2:24:42 -i "${SRC_FILE}" -vn -acodec copy "79. reach air burst (moon remix rpg adventure).${FILE_EXT}" ffmpeg -ss 2:24:42 -to 2:25:49 -i "${SRC_FILE}" -vn -acodec copy "80. bgm09 (raycrisis - series termination).${FILE_EXT}" ffmpeg -ss 2:25:49 -to 2:27:22 -i "${SRC_FILE}" -vn -acodec copy "81. can you dig it (dancing stage featuring true kiss destination).${FILE_EXT}" ffmpeg -ss 2:27:22 -to 2:29:45 -i "${SRC_FILE}" -vn -acodec copy "82. chilling fields (team buddies).${FILE_EXT}" ffmpeg -ss 2:29:45 -to 2:31:21 -i "${SRC_FILE}" -vn -acodec copy "83. the cube (dance dance revolution 5thmix).${FILE_EXT}" ffmpeg -ss 2:31:21 -to 2:33:57 -i "${SRC_FILE}" -vn -acodec copy "84. sometimes i breath (planet dob).${FILE_EXT}" ffmpeg -ss 2:33:57 -to 2:36:02 -i "${SRC_FILE}" -vn -acodec copy "85. 06 (rushdown).${FILE_EXT}" ffmpeg -ss 2:36:02 -to 2:38:02 -i "${SRC_FILE}" -vn -acodec copy "86. 04 (olympic summer games).${FILE_EXT}" ffmpeg -ss 2:38:02 -to 2:39:37 -i "${SRC_FILE}" -vn -acodec copy "87. stadium (speed punks).${FILE_EXT}" ffmpeg -ss 2:39:37 -to 2:41:00 -i "${SRC_FILE}" -vn -acodec copy "88. midnight yoghurt (pop'n music 6).${FILE_EXT}" ffmpeg -ss 2:41:00 -to 2:42:58 -i "${SRC_FILE}" -vn -acodec copy "89. flo jack (dance dance revolution 2ndremix append club version vol 1).${FILE_EXT}"