Opened 6 weeks ago

Last modified 6 weeks ago

#6138 open defect

MP4 video is not displayed

Reported by: cgbug Owned by:
Priority: important Component: avformat
Version: git-master Keywords: mov edts regression
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Change History (6)

comment:1 Changed 6 weeks ago by cehoyos

  • Keywords mov edts regression added
  • Priority changed from normal to important
  • Reproduced by developer set
  • Status changed from new to open
$ ffmpeg -i aerials.mp4 -qscale 2 out.avi
ffmpeg version N-83477-gd96ebc5 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --enable-opengl
  libavutil      55. 46.100 / 55. 46.100
  libavcodec     57. 77.100 / 57. 77.100
  libavformat    57. 66.102 / 57. 66.102
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 73.100 /  6. 73.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'aerials.mp4':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    creation_time   : 2014-03-07T10:35:18.000000Z
  Duration: 00:04:03.23, start: 0.000000, bitrate: 838 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 854x480 [SAR 1:1 DAR 427:240], 709 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc (default)
    Metadata:
      creation_time   : 2014-03-07T10:35:18.000000Z
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      creation_time   : 2014-03-07T10:34:53.000000Z
      handler_name    : SoundHandler
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    major_brand     : dash
    minor_version   : 0
    compatible_brands: iso6avc1mp41
    ISFT            : Lavf57.66.102
    Stream #0:0(und): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 854x480 [SAR 1:1 DAR 427:240], q=2-31, 200 kb/s, 29.97 fps, 29.97 tbn, 29.97 tbc (default)
    Metadata:
      creation_time   : 2014-03-07T10:35:18.000000Z
      handler_name    : VideoHandler
      encoder         : Lavc57.77.100 mpeg4
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
    Stream #0:1(und): Audio: ac3 ([0] [0][0] / 0x2000), 44100 Hz, stereo, fltp, 192 kb/s (default)
    Metadata:
      creation_time   : 2014-03-07T10:34:53.000000Z
      handler_name    : SoundHandler
      encoder         : Lavc57.77.100 ac3
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (aac (native) -> ac3 (native))
Press [q] to stop, [?] for help
frame=    0 fps=0.0 q=0.0 Lsize=    5875kB time=00:04:03.25 bitrate= 197.8kbits/s speed= 284x
video:0kB audio:5701kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.042248%

comment:2 Changed 6 weeks ago by isasi

This video has a video edit list with duration zero.
elst
entry_count: 1
segment duration, media time, media rate, media rate fraction
0, 3003, 1, 0

With the edit list being parsed correctly from that patch on, we don't get any video. This is the same behavior when played through QuickTime? 10.4 or QuickTime? 7. Looks like ffmpeg is doing the right thing now.

comment:3 Changed 6 weeks ago by cgbug

It might be correct from the perspective of a video editor. But FFmpeg is also widely used by video playback applications. So there should really be an option to ignore the edit list. Maybe an option to ignore it completely (disabled by default) and an option to avoid discarding entire tracks like in this sample (enabled by default).

comment:4 Changed 6 weeks ago by cehoyos

What's wrong with -ignore_editlist 1?
Note that not ignoring the edit list is crucial for playback of many relevant samples.

comment:5 Changed 6 weeks ago by cgbug

My apologies, I didn't know that option already existed.

https://www.w3.org/2013/12/byte-stream-format-registry/isobmff-byte-stream-format.html
Section 3 mentions a single edit list with a duration of zero. But I am not sure how to interpret it.

comment:6 Changed 6 weeks ago by Aleksoid1978

if edit list have 1 entry with duration = 0 and media time > 0 - it must interpret as timestamp offset(delay) for all packets. And when read packet need add this offset to packet timestamp.
This idea/code is working in MPC-BE.

Last edited 6 weeks ago by Aleksoid1978 (previous) (diff)
Note: See TracTickets for help on using tickets.