Skip to content

MPG videos do not loop smoothly #18159

Description

@DavidHusicka

mpv Information

mpv v0.41.0 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
 built on Feb 11 2026 22:07:06
libplacebo version: v7.360.1
FFmpeg version: n8.0.1 (runtime n8.1.1)
FFmpeg library versions:
   libavcodec      62.11.100 (runtime 62.28.101)
   libavdevice     62.1.100 (runtime 62.3.101)
   libavfilter     11.4.100 (runtime 11.14.101)
   libavformat     62.3.100 (runtime 62.12.101)
   libavutil       60.8.100 (runtime 60.26.101)
   libswresample   6.1.100 (runtime 6.3.101)
   libswscale      9.1.100 (runtime 9.5.101)

Other Information

- Linux version: Arch Linux
- Kernel Version: 7.0.12-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 10 Jun 2026 08:58:02 +0000 x86_64 GNU/Linux
- GPU Model: Advanced Micro Devices, Inc. [AMD/ATI] Lucienne
- Mesa/GPU Driver Version: OpenGL version string: 4.6 (Compatibility Profile) Mesa 26.1.2-arch1.1
- Window Manager and Version: Not applicable (can reproduce elsewhere even on Windows) but GNOME 50.2
- Source of mpv: Arch Linux repositories
- Latest known working version: None
- Issue started after the following happened: This did not start recently

Reproduction Steps

Open any MPG file (ideally one that should loop seamlessly) and press L to enable infinite looping. Upon reaching end of the file, MPV does not start from the start of the file but from the first keyframe that is after the start of the video. This creates a jarring jump.

Expected Behavior

Looping MPG videos should start on the first frame of the video.

Actual Behavior

The playback jumps one keyframe further than it should.

Log File

output.txt

Sample Files

https://drive.google.com/file/d/1IpPYt95UJ4boNFF-0Qm6B_7RCuoCSRts/view?usp=sharing

It goes from 0 at 15 fps so you should see numbers below 10 for at least 2/3 of a second. Instead, you can see it here starting above 10.

I carefully read all instruction and confirm that I did the following:

  • I tested and confirmed that the issue exists with the latest release version or newer.
  • I provided all required information including system and mpv version.
  • I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of --log-file=output.txt.
  • I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
  • I attached the full, untruncated log file.
  • I attached the backtrace in the case of a crash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions