mpv-player / mpv-player/mpv

Cycling audio when playing an online video causes cache to be invalidated and the video has to be redownloaded again

Open
#12,369 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Important Information

Provide following Information:

  • mpv version
mpv v0.36.0-103-g455487bdc9 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Aug 15 2023 22:25:24
libplacebo version: v5.264.1
FFmpeg version: n6.0
FFmpeg library versions:
   libavutil       58.2.100
   libavcodec      60.3.100
   libavformat     60.3.100
   libswscale      7.1.100
   libavfilter     9.3.100
   libswresample   4.10.100
  • Platform and Version
Linux (Linux  6.4.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 24 Aug 2023 00:38:14 +0000 x86_64 GNU/Linux)
  • Source of the mpv binary
    Built from source.
Reproduction steps
  1. Open an online video file: mpv --no-config -v -v https://www.youtube.com/watch\?v\=vpaPWuDQUcc
  2. Once it starts playing, press pause so it can cache some video
  3. Press the # key once to cycle the audio track. and you will see "No audio" displayed in OSD.
  4. Press the # again to switch back to "Audio (eng)"
  5. Notice how the cache was invalidated and the mpv is re-downloading the video all over again
Expected behavior

Please don't re-download the video just because an audio track was switched to a non-existing track.

Actual behavior

It deletes cache and re-downloads everything again.

Log file

Make a log file made with -v -v or --log-file=output.txt, paste it to
https://0x0.st/ or attach it to the github issue, and replace this text with a
link to it.

Sample files

n/a

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 provided mpv command and reviewing the linked verbose log. Trace the audio-track cycling path and cache invalidation behavior; done means switching to the nonexistent track and back no longer discards already cached video or re-downloads it.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.