Skip to content

Playback drops most frames of a fragmented MP4 encoded with ffmpeg

The attached video file cannot be played. Only the first frame or sometimes a few frames are displayed, and all subsequent frames are dropped until the video is stopping at the end (with the last frame rendered).

The hardware is reasonable fast (Intel Core i7) for playing videos in general and the background load is at its minimum. I removed ~/.config/vlc and ~/.cache/vlc and run vlc --reset-config as well.

Do you know why this is happening? Can you point me into the direction where I could verify if the encoded video itself is broken in some way or VLC got a bug in decoding this video file, where other players like MPlayer do not have any trouble with its playback.

Thank you very much in advance and in the following see the detailed output of vlc and ffprobe.

--

Video file

dropping-frames-video

Details:

  • VLC:
    • latest stable 3.0.12
    • latest nightly build 4.0.0rc1~~git20211029+r89834+256ubuntu21.04.1
  • ffmpeg (encoding): 4.4
  • OS: Ubuntu 21.04
  • Platform: x64

Related issues

  • Fragmented mp4 file doesn't play back video properly (audio works) (#20369)

    The difference is I get a visible video. VLC is able to render a few frames, but dropping most of them. Sound I can not verify, because the software encoding this video does not encode any sound.

Latest nightly build - Output of vlc -v dropping-frames-video.mp4

vlc -v dropping-frames-video.mp4 
VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0~rc1~~git20211029+r89834+256~ubuntu21.04.1)
[00005596b3cbe580] main libvlc warning: Media library initialization failed
[00005596b3cbe580] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f4828c020d0] mp4 demux warning: elst box found
[00007f4828c020d0] mp4 demux warning: no chunk defined
[00007f4828c020d0] mp4 demux warning: STTS table of 0 entries
[00007f4828c020d0] mp4 demux: Fragment sequence discontinuity detected 1 != 0
Failed to open VDPAU backend libvdpau_va_gl.so: cannot open shared object file: No such file or directory
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
[00007f48101bd9e0] vaapi generic: Using Intel iHD driver for Intel(R) Gen Graphics - 21.1.1 ()
[00007f48101c45e0] gl gl: Initialized libplacebo v2.72.0 (API v72)
[00007f48100b2620] main subpicture warning: original picture size is undefined
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 244 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 715 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 1410 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 1271 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 894 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 1011 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 415 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 273 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 762 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 949 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 331 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 189 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 222 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 109 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 345 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 1052 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 503 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 77 ms)
[00007f48100aff40] main video output warning: picture is too late to be displayed (missing 34 ms)
QObject::~QObject: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread

Latest nightly build - Output of vlc --verbose 2 --no-color dropping-frames-video.mp4 Please see attached file: verbose-2-playback.log

Latest stable - Output of vlc -v dropping-frames-video.mp4

VLC media player 3.0.12 Vetinari (revision 3.0.12-1-0-gd147bb5e7e)
[0000564541036670] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[00007f687c001190] mp4 demux warning: elst box found
[00007f687c001190] mp4 demux warning: no chunk defined
[00007f687c001190] mp4 demux warning: STTS table of 0 entries
[00007f687c001190] mp4 demux: Fragment sequence discontinuity detected 1 != 0
[00007f6864003fc0] gl gl: Initialized libplacebo v2.72.0 (API v72)
libva info: VA-API version 1.10.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_10
libva info: va_openDriver() returns 0
[00007f687cc021e0] avcodec decoder: Using Intel iHD driver for Intel(R) Gen Graphics - 21.1.1 () for hardware decoding
[h264 @ 0x7f687cc36700] Using deprecated struct vaapi_context in decode.
[00007f687cc021e0] avcodec decoder warning: More than 11 late frames, dropping frame
[00007f687cc021e0] avcodec decoder warning: More than 11 late frames, dropping frame
[00007f687cc021e0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f687cc021e0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f687cc021e0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
[00007f686c0efb30] qt window warning: orphaned video window
QObject::~QObject: Timers cannot be stopped from another thread

Output of ffprobe dropping-frames-video.mp4

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'dropping-frames-video.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso6iso2avc1mp41
    encoder         : Lavf58.76.100
  Duration: 00:00:08.45, start: 0.767000, bitrate: 990 kb/s
    Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 
                      1920x1080, 989 kb/s, 3.43 fps, 25k tbr, 25k tbn, 50k tbc (default)
    Metadata:
      handler_name    : VideoHandler
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information