replaced/ updated scripts
This commit is contained in:
		@@ -6,6 +6,16 @@ for file in ./*.m4a; do
 | 
			
		||||
   if [[ $# > 0 && $1 == 'map' ]]; then
 | 
			
		||||
      map='-map 0:0';
 | 
			
		||||
   fi
 | 
			
		||||
   echo "ffmpeg -i '$file' -c:a copy $map -movflags +faststart '../reencode/$file'";
 | 
			
		||||
   ffmpeg -i "$file" -c:a copy $map -movflags +faststart "../reencode/$file";
 | 
			
		||||
   vbr='';
 | 
			
		||||
   if [[ $# > 1 && $2 == 'vbr' ]]; then
 | 
			
		||||
      vbr='libfdk_aac -profile:a aac_he -b:a 64k';
 | 
			
		||||
   else
 | 
			
		||||
      map="$map copy"
 | 
			
		||||
   fi
 | 
			
		||||
   dest=../reencode
 | 
			
		||||
   if [[ !(-d $dest) ]]; then
 | 
			
		||||
      mkdir $dest
 | 
			
		||||
   fi
 | 
			
		||||
   echo "ffmpeg -i '$file' -c:a $vbr $map -movflags +faststart '$dest/$file'";
 | 
			
		||||
   ffmpeg -i "$file" -c:a $vbr $map -movflags +faststart "$dest/$file";
 | 
			
		||||
done
 | 
			
		||||
 
 | 
			
		||||
@@ -1,7 +0,0 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
set -euo pipefail
 | 
			
		||||
 | 
			
		||||
for file in ./*.mp3; do
 | 
			
		||||
   echo "ffmpeg -i '$file' -c:a copy -map 0:0 '../reencode/$file'";
 | 
			
		||||
   ffmpeg -i "$file" -c:a copy -map 0:0 "../reencode/$file";
 | 
			
		||||
done
 | 
			
		||||
@@ -6,7 +6,11 @@ for file in ./*.$1; do
 | 
			
		||||
   if [[ $# > 1 && $2 == 'map' ]]; then
 | 
			
		||||
   	  map='-map 0:0';
 | 
			
		||||
   fi
 | 
			
		||||
   echo "ffmpeg -i '$file' -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map '../m4a/${file%$1}m4a'";
 | 
			
		||||
   ffmpeg -i "$file" -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map "../m4a/${file%$1}m4a";
 | 
			
		||||
   dest=../transcode_m4a
 | 
			
		||||
   if [[ !(-d $dest) ]]; then
 | 
			
		||||
      mkdir $dest
 | 
			
		||||
   fi
 | 
			
		||||
   echo "ffmpeg -i '$file' -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map '$dest/${file%$1}m4a'";
 | 
			
		||||
   ffmpeg -i "$file" -c:a libfdk_aac -profile:a aac_he -b:a 64k -movflags +faststart $map "$dest/${file%$1}m4a";
 | 
			
		||||
done
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user