Seeking fails reporting corrupt file, VLC seeks without error
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 37k
- Forks
- 3.5k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Description
Important Information
Provide following Information:
- mpv version: 0.37.0
- macOS Version: 13.6.1
- Source of the mpv binary or bundle: brew
- If known which version of mpv introduced the problem: unknown
- Possible screenshot or video of visual glitches: N/A
This problem was reported against IINA in issue https://github.com/iina/iina/issues/4711.
Reproduction steps
Start the attached video playing and then press the ← key to seek backwards.
Expected behavior
Playback restarts at an earlier time and mpv continues playing the video.
Actual behavior
Playback terminates reporting the file is corrupt as shown here:
low-batt@gag issue-4711$ mpv --log-file=mpv.log --no-config 288381484-1ee2c539-96a7-4307-89bc-4dac010fcb75.webm
(+) Video --vid=1 (*) (vp8 1024x768)
VO: [libmpv] 1024x768 yuv420p
[mkv] Discarding potentially broken or useless index.
[mkv] no target for seek found
[mkv] Corrupt file detected. Trying to resync starting from position 112912...
[mkv] Cluster found at 463646.
Exiting... (End of file)
low-batt@gag issue-4711$
Full log attached. This clip from the log shows the warnings and error reported:
[ 5.828][v][mkv] Seeking to 1155027 to read header element 0x1c53bb6b.
[ 5.828][v][file] stream level seek from 131072 to 1155027
[ 5.828][v][mkv] Parsing cues...
[ 5.828][w][mkv] Discarding potentially broken or useless index.
[ 5.828][v][file] stream level seek from 1155110 to 312
[ 5.828][v][mkv] creating index until TC 795000000
[ 5.829][w][mkv] no target for seek found
[ 5.829][v][file] stream level seek from 1155110 to 112912
[ 5.829][v][mkv] seek done
[ 5.829][e][mkv] Corrupt file detected. Trying to resync starting from position 112912...
Playing this same video with VLC 3.0.20 I am able to seek backwards and forwards using the ← and → keys and playback restarts at the expected position and continues playing.
Log file
Sample files
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the backward seek with the attached WebM sample using mpv 0.37.0 and --no-config, then inspect the full mpv.log around the MKV cue parsing and resynchronization messages. Compare the behavior with VLC as reported. Done means seeking no longer terminates playback or reports the file as corrupt for this sample.
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