check duration of audio files on the command-line

后端 未结 14 938
没有蜡笔的小新
没有蜡笔的小新 2021-02-05 00:13

I need to check the duration of a group of audio files. Is there a simple way to do this on the unix command-line?

> duration *

I have the a

14条回答
  •  不知归路
    2021-02-05 00:40

    on OSX

    Print the length of each audio file in the current dir:

    afinfo * | awk '/estimated duration/ { print $3 }'
    

    Include the filepath:

    afinfo * | awk '/File:/ { song=$2 } /estimated duration/ { print song, $3 }'
    

提交回复
热议问题