Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Lana-chan
Last active May 7, 2017 06:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Lana-chan/5de2ee94ff47da256a73 to your computer and use it in GitHub Desktop.
Save Lana-chan/5de2ee94ff47da256a73 to your computer and use it in GitHub Desktop.
Bash script for batch uploading MP3s and FLACs into NetMD
#!/bin/bash
# This script expects music files named ## Title.ext where ## is the track number.
ls *.mp3 *.flac | while read i; do
ffmpeg -i "$i" out.wav < /dev/null
# ATRAC3Tool can be found here: https://github.com/Treeki/atrac3tool
wine ../atrac3tool.exe out.wav lp2.wav
rm out.wav
file=${i%%.*}
title=${file:3}
# linux-minidisc found here: https://github.com/Lana-chan/linux-minidisc
sudo ../netmdcli send lp2.wav "$title"
rm lp2.wav
done
@kwlinux
Copy link

kwlinux commented Jan 11, 2017

when the script runs wine ../atrac3tool.exe ... I get the error message "atrac3 not found". What should I have to do?

@Lana-chan
Copy link
Author

you're missing the ACM codec, read the instructions in the readme of https://github.com/Lana-chan/linux-minidisc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment