Using mplayer to determine length of audio/video file

后端 未结 5 2223
不思量自难忘°
不思量自难忘° 2021-02-14 00:21

The following works very nicely to determine the length of various audio/video files:

mplayer -identify file.ogg 2>/dev/null | grep ID_LENGTH
<
5条回答
  •  忘掉有多难
    2021-02-14 00:21

    There's another FF-way in addition to @codelogic's method, which doesn't exit with an error:

    ffprobe 
    

    and look for the duration entry.

    Or grep for it directly in the error stream:

    ffprobe  2> >(grep Duration)
    

提交回复
热议问题