mediainfo

How to find duration of a video file using mediainfo in seconds or other formats?

北战南征 提交于 2019-11-30 04:33:33
How can I find duration of a video file in miliseconds i.e. in integer in deterministic way. I have used ffprobe to get the duration but it doesn't give duration for all file formats. Harit Vishwakarma Use the following commands: i) To get the duration of video stream: $ mediainfo --Inform="Video;%Duration%" [inputfile] ii) To get the duration of the media file: $ mediainfo --Inform="General;%Duration%" [inputfile] iii) To get the duration of audio stream only: $ mediainfo --Inform="Audio;%Duration%" [inputfile] iv) To get values of more than one parameter: $ mediainfo --Inform="Video;%Width%,

How to find duration of a video file using mediainfo in seconds or other formats?

末鹿安然 提交于 2019-11-29 01:56:12
问题 How can I find duration of a video file in miliseconds i.e. in integer in deterministic way. I have used ffprobe to get the duration but it doesn't give duration for all file formats. 回答1: Use the following commands: i) To get the duration of video stream: $ mediainfo --Inform="Video;%Duration%" [inputfile] ii) To get the duration of the media file: $ mediainfo --Inform="General;%Duration%" [inputfile] iii) To get the duration of audio stream only: $ mediainfo --Inform="Audio;%Duration%"