mpv-player / mpv-player/mpv

playback lagging when watching stream for long time

Open
#5,419 13 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

core core:stream
Dominant language
C
Stars
37k
Forks
3.5k
Avg merge
1d 10h
Merged PRs (30d)
22

Description

mpv version and platform

Fedora 27, stock mpv version - mpv-0.27.0-1.fc27.x86_64

Reproduction steps

Start streaming a webcam and note the lag.
Sample of my command pointing to a public camera (with a not that correct time)
mpv --no-cache --aid=no 'http://216.168.105.248:12122/mjpg/video.mjpg'
Note the lag between the time shown in the stream and current time. At home over local network it lags 3-5 seconds at the beginning.
Leave it running for a day or more
now the lag is closer to a minute or more

Expected behavior

A few seconds delay constant over time.

Actual behavior

The lag slowly increases over time, close to a minute after a day. Only way to resync seems to be restart the stream.

Log file

sprunge.us gave error 500 so I put a log on https://pastebin.com/9KDX25Dz

Sample files

Sample files needed to reproduce this issue can be uploaded to https://0x0.st/
or similar sites. (Only needed if the issue cannot be reproduced without it.)
Do not use garbage like "cloud storage", especially not Google Drive.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the supplied mpv command and review the linked Pastebin log. Observe the delay at startup and after extended playback; done means the stream's delay remains approximately constant instead of growing over a day.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
audio-video-rtc
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.