M
M
myagi2010-11-12 20:29:06
fmpeg
myagi, 2010-11-12 20:29:06

Video file length in linux

Friends, please tell me what is the best way to get the duration of the video in ubuntu from the console.
I don't want to drag ffmpeg for this...

Answer the question

In order to leave comments, you need to log in

5 answer(s)
Z
z0rc, 2010-11-12
@myagi

mediainfo

P
pwlnw, 2010-11-13
@pwlnw

for some time now, ffmpeg has a separate program ffprobe specifically for this purpose.

A
Alexey, 2010-11-12
@alexxxst

# avinfo file.avi

K
kekekeks, 2010-11-13
@kekekeks

ffmpeg -i file. Outputs something like this:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Maria Holic - 01.mp4':
Metadata:
major_brand: isom
minor_version: 1
compatible_brands: isomavc1
Duration: 00:24: 00.00, start: 0.000000, bitrate: 541 kb/s
Stream #0.0(und): Video: h264, yuv420p, 480x272 [PAR 1:1 DAR 30:17], 408 kb/s, 29.97 fps, 29.97 tbr, 30k tbn , 59.94 tbc
Stream #0.1(und): Audio: aac, 48000 Hz, stereo, s16, 128 kb/s

I
Igor, 2017-05-22
Bat

packages.ubuntu.com/trusty/mediainfo

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question