From the following ffmpeg -i
output, how would I get the length (00:35)--
$ ffmpeg -i 1video.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from \'/Users/d
Format (container) duration:
$ ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4
30.024000
Adding the -sexagesimal
option will use the HOURS:MM:SS.MICROSECONDS
time unit format:
0:00:30.024000
Duration of the first video stream:
$ ffprobe -v error -select_streams v:0 -show_entries stream=duration -of default=noprint_wrappers=1:nokey=1 input.mp4
30.000000
https://trac.ffmpeg.org/wiki/FFprobeTips#Duration