Created
October 6, 2021 04:43
-
-
Save elcepi/74054f35cb46bbeac1324700a2b3b2b6 to your computer and use it in GitHub Desktop.
Split a largeaudiofile (audiobook) in parts (chapters) using user defined chapter names and times and ffmeg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
start="00:00:00" | |
atimes=( | |
"00:05:20" | |
"00:07:23" | |
"00:08:08" | |
"00:09:14" | |
"00:10:14" | |
"00:11:00" | |
"00:12:09" | |
"00:12:23" | |
"00:12:57" | |
"00:13:49" | |
"00:14:38" | |
"00:16:12" | |
"00:16:54" | |
"00:18:07" | |
"00:19:24" | |
"00:20:32" | |
"00:21:12" | |
"00:21:53" | |
"00:22:55" | |
"00:23:44" | |
"00:24:06" | |
"00:24:53" | |
"00:25:28" | |
"00:28:43" | |
"00:31:12" | |
"00:32:29" | |
"00:32:44" | |
"00:33:08" | |
"00:37:48" | |
"00:39:12" | |
"00:42:22" | |
"00:44:47" | |
"00:50:25" | |
"00:51:17" | |
"00:51:44" | |
"00:52:23" | |
"00:52:40" | |
"00:53:04" | |
"00:53:49" | |
"00:54:28" | |
"00:55:06" | |
"00:56:00" | |
"00:56:43" | |
"00:57:25" | |
"00:58:06" | |
"00:59:38" | |
"01:00:18" "01:02:14" "01:03:42" "01:04:09" "01:06:06" "01:07:29" "01:08:25" | |
shing ) | |
atitles=("Prologo" "Desear" "Verdad" "Herencia" "Opinar" "Bienes" "Desear" "Desear" "Libertad" "Virtud" "Perder" "Renunciar" "Criticar" "Libertad Depender" "El Banquete " "Compartir" "Rol" "Presagiar" "Envidiar Despreciar" "Ultrajar" "Morir" "Filosofar " "Aparecer" "Depender de Ti" "Comprar y Vender " "Desear" "El Mal No Existe" "Pensamiento Positivo" "Deliberar" "Lugar" "Piedad" "Adivinar" "Saber Hacer " "Imaginar" "El Saber del Otro" "Operaciones Lógicas" "Lugar " "Ceder" "Poseer " "Mujeres" "El Cuerpo " "Agraviar" "Las Asas del Sentido" "Absurdo" "Interpretar" "Nombrar" "Ostentar" "Diferencia" "Practicar" "Sin Prisa Pero Sin Pausa" "Practicar" "Filosofía" "Sentencias" "Sobre Epicteto") | |
i=1 | |
for end in ${atimes}; do | |
/usr/bin/ffmpeg -i input.opus -acodec copy -ss $start -to $end ${i}_${atitles[${i}]}.opus | |
start=${end}e | |
((i=${i}+1)) | |
done | |
/usr/bin/ffmpeg -i input.opus -acodec copy -ss $start ${i}_${atitles[${i}]}.opus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment