#16477Playing EDL containing multiple audio formats + specific lavfi-complex chain results in big video pause or freeze if encoding
Issue Details
Author
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
Sample Files
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.