[FFmpeg-user] ffmpeg -i reports a video of length 03:17.53, but splitting into frames at 2 fps only results in one frame

Griffin Smith griffin at urbint.com
Mon Jul 15 21:38:59 EEST 2019


Per a suggestion, I also tried re-encoding as h.264 and the resulting video
had a duration of .03 seconds:

  $ ffmpeg -i video.mpg -codec:v libx264 output.mp4

ffmpeg version n4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181127
  configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls
--enable-gpl --enable-ladspa --enable-libaom --enable-libass
--enable-libbluray --enable-libdrm --enable-l
ibfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883
--enable-libjack --enable-libmodplug --enable-libmp3lame
--enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg
--enable-libopus --enable-libpulse --en
able-libsoxr --enable-libspeex --enable-libssh --enable-libtheora
--enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxcb
--enable-libxml2 --enable-libxvid
--enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
[mpeg2video @ 0x558ea73f6b80] Invalid frame dimensions 0x0.
    Last message repeated 4 times
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 7 with DTS
62915937, packet 8 with DTS 8589979592
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 22 with DTS
62960937, packet 23 with DTS 8590024592
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 37 with DTS
63005937, packet 38 with DTS 8590069592
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 52 with DTS
63050936, packet 53 with DTS 8590114591
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 67 with DTS
63095936, packet 68 with DTS 8590159591
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 82 with DTS
63140936, packet 83 with DTS 8590204591
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 97 with DTS
63185936, packet 98 with DTS 8590249591
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 112 with DTS
63230936, packet 113 with DTS 8590294591
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 127 with DTS
63275936, packet 128 with DTS 8590339591
[mpeg @ 0x558ea73f4d40] DTS discontinuity in stream 0: packet 142 with DTS
63320936, packet 143 with DTS 8590384591
Input #0, mpeg, from 'SDMH1-SDMHA_111717_25_1.MPG':
  Duration: 00:03:17.53, start: 95444.217689, bitrate: 3602 kb/s
    Stream #0:0[0x1e0]: Video: mpeg1video, yuv420p(tv), 720x480 [SAR 1:1
DAR 3:2], 3600 kb/s, 30 fps, 30 tbr, 90k tbn, 30 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mpeg1video (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x558ea7406880] using SAR=1/1
[libx264 @ 0x558ea7406880] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x558ea7406880] profile High, level 3.0, 4:2:0, 8-bit
[libx264 @ 0x558ea7406880] 264 - core 157 r2945 72db437 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options:
cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1
psy_rd=1.00:0.00 mixed_
ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11
fast_pskip=1 chroma_qp_offset=-2 threads=15 lookahead_threads=2
sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
constrained_intra=0 bframes=3 b_pyramid=2 b
_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1
crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
  Metadata:
    encoder         : Lavf58.20.100
    Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p,
720x480 [SAR 1:1 DAR 3:2], q=-1--1, 30 fps, 15360 tbn, 30 tbc
    Metadata:
      encoder         : Lavc58.35.100 libx264
    Side data:
      cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
frame=    1 fps=0.0 q=29.0 Lsize=      10kB time=26:19:05.40 bitrate=
0.0kbits/s dup=0 drop=5937 speed=9.6e+04x
video:9kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 8.529048%
[libx264 @ 0x558ea7406880] frame I:1     Avg QP:25.99  size:  9018
[libx264 @ 0x558ea7406880] mb I  I16..4: 30.8% 61.0%  8.2%
[libx264 @ 0x558ea7406880] 8x8 transform intra:61.0%
[libx264 @ 0x558ea7406880] coded y,uvDC,uvAC intra: 48.6% 48.8% 0.7%
[libx264 @ 0x558ea7406880] i16 v,h,dc,p: 32% 40% 11% 17%
[libx264 @ 0x558ea7406880] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 25% 23% 37%  3%
 2%  1%  3%  2%  4%
[libx264 @ 0x558ea7406880] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 47% 23% 10%  3%
 3%  4%  3%  4%  3%
[libx264 @ 0x558ea7406880] i8c dc,h,v,p: 51% 29% 19%  1%
[libx264 @ 0x558ea7406880] kb/s:2164.32

$ ffmpeg -i output.mp4
ffmpeg version n4.1.3 Copyright (c) 2000-2019 the FFmpeg developers
  built with gcc 8.2.1 (GCC) 20181127
  configuration: --prefix=/usr --disable-debug --disable-static
--disable-stripping --enable-fontconfig --enable-gmp --enable-gnutls
--enable-gpl --enable-ladspa --enable-libaom --enable-libass
--enable-libbluray --enable-libdrm --enable-libfreetype --enable-libfribidi
--enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmodplug
--enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb
--enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2
--enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxcb --enable-libxml2
--enable-libxvid
--enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-version3
  libavutil      56. 22.100 / 56. 22.100
  libavcodec     58. 35.100 / 58. 35.100
  libavformat    58. 20.100 / 58. 20.100
  libavdevice    58.  5.100 / 58.  5.100
  libavfilter     7. 40.101 /  7. 40.101
  libswscale      5.  3.100 /  5.  3.100
  libswresample   3.  3.100 /  3.  3.100
  libpostproc    55.  3.100 / 55.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'output.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf58.20.100
  Duration: 00:00:00.03, start: 94745.400000, bitrate: 2479 kb/s
    Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p,
720x480 [SAR 1:1 DAR 3:2], 2330 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc
(default)
    Metadata:
      handler_name    : VideoHandler
At least one output file must be specified

It's also worth noting that the original video played just fine in VLC.

Griffin Smith
Senior Software Engineer

-

Urbint <https://urbint.com/>


More information about the ffmpeg-user mailing list