How to get .avi files length

后端 未结 3 799
梦毁少年i
梦毁少年i 2020-12-10 21:06

I am trying to loop over a directory of sub folders where every folder contains one .avi file that i want to retrieve its length in seconds.

I\'ve found PyMedia

3条回答
  •  眼角桃花
    2020-12-10 21:44

    Not sure if there is a platform independent way to do this, but if you only need this to work on windows then it looks like MediaInfo (below) has a command line interface which you can use to output details about video files, which could then be parsed to get the information. Not the prettiest solution but looks like it should work.

    http://mediainfo.sourceforge.net/en

提交回复
热议问题