Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MPV video stutters when certain audio filter enabled #9591

Closed
f35f22fan opened this issue Dec 12, 2021 · 9 comments
Closed

MPV video stutters when certain audio filter enabled #9591

f35f22fan opened this issue Dec 12, 2021 · 9 comments
Labels

Comments

@f35f22fan
Copy link

Important Information

Provide following Information:

  • mpv version:

  • mpv 0.33.1 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
    built on UNKNOWN
    FFmpeg library versions:
    libavutil 56.70.100
    libavcodec 58.134.100
    libavformat 58.76.100
    libswscale 5.9.100
    libavfilter 7.110.100
    libswresample 3.9.100
    FFmpeg version: 4.4-6ubuntu5

  • Linux Distribution and Version:

  • Ubuntu 21.10 amd64

  • Source of the mpv binary

  • From standard repo (sudo apt-get install mpv)

  • If known which version of mpv introduced the problem:

  • I don't know

  • Window Manager and version:

  • KDE Plasma 5.23.4 (KDE Frameworks 5.88.0)

  • GPU driver and version:

  • Radeon RX 570, Mesa 21.3.1 - kisak-mesa PPA (Ubuntu's mesa has the same issue)

  • Possible screenshot or video of visual glitches
    https://www.youtube.com/watch?v=e2rap2x8K20

Reproduction steps

Add this to mpv.conf "af=lavfi=[loudnorm=I=-16:TP=-3:LRA=4]" and play a video file at speed > 1

Expected behavior

Video shouldn't stutter

Actual behavior

Video stutters, switching audio (language) channels takes quite some time.

Log file

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

Sample files

Not needed, works with random video files.

@CounterPillow
Copy link
Contributor

I can reproduce that switching audio channels makes the video playback lag temporarily in a really odd way, in version 0.34.0-68-g21cdc713bc

@ddemydenko
Copy link

ddemydenko commented Jan 13, 2022

Same issue:

mpv 0.32.0 Copyright © 2000-2020 mpv/MPlayer/mplayer2 projects
built on UNKNOWN
ffmpeg library versions:
libavutil 56.31.100
libavcodec 58.54.100
libavformat 58.29.100
libswscale 5.5.100
libavfilter 7.57.100
libswresample 3.5.100
ffmpeg version: 4.2.4-1ubuntu0.1

Linux Distribution and Version:
Ubuntu 20.04.3 LTS

Source of the mpv binary
From standard repo (sudo apt-get install mpv)

Window Manager and version:
GNOME 3.36.8

GPU driver and version:
Mesa Intel® UHD Graphics (CML GT2)

@dyphire
Copy link
Contributor

dyphire commented May 14, 2022

Can be reproduced on Windows(10/11).
Created a script to temporarily fix the issue: fix-avsync.lua.

@f35f22fan
Copy link
Author

f35f22fan commented Jun 2, 2022

Thanks @dyphire, though I placed it into the mpv config dir into the scripts subdir and it "worked" by turning off my audio filter "af=lavfi=[loudnorm=I=-16:TP=-3:LRA=4]" which obviously defeats the purpose.
I noticed this by launching a video and the non-voice sounds being really loud and the voice quiet, I checked mpv conf and the audio filter was there, so I thought it could be your lua script the culprit, and surely enough, after I removed the lua script and relaunched the video the audio filter started working fine as usual. Tested on Ubuntu 22.04.

@dyphire
Copy link
Contributor

dyphire commented Jun 3, 2022

@f35f22fan Yes, that's how this script works. This is only a temporary solution. We can only wait for this issue to be fixed.

@906018080
Copy link

ad-lavc-downmix=yes
audio-channels=stereo
I use 2.1 channel speakers myself
After testing, you can use the above command to force downmix stereo to solve most problems
Sadly not all formats support downmix stereo
Especially Bluray film source, almost all do not support
But fortunately, most of the film sources are now WEB-DL and the like, which is enough for now.
machine translation
Poor English

@Dudemanguy
Copy link
Member

Can anyone still reproduce this? I tried that filter on a video with multiple audio channels with a high playback speed (like >2) and it was fine when switching. Nothing like OP's example video.

@f35f22fan
Copy link
Author

The issue seems to be gone for me (Ubuntu 22.10, plasma 5). Didn't notice when it happened.

Well.. the video still stutters for a second or less when I switch audio tracks which in theory shouldn't cause video stutters, but this issue is peanuts because the video used to stutter forever which made movies unwatchable.

So it seems to me the issue is solved.

@Dudemanguy
Copy link
Member

Great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants