How to fix? Warning: Video is late by xxx ms

Started by JanMeki, October 25, 2026, 02:56:42 PM

Previous topic - Next topic

JanMeki

Already when playing 1080p60 videos (h264) I'm getting this problem sometimes. It may have something to do with scaling, because when I use a zoom level of 1:4 or 1:2 I never get the issue but already when using fit to window (65%), 1:1 or 2:1 I'm getting major A/V desync. When opening a 1920x1080 video the zoom level is 69% but if I change it to fit to window, which is 65% I'm getting desync again. I've tried with and without hw acceleration enabled (nvdec). I'm not maxing my hardware, I've got plenty of CPU, dGPU, iGPU left.

Usage:
CPU: 15%
iGPU (Render/3D): 35%
dGPU (if used): ~5%

I can play 4k60 h264 videos fine with smplayer/mpv.

Linux Mint 22.3
Avidemux-x86_64_20261018_legacy.AppImage, Avidemux-x86_64_20260516_legacy.AppImage, ...
Intel/nVidia Optimus
1920x1080 display

eumagga0x2a

Make sure you use an accelerated video display in Avidemux, i.e. NOT "Qt" / "RGB", preferably VDPAU (but with the graphics wired to Intel this might not work), OpenGL / QtGl or XVideo, else all the scaling work is done on the CPU. The best options are to use VDPAU hw decoder with VDPAU display or LibVA decoder with LibVA display (whatever works). If NVDEC is used, it always downloads decoded pictures to the main memory that need to be re-uploaded to the graphics card for display. This may still be beneficial, but not as efficient as it can be.

Another huge cause of lag can be the status bar itself, especially at 60 fps. Try hiding it via the "View" menü or restrict refresh rate of the GUI in Avidemux Preferences to a lower value e.g. by enabling the cap and setting the redraw interval to 20 ms (1000/20 = 50 fps) or higher.

JanMeki

#2
I've been using video display: vdpau under display in the settings and nvdec under hw accel because it's the only one available (vdpau and libva are grayed out). It says Display: RGB on the status bar. Don't know why the intel decoder is not detected (I can use it in smplayer). This is on Skylake / Maxwell so there is no VP9 decoder and only the iGPU does h265 Main decoding. Maybe it's better to have hw acceleration off instead if multithreading is beneficial for VP9, h265 adn AV1? What are the optimal settings for my situation?

I don't see any difference capping the refresh rate of the gui. I feel like the scaling thing is the problem because if I use zoom 2:1 it plays in slomo and for every 1 sec the video is late by another 3000 ms.

Edit: Seems like Xvideo is the only video display mode that doesn't stretch the video frame. Is that the best one to use in my situation? Should I use hw acceleration with that one? OpenGL makes the avidemux ui unusable (garbled) so that's out of the question.

eumagga0x2a

Quote from: JanMeki on Today at 02:31:41 PMIt says Display: RGB on the status bar.

This means that VDPAU display is not available.

Quote from: JanMeki on Today at 02:31:41 PMDon't know why the intel decoder is not detected

Probably due to mismatch between the build and the host environment or due to another reason – please redirect stdout and stderr of appImage to a file and attach it to your reply here or post it on some pastebin equivalent as far as that service doesn't require login.

./relative/path/to/appImage 2>&1 | tee path/to/admlog.txt
Please replace paths containing personally identifiable information in a consistent way with placeholders prior to uploading the log.

Quote from: JanMeki on Today at 02:31:41 PMEdit: Seems like Xvideo is the only video display mode that doesn't stretch the video frame. Is that the best one to use in my situation?

Yes, sure.

Quote from: JanMeki on Today at 02:31:41 PMShould I use hw acceleration with that one?

As long as a closed-loop hw accel (libva hw decoder + libva display or VDPAU decoder + VDPAU display) is not available, NVDEC will always be beneficial. Therefore yes, use NVDEC then.

Quote from: JanMeki on Today at 02:31:41 PMOpenGL makes the avidemux ui unusable (garbled) so that's out of the question.

Could you please eventually do build Avidemux locally to have a clear picture of what works and what doesn't?