3

I have a broken video file that its ffprobe (ffprobe -i movie.mkv) say its duration is about 2 hours, but the file contains only video data for first 8minutes (check by VLC Player).

How can i get the real duration (8minutes) using ffmpeg or ffprobe?

here is the output:

ffprobe version 0.7.13, Copyright (c) 2007-2011 the FFmpeg developers
  built on Aug  1 2012 21:08:35 with clang 3.1 (tags/Apple/clang-318.0.58)
  configuration: --prefix=/opt/local --enable-swscale --enable-avfilter --enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libvpx --enable-libspeex --disable-libopencore-amrnb --disable-libopencore-amrwb --mandir=/opt/local/share/man --enable-shared --enable-pthreads --cc=/usr/bin/clang --arch=x86_64 --enable-yasm --enable-gpl --enable-postproc --enable-libx264 --enable-libxvid
  libavutil    50. 43. 0 / 50. 43. 0
  libavcodec   52.123. 0 / 52.123. 0
  libavformat  52.111. 0 / 52.111. 0
  libavdevice  52.  5. 0 / 52.  5. 0
  libavfilter   1. 80. 0 /  1. 80. 0
  libswscale    0. 14. 1 /  0. 14. 1
  libpostproc  51.  2. 0 / 51.  2. 0
[matroska,webm @ 0x7f93dc01e600] Estimating duration from bitrate, this may be inaccurate
Input #0, matroska,webm, from 'Mission.mkv':
  Duration: 02:12:56.21, start: 0.000000, bitrate: 448 kb/s
    Stream #0.0: Video: mpeg4, yuv420p, 1280x528 [PAR 1:1 DAR 80:33], 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Stream #0.1: Audio: ac3, 48000 Hz, 5.1, s16, 448 kb/s (default)
jAckOdE
  • 2,402
  • 8
  • 37
  • 67
  • 1
    How do you know 8 minutes is the real duration? Are you using a recent build of ffmpeg? Development is very active. Can you show your command and the complete console output? – llogan Oct 24 '12 at 05:21
  • the output can not fit in comment box. see the answer i've just added – jAckOdE Oct 25 '12 at 00:09
  • I meant for you to edit/update your question with the additional information. – llogan Oct 25 '12 at 02:16
  • I edited the question, please check. – jAckOdE Oct 26 '12 at 13:57
  • What are you trying to do? Encode the first 8 minutes or use ffmpeg to detect broken files? – BlueVoodoo Oct 26 '12 at 14:50
  • i want to get the real duration of broken video file. ffprobe say its duration is "02:12:56.21". But real duration is not that much. – jAckOdE Oct 28 '12 at 23:57

0 Answers0