Anonymous avatar Anonymous committed 95dc56d

Updated volume changing hacks for BAM.

Comments (0)

Files changed (1)

 		# Extract both audio tracks
-		ffmpeg -i "$1" -map 0:0 "$TRACK1" >/dev/null 2>&1
-		ffmpeg -i "$1" -map 0:1 "$TRACK2" >/dev/null 2>&1
+		ffmpeg -i "$1" -ac 1 -map 0:0 "$TRACK1" >/dev/null 2>&1
+		ffmpeg -i "$1" -ac 1 -map 0:1 "$TRACK2" >/dev/null 2>&1
+    # Adjust volume of track 2 (Samson G-Track hack)
+    if [ "$GTRACK_HACK" == "true" ]
+    then
+      echo "Applying G-Track hack..."
+      TRACK2_TMP="track2.vol.tmp$$.wav"
+      sox -v 0.3 "$TRACK2" "$TRACK2_TMP"
+      rm -f "$TRACK2"
+      TRACK2="$TRACK2_TMP"
+    fi
 		# Mux audio tracks to single file
-		sox -m "$TRACK1" "$TRACK2" "$MUXED"
+		sox -m "$TRACK1" "$TRACK2" -c 2 "$MUXED"
 		rm -f "$TRACK1" "$TRACK2"
     # Add intro and outro (if defined in configuration)
     if [ -n "$INTRO" -o -n "$OUTRO" ]
-      sox "$INTRO" "$MUXED" "$OUTRO" "$MUXED2"
+      #sox -v 0.5 "$INTRO" "$MUXED" "$OUTRO" "$MUXED2"
+      sox -v 1.5 "$INTRO" "$MUXED" "$OUTRO" "$MUXED2"
       rm -f "$MUXED"
 	echo "No cover art, please install eyeD3."
+# Uncomment this line for testing the final MP3
+#exit 0
 # Upload the MP3 using curl
 echo "Uploading podcast episode..."
 curl -T "$out" "$TARGET_URL"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.