Skip to content

Instantly share code, notes, and snippets.

@kleag
Created March 31, 2024 19:10
Show Gist options
  • Save kleag/7fbc53a37096b8f5024ea08717b57145 to your computer and use it in GitHub Desktop.
Save kleag/7fbc53a37096b8f5024ea08717b57145 to your computer and use it in GitHub Desktop.
A bash script to split a youtube video sound into tracks, using youtube-to-mp3, sox and openunmix
#!/bin/bash
pip install --upgrade openunmix youtube-to-mp3
sudo apt install sox
mp3=$(yturl2mp3 $1 | grep "Writing audio in" | sed -e "s/.*audio in //g")
flac=$(echo $mp3 | sed -e "s/.mp3/.flac/")
sox "$mp3" "$flac"
umx --no-cuda "$flac"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment