[FFmpeg-trac] #9160(ffmpeg:new): ffmpeg stuck at initialization

FFmpeg trac at avcodec.org
Wed May 5 23:17:33 EEST 2021


#9160: ffmpeg stuck at initialization
------------------------------------+----------------------------------
             Reporter:  Gyan        |                    Owner:  (none)
                 Type:  defect      |                   Status:  new
             Priority:  important   |                Component:  ffmpeg
              Version:  git-master  |               Resolution:
             Keywords:  regression  |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+----------------------------------
Comment (by jeeb):

 Looking at the rate emulation handling, adding some logging to one of the
 obvious places seems to show that the variables seem to be more or less
 initialized, but that this place only gets called once.

 {{{
 diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
 index 3ad11452da..7f7cb515e4 100644
 --- a/fftools/ffmpeg.c
 +++ b/fftools/ffmpeg.c
 @@ -4221,8 +4221,13 @@ static int get_input_packet(InputFile *f, AVPacket
 **pkt)
              InputStream *ist = input_streams[f->ist_index + i];
              int64_t pts = av_rescale(ist->dts, 1000000, AV_TIME_BASE);
              int64_t now = av_gettime_relative() - ist->start;
 -            if (pts > now)
 +            if (pts > now) {
 +                av_log(NULL, AV_LOG_VERBOSE,
 +                       "Stream time: %"PRId64", ist->start: %"PRId64", "
 +                       "relative time from start: %"PRId64"...
 Waiting\n",
 +                       pts, ist->start, now);
                  return AVERROR(EAGAIN);
 +            }
          }
      }


 }}}

 Output from a simplified command that reproduces the issue:
 {{{
 ffmpeg -v verbose -debug_ts -ss 00:00:01 -re -i
 ~/Videos/ffmpeg_trac_9160/initfreeze.mkv -c:v rawvideo -map 0:v -f null -
 }}}


 Thus stops at:
 {{{
 Stream time: 14000, ist->start: 269070008287, relative time from start:
 9009... Waiting
 }}}

 Which means that:
 1. The values seem correct enough.
 2. get_input_packet returns AVERROR(EAGAIN) exactly once, and then
 seemingly no packets are read at all.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9160#comment:13>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list