[MPlayer-dev-eng] Delay at start of video playback

The Wanderer wanderer at fastmail.fm
Sun Sep 1 23:23:21 EEST 2024


With my just-built copy of MPlayer with current FFmpeg, when I play a
file that has a video stream (all the ones I've tried so far, at least),
it hangs for an extended period - with heavy CPU utilization - before it
brings up the video window. So far as I've measured, the total delay
appears to be on the order of 20 seconds. Once the video window appears,
things seem to work normally; CPU utilization goes down, playback is
normal, and I can seek around in the file without apparent issues.

With one such file, I appended '-v -v -v -v -v -v' to the command line,
and got in part the following output:

========8<========
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b746d80620]All info found
mp_seek(0x55b77974d5b0, 0, 65536)
mp_seek(0x55b77974d5b0, 0, 65536)
mp_seek(0x55b77974d5b0, 0, 65536)
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b746d80620]stream 0: start_time:
                        duration: 348.222875
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b746d80620]stream 1: start_time:
                        duration: 348.29932
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b746d80620]format: start_time:
                      duration: 348.29932 (estimate from stream)
bitrate=398 kb/s
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x55b746d80620]After
avformat_find_stream_info() pos: 117417 bytes read:134623 seeks:0 frames:12
==> Found video stream: 0
========8<========

When the hang occurs, the final visible message is that third mp_seek.
The following three messages appear one at a time, seconds apart, over
the delay period; the ones after that appear to come at a more normal
rate, without visible delays. Those three appear to come from
ffmpeg/libavformat/demux.c:estimate_timings(); that suggests that the
issue may be in that function, or possibly in a callsite for the same,
but the recent changes to that file (per 'git log' in the internal
FFmpeg checkout) do not seem to show anything that looks suspicious to
me.

I am not currently sure how to start investigating further, aside from
possibly trying to bisect (which I could do, but don't have the time for
this afternoon).

This is fairly significantly impairing to convenient use of MPlayer, but
does not block me from using it entirely.

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man.         -- George Bernard Shaw

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20240901/c0ed88e6/attachment.sig>


More information about the MPlayer-dev-eng mailing list