Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#7776 closed defect (invalid)

ffplay -autoexit -t 5 not working with large I-frame interval input video

Reported by: JouMxyzptlk Owned by:
Priority: normal Component: ffplay
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


Summary of the bug:

ffplay does not autoexit if the input video uses large keyintervals (like encodings with x264 --preset veryslow --tune anime)

How to reproduce:

C:\prog\ffmpeg\bin>ffplay -t 5 c:\tmp\ffplay-autoexit-not-working.mkv
ffplay version N-93139-ga9452fe6dc Copyright (c) 2003-2019 the FFmpeg developers

built with gcc 8.2.1 (GCC) 20190212
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.102 / 58. 47.102
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100

Input #0, matroska,webm, from 'c:\tmp\ffplay-autoexit-not-working.mkv':


ENCODER : Lavf57.71.100

Duration: 00:00:24.97, start: 0.020000, bitrate: 3079 kb/s

Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 24.39 fps, 24.39 tbr, 1k tbn, 47.95 tbc (default)

DURATION : 00:00:24.966000000

Stream #0:1(jpn): Audio: aac (LC), 48000 Hz, stereo, fltp (default)

DURATION : 00:00:24.681000000

4.99 A-V: -2.057 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0

This is how it plays (Windows 10 x64 1809 all updates):

It seems to wait for an I frame ?

Change History (4)

comment:1 by Gyan, 4 years ago

Priority: normalminor
Version: unspecifiedgit-master

autoexit isn't set by default. This works for me: ffplay -autoexit -t 5 ffplay-autoexit-not-working.mkv

comment:2 by JouMxyzptlk, 4 years ago

In the youtube video I hit ESC after five seconds to exit the video.
You can see the last line jumping around the values until "A-V: -4.354":
4.99 A-V: -4.354 fd= 0 aq= 0KB vq= 0KB sq= 0B f=0/0
It is counting the negative time up.

I rechecked right not: It is still doing that strange thing, but only for less than a half second now instead of forever. On the same machine, not even a reboot.
"A-V:" is between -0.282 and -0.341 when ffplay exits. Shouldn't that always be the same?

It never exited that testing video four hours ago when I tested before creating the bug and creating the youtube video. I saw the "A-V:" go below -30 seconds until I hit ESC.
Since I saw many reports about that I thought I had the actual reason since I had a difference between keyframe intervals up to 240 videos and others with smaller keyframe intervals.

This bug seems to be weird. I bet it will happen again.

Last edited 4 years ago by JouMxyzptlk (previous) (diff)

comment:3 by Carl Eugen Hoyos, 4 years ago

Component: undeterminedffplay
Keywords: autoexit miss exit removed
Priority: minornormal
Resolution: invalid
Status: newclosed

The default for ffplay is -noautoexit.

comment:4 by JouMxyzptlk, 4 years ago

Sorry, my bad.

Note: See TracTickets for help on using tickets.