Permalink
Browse files

cleanup

  • Loading branch information...
1 parent 54ad5f4 commit ab25b28dbdefb3e5ba9258d924942c549527da15 @ChristopherBiscardi committed Mar 13, 2011
Showing with 2 additions and 37 deletions.
  1. +0 −37 decodeAll.sh
  2. +2 −0 music/.gitignore
View
37 decodeAll.sh
@@ -1,37 +0,0 @@
-#!/usr/bin/env sh
-
-# Place this script in a directory containing FLAC files. When this script is
-# executed, it will forever loop through the files and decode them to stdout,
-# where the Node Icecast server will read from.
-# Usage: ./decodeCwdFlacToStream.sh | node server.js
-
-# The hostname and port of our Node Icecast server.
-ICECAST=localhost:5556
-
-while (true);
- do
-
- # First store the list of FLAC files into a temp file.
- TEMP=`mktemp -t list.XXXXXXXX`;
- find "$PWD" -name "*.mp3" >> "$TEMP";
- find "$PWD" -name "*.m4a" >> "$TEMP";
-
- # Loop through each entry of the temp file, invoking a 'metadata' event, and decoding the FLAC file.
- while IFS= read -r f <&3;
- do
-
- # First extract the TITLE, ARITST, and ALBUM from the FLAC file, for the 'metadata' event.
- #TITLE=`metaflac --show-tag=TITLE "$f" | sed "s/TITLE=//"`;
- #ARTIST=`metaflac --show-tag=ARTIST "$f" | sed "s/ARTIST=//"`;
- #ALBUM=`metaflac --show-tag=ALBUM "$f" | sed "s/ALBUM=//"`;
-
- # Set a 'metadata' event to update the current track
- curl --silent -X POST -u "node:rules" -H "X-Current-Track: $TITLE - $ARTIST - $ALBUM" "$ICECAST/metadata" > /dev/null;
-
- # TODO: Use 'flac' to decode, instead of 'ffmpeg'
- ffmpeg -i "$f" -f s16le -acodec pcm_s16le -ac 2 -ar 44100 -;
-
- done 3<"$TEMP";
-
- rm -f "$TEMP";
-done;
View
2 music/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore

0 comments on commit ab25b28

Please sign in to comment.