Answers.Body: <p>Will just note, that I experienced this on one machine's vlc; when I tried on what would be presumably the same vlc version on the same OS (Ubuntu 20.04) but on a different machine, I did not get that error.</p>
  <p>Found also these threads:</p>
  <ul>
  <li><a href="https://bbs.archlinux.org/viewtopic.php?id=125478" rel="nofollow noreferrer">vlc problems. [solved] / Multimedia and Games / Arch Linux Forums</a></li>
  <li><a href="https://trac.ffmpeg.org/ticket/8075" rel="nofollow noreferrer">#8075 (ability to play video successfully depends on encoding fps) – FFmpeg</a></li>
  </ul>
  <p>... that imply this error might be due to graphics acceleration, and <em>not</em> something to do with the encoding of the video, or ffmpeg or vlc per se.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-02-05T20:14:56.410Z
Answers.LastActivityDate: 2023-02-05T21:12:50.943Z
Answers.LastEditDate: 2023-02-05T21:12:50.943Z
Answers.UserDisplayName: sdbbs
Body: <p>I have obtained a video, <code>ffprobe</code> for it shows:</p>
  <pre class="lang-none prettyprint-override"><code>$ ffprobe test-000000.mp4
  ffprobe version 4.2.7-0ubuntu0.1 Copyright (c) 2007-2022 the FFmpeg developers
  ...
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test-000000.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf58.29.100
    Duration: 00:01:25.76, start: 0.040000, bitrate: 187 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 608x448, 186 kb/s, 8.98 fps, 25 tbr, 12800 tbn, 50 tbc (default)
      Metadata:
        handler_name    : VideoHandler
  </code></pre>
  <p><code>mediainfo</code> for the same shows:</p>
  <pre class="lang-none prettyprint-override"><code>$ mediainfo test-000000.mp4
  General
  Complete name                            : test-000000.mp4
  Format                                   : MPEG-4
  Format profile                           : Base Media
  Codec ID                                 : isom (isom/iso2/avc1/mp41)
  File size                                : 1.92 MiB
  Duration                                 : 1 min 25 s
  Overall bit rate                         : 187 kb/s
  Writing application                      : Lavf58.29.100
  
  Video
  ID                                       : 1
  Format                                   : AVC
  Format/Info                              : Advanced Video Codec
  Format profile                           : High@L3
  Format settings                          : CABAC / 4 Ref Frames
  Format settings, CABAC                   : Yes
  Format settings, Reference frames        : 4 frames
  Codec ID                                 : avc1
  Codec ID/Info                            : Advanced Video Coding
  Duration                                 : 1 min 25 s
  Bit rate                                 : 186 kb/s
  Width                                    : 608 pixels
  Height                                   : 448 pixels
  Display aspect ratio                     : 4:3
  Frame rate mode                          : Variable
  Frame rate                               : 8.979 FPS
  Color space                              : YUV
  Chroma subsampling                       : 4:2:0
  Bit depth                                : 8 bits
  Scan type                                : Progressive
  Bits/(Pixel*Frame)                       : 0.076
  Stream size                              : 1.90 MiB (99%)
  Writing library                          : x264 core 155 r2917 0a84d98
  Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x3 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / 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=1 / keyint=25 / keyint_min=2 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=35.0 / qcomp=0.00 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
  Codec configuration box                  : avcC
  </code></pre>
  <p>When I start playing this video with <code>vlc</code>, it starts playing fine for 5-6 seconds, and then I get suddenly:</p>
  <pre><code>...
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -&gt; dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -&gt; dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -&gt; dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -&gt; dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -&gt; dropping frame (computer too slow ?)
  ...
  </code></pre>
  <p>I think also, the video at that point was showing a still frame for quite a long time (screen capture from a PC desktop), so it's quite possible the capturing process did not insert keyframes there or something.</p>
  <p>So, I was wondering, is it possible to fix this kind of an error message without reencoding (in <code>ffmpeg</code> that would be <code>-vcodec copy</code>), aside from inserting keyframes if that is necessary (though I'm not sure, maybe inserting keyframes does count like re-encoding in greater extent than <code>-vcodec copy</code>?)? If not, what would be the best way to fix this problem with ffmpeg, so I end up with minimal changes in existing quality?</p>
  
Tags: <ffmpeg><encoding><conversion>
Title: Can you fix videos with "error: more than 5 seconds of late video" without re-encoding with ffmpeg?
UserDisplayName: sdbbs
ThreadText: # Can you fix videos with "error: more than 5 seconds of late video" without re-encoding with ffmpeg?
  
  (Asked by: username_0 on 2023-02-04)
  
  I have obtained a video, `ffprobe` for it shows:
  
  ```none
  $ ffprobe test-000000.mp4
  ffprobe version 4.2.7-0ubuntu0.1 Copyright (c) 2007-2022 the FFmpeg developers
  ...
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'test-000000.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf58.29.100
    Duration: 00:01:25.76, start: 0.040000, bitrate: 187 kb/s
      Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 608x448, 186 kb/s, 8.98 fps, 25 tbr, 12800 tbn, 50 tbc (default)
      Metadata:
        handler_name    : VideoHandler
  
  ```
  
  `mediainfo` for the same shows:
  
  ```none
  $ mediainfo test-000000.mp4
  General
  Complete name                            : test-000000.mp4
  Format                                   : MPEG-4
  Format profile                           : Base Media
  Codec ID                                 : isom (isom/iso2/avc1/mp41)
  File size                                : 1.92 MiB
  Duration                                 : 1 min 25 s
  Overall bit rate                         : 187 kb/s
  Writing application                      : Lavf58.29.100
  
  Video
  ID                                       : 1
  Format                                   : AVC
  Format/Info                              : Advanced Video Codec
  Format profile                           : High@L3
  Format settings                          : CABAC / 4 Ref Frames
  Format settings, CABAC                   : Yes
  Format settings, Reference frames        : 4 frames
  Codec ID                                 : avc1
  Codec ID/Info                            : Advanced Video Coding
  Duration                                 : 1 min 25 s
  Bit rate                                 : 186 kb/s
  Width                                    : 608 pixels
  Height                                   : 448 pixels
  Display aspect ratio                     : 4:3
  Frame rate mode                          : Variable
  Frame rate                               : 8.979 FPS
  Color space                              : YUV
  Chroma subsampling                       : 4:2:0
  Bit depth                                : 8 bits
  Scan type                                : Progressive
  Bits/(Pixel*Frame)                       : 0.076
  Stream size                              : 1.90 MiB (99%)
  Writing library                          : x264 core 155 r2917 0a84d98
  Encoding settings                        : cabac=1 / ref=1 / deblock=1:0:0 / analyse=0x3:0x3 / me=dia / subme=1 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=0 / me_range=16 / chroma_me=1 / trellis=0 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / 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=1 / keyint=25 / keyint_min=2 / scenecut=40 / intra_refresh=0 / rc=crf / mbtree=0 / crf=35.0 / qcomp=0.00 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=1:1.00
  Codec configuration box                  : avcC
  
  ```
  
  When I start playing this video with `vlc`, it starts playing fine for 5-6 seconds, and then I get suddenly:
  
  ```
  ...
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
  [00007f066cc1bad0] avcodec decoder error: more than 5 seconds of late video -> dropping frame (computer too slow ?)
  ...
  
  ```
  
  I think also, the video at that point was showing a still frame for quite a long time (screen capture from a PC desktop), so it's quite possible the capturing process did not insert keyframes there or something.
  
  So, I was wondering, is it possible to fix this kind of an error message without reencoding (in `ffmpeg` that would be `-vcodec copy`), aside from inserting keyframes if that is necessary (though I'm not sure, maybe inserting keyframes does count like re-encoding in greater extent than `-vcodec copy`?)? If not, what would be the best way to fix this problem with ffmpeg, so I end up with minimal changes in existing quality?
  
  **Tags:** ffmpeg, encoding, conversion
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2023-02-05. Score: 1
  
  Will just note, that I experienced this on one machine's vlc; when I tried on what would be presumably the same vlc version on the same OS (Ubuntu 20.04) but on a different machine, I did not get that error.
  
  Found also these threads:
  
  * [vlc problems. [solved] / Multimedia and Games / Arch Linux Forums](https://bbs.archlinux.org/viewtopic.php?id=125478)
  * [#8075 (ability to play video successfully depends on encoding fps) – FFmpeg](https://trac.ffmpeg.org/ticket/8075)
  
  ... that imply this error might be due to graphics acceleration, and *not* something to do with the encoding of the video, or ffmpeg or vlc per se.
  
  
  ---
  
  