mpv-player / mpv-player/mpv

Playing EDL containing multiple audio formats + specific lavfi-complex chain results in big video pause or freeze if encoding

Open
#16,477 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

mpv Information
mpv 0.39.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
 built on Sep 28 2024 01:30:48
libplacebo version: v7.349.0 (v7.349.0-13-ga018ab0-dirty)
FFmpeg version: N-117212-g01c47dd23
FFmpeg library versions:
   libavcodec      61.20.100
   libavdevice     61.4.100
   libavfilter     10.5.100
   libavformat     61.8.100
   libavutil       59.40.100
   libswresample   5.4.100
   libswscale      8.4.100
Other Information
Microsoft Windows [Version 10.0.26100.4349]
Reproduction Steps

I've managed to reduce the problem down to this fairly simple command:

mpv --no-config "--lavfi-complex=[vid1]fps=30[vo];[aid1]dynaudnorm[ao]" "edl://!delay_open,media_type=video;1.mp4,length=60;!new_stream;2.mp3,length=30;3.wav,length=30"

At 14 seconds we get:
[lavfi] format change on aid1
The file '3.wav' is loaded 16 seconds early due to the way dynaudnorm filter works.
There is then a 16 second pause in the video playback but '2.mp3' continues playing, at 30 seconds the video begins playing again.

When encoding the result is much more of a problem:

mpv --no-config --o=out.mkv --of=matroska --ovc=libx264 "--lavfi-complex=[vid1]fps=30[vo];[aid1]dynaudnorm[ao]" "edl://!delay_open,media_type=video;1.mp4,length=60;!new_stream;1.mp3,length=30;2.wav,length=30"

At 14 seconds, the process freezes indefinitely and no more encoded output, it never recovers.

If I take out the fps filter it works, if I put dynaudnorm in --af instead of lavfi-complex, it works.

Expected Behavior
Actual Behavior
Log File

output.txt

Sample Files

samples.zip

I carefully read all instruction and confirm that I did the following:
  • I tested with the latest mpv version to validate that the issue is not already fixed.
  • 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.

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 EDL command, output.txt log, and samples.zip. Compare the lavfi-complex chain with the working --af and no-fps variants, then trace where the aid1 format change coincides with video pausing or encoding freezing. Done means playback and encoding continue through both audio format changes without the reported pause or hang.

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
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.