lavfi-complex overlay time condition and audio files
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 : Any (tested with 0.37)
- Platform and Version : Any
Reproduction steps
- Do not use the latest mpv. Its ffmpeg contains a bug that prevents lavfi-complex from displaying pictures in other pictures. Either use:
- mpv 0.35 (0.36 has a bug that will cause this to crash)
- mpv 0.37 built before December 3rd 2023 (for windows builds, use the 20231203 version for example)
- mpv 0.37 built with ffmpeg 6.1 (latest release), NOT ffmpeg master.
See https://trac.ffmpeg.org/ticket/10795 for details on this particular scale2ref bug
- Have a mp3 file with a cover and an avatar file. You can use the sample files linked below.
- Launch mpv with
mpv song.mp3 --lavfi-complex="movie='avatar.jpg',format=yuva420p,geq=lum='p(X,Y)':a='if(gt(abs(W/2-X),W/2-235)*gt(abs(H/2-Y),H/2-235),if(lte(hypot(235-(W/2-abs(W/2-X)),235-(H/2-abs(H/2-Y))),235),255,0),255)'[logo];[logo][vid1]scale2ref=w=(ih*.128):h=(ih*.128)[logo1][base];[base][logo1]overlay=x='if(between(t,0,8)+between(t,120,128),W-(W*29/300),NAN)':y=H-(H*29/200)[vo]
Expected behavior
The song will play and display its cover, and the circle avatar in the lower right should disappear after 8 seconds (if(between(t,0,8) in the lavfi complex line)
Actual behavior
Avatar doesn't disappear after 8 seconds
Note : this works on video files.
Log file
Sample files
Avatar file : https://shelter.mahoro-net.org/~aterizak/mpv-bug/avatar.jpg
Song file : https://shelter.mahoro-net.org/~aterizak/mpv-bug/song.mp3
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 provided mpv command with the linked song and avatar files, comparing the audio-file behavior with the stated video-file behavior. Trace the lavfi-complex overlay time condition and confirm the avatar disappears after 8 seconds while the cover remains visible.
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
- Needs clarification
- Newbie friendliness
- 30/100