You are not logged in.
Hi
My first Arch install and as the topic states, I'm having problems with audio sync in mpv for the last days with a fresh install and trying everything that I've read.
The audio speed is fine but the video lags behind even though I've got 0 dropped frames. This happens with 720p, 1080p mkv's with DD5.1 and 4k HEVC BD folder structures with trueHD audio.
This is not stressing my CPU (cpu usage total 8-10%, mpv cpu usage 5-6%, mpv memory usage 127MB).
Audio is working fine with mp3, flac, youtube and other videos in Firefox is in sync.
Source is 23.976 and the TV is capable of doing 60, 50, 24 and 23.98 (23.976) Hz. I'm using mpv-plugin-xrandr to auto switch and can confirm it's switching the tv.
The weird part is that the sync is worse when the tv is at 23.976 than on 24Hz. In 24Hz it's almost not noticeable, but enough to irritate everyone. In 23.976 it's (I guess) up to half a second off but varies a bit.
Hardware:
Asus ROG Strix Z370 F
Intel i5-8400
HyperX 8GB (2x4GB) DDR4, 2400 CL15
Samsung 250GB NVMe SSD 960 EVO m.2
I've followed the official installation guide found here: https://wiki.archlinux.org/index.php/Installation_guide
I'm using systemd-boot as boot loader and XFCE with LXDM.
Additional install steps relevant to audio/video:
Installed xorg, xorg-server, xorg-xinit.
Installed xf86-video-intel, mesa (needed the xf86-video-intel if not everything was tearing and stuttering, even the desktop).
Installed libva-intel-driver, libva-utils
Added i915 to Modules in /etc/mkinitcpio.conf
Content of /etc/modprobe.d/i915.conf
options i915 enable_guc_loading=1 enable_gic_submission=1Verified with:
grep -iE 'vdpau | dri driver' /var/log/Xorg.0.log
[ 2.241] (II) intel(0): [DRI2] DRI driver: i965
[ 2.241] (II) intel(0): [DRI2] VDPAU driver: va_glContent of /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
Identifier "Intel Graphics"
Driver "intel"
Option "TearFree" "true"
EndSectionAlsa was choosen as default during install and due to Firefox needing PulseAudio I installed the following packages:
pulseaudio, pulseaudio-alsa, pulseaudio-equalizer, pavucontrol, xfce4-pulseaudio-plugin
Audio is working fine with mp3, flac, youtube and other videos in Firefox.
Installed from AUR
mpv-build-git (static ffmpeg version is 3.4.2)
mpv-plugin-xrandr
libbluray-git
mpv.conf
fs=yes
vo=gpu
hwdec=autompv is showing (shift+I) during play:
Dropped Frames is 0 for decoder and 5 output (due to the change to 23.976 from 50hz)
Display FPS is 23.976 specified) (also the tv reports this)
FPS is 23.976 for both specified and estimate
Pixel format is vaapi
hwdec is vaapi
A-V is 0.000
I guess my problems are due to misconfig of either the intel drivers or mpv but can't find a solution myself.
Since it's only playback in mpv that's out of sync it might be only a mpv config error?
Offline
Done a few more tests.
If I don't set audio-delay it varies a bit during playback.
If I set it, it seems to be stable during playback.
HEVC 2160p@59.940Hz requires +100ms audio-delay.
HEVC 2160p@50Hz is fine with 0 delay.
HEVC 2160p@23.976Hz requires +200ms.
h264 720p@50Hz is fine with 0 delay.
h264 720p@24Hz is almost fine with 0 delay but not quite there.
h264 1080p@23.976Hz requires +200ms.
Tv is capable of all these rates according to xrandr and does change accordingly thanks to the mpv-plugin-xrandr.
Not sure why as this is not a problem on the same tv/receiver and the same PC with windows 10, mpc-hc with madvr and LAV filters.
But I guess missing/wrong setup with gpu/audio-drivers and/or mpv-config?
Is there a script/function to change audio-delay based on source refreshrate?
Most content is 23.976 so setting +200ms in config is ok for now but not a solution to this problem.
Offline