mpv-player / mpv-player/mpv

--video-pan and --video-align not working properly

Open
#7,675 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:video filter
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.32.0

  • macOS Version

10.13.6 (although I also noticed this issue on a Debian Linux)

  • Possible screenshot or video of visual glitches

https://vimeo.com/414270181

If you're not using git master or the latest release, update.
Releases are listed here: https://github.com/mpv-player/mpv/releases

Reproduction steps

In order to play multiple image files in sequence, each one with a different crop and duration, I'm combining zoom and video-pan options separated by the per-file markers as shown in the following code line:

mpv --fs --no-border --{ --video-zoom=1.85 --video-pan-y=0.02 --video-pan-x=0.14 --image-display-duration=6.21 41.jpg --} --{ --video-zoom=2.63 --video-pan-y=-0.01 --video-pan-x=-0.25 --image-display-duration=7.18 44.jpg --} --{ --video-zoom=1.41 --video-pan-y=-0.02 --video-pan-x=-0.08 --image-display-duration=5.56 60.jpg --} --{ --video-zoom=0.59 --video-pan-y=0.01 --video-pan-x=-0.03 --image-display-duration=2.46 13.jpg --} --{ --video-zoom=1.87 --video-pan-y=-0.04 --video-pan-x=0.01 --image-display-duration=2.36 76.jpg --}

I've also made attempts with "--video-align-y" and "--video-align-x", but it behaves in the same way.

The same code with videos (.mov) instead of images (.jpg) also doesn't work as expected.

Expected behavior

I expect each image (or video) to be played in a specific crop (zoom + video-pan or video-align) during all the time specified by the --image-duration or --length option.

Actual behavior

As shown in the vimeo link posted above: each file is been played in the specified crop, but before changing to the next one, it makes a quick new crop: A new crop of the actual image is flashed right before changing to the next file. It happens in about 90% of the times and I couldn't figure out the causes.

Log file

https://0x0.st/i2A-.txt

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 supplied mpv command with the linked log, focusing on transitions between files using per-file --video-pan, --video-align, zoom, and duration options. Trace how these options are applied when moving between the listed image and video files. Done means each file retains its requested crop for the full duration without a transitional flash.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
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.