Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

list all audio files with duration bash ffprobe

LENGTH=0; for file in *; do LENGTH="$LENGTH+$(ffprobe -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$file" 2>/dev/null)"; done; echo "$LENGTH" | bc
Comment

list all audio files with duration bash ffprobe

# For an output like this
  # 00:07:22 first.mp3
  # 00:02:33 second.mp3
  # 00:04:04 third.mp3

# Use this
for file in *.mp3
do
  echo -n $(ffprobe $file 2>&1 | grep 'Duration' | cut -d',' -f1 | cut -d' ' -f4 | cut -d'.' -f1)
  echo " $file"
done 
Comment

PREVIOUS NEXT
Code Example
Shell :: macos netcat write message 
Shell :: install dot-prop 
Shell :: Disable all git advice 
Shell :: color git 
Shell :: get sentence in folder 
Shell :: Use dropbox as private git repository 
Shell :: fatal authentication failed for git psuh 
Shell :: check if internet is available shell script 
Shell :: export database ccli mysql 
Shell :: FingerprintAIO from ngx 
Shell :: pacman export package list 
Shell :: npm view dist-tags 
Shell :: Add the GitLab package repository 
Shell :: How to push the code in a perticular branch 
Shell :: inspect changes after git fetch 
Shell :: cmd echo datetime in loop 
Shell :: linux create user with expiration 
Shell :: chrome saved cache gif 
Shell :: how to migrate from yarn to npm 
Shell :: arch linux turn on wifi 
Shell :: how to change apache port in xampp 
Shell :: thunderbird reply 
Shell :: thelinuxterminal.com grep command 
Shell :: cups server cannot cancel jobs 
Shell :: imstall prettier 
Shell :: Cannot find device "tun0" 
Shell :: remove docker completely orcal linx 
Shell :: Deploy single page application Angular: 404 Not Found nginx 
Shell :: gimp front color not enabled 
Shell :: how to select an object based a field which is like a string jq 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =