Initial commit
This commit is contained in:
		
							
								
								
									
										13
									
								
								mp3convert
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										13
									
								
								mp3convert
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,13 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
 | 
			
		||||
FLAC="$1"
 | 
			
		||||
OUT_DIR="mp3"
 | 
			
		||||
# get filename without extension
 | 
			
		||||
FILENAME="${FLAC##*/}"
 | 
			
		||||
# make filename with .mp3 extension
 | 
			
		||||
MP3="./${OUT_DIR}/${FILENAME%.flac}.mp3"
 | 
			
		||||
 | 
			
		||||
mkdir -p "$OUT_DIR"
 | 
			
		||||
if [[ ! -f "$MP3" ]]; then
 | 
			
		||||
    ffmpeg -i "$FLAC" -c:a libmp3lame -b:a 320K -map a:0 "$MP3"
 | 
			
		||||
fi
 | 
			
		||||
		Reference in New Issue
	
	Block a user