View previous topic :: View next topic |
Author |
Message |
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Fri Aug 10, 2018 6:27 am Post subject: Audio/Video desynchronisation detected! mpv 1080p.h264. |
|
|
Hi,
I get the following message when trying to play 1080p bluray h264 files.
Audio/Video desynchronisation detected! Possible reasons include too slow hardware, temporary CPU spikes, broken drivers, and broken files. Audio position will not match to the video (see A-V status field).
There is some marginal desync for 720p bluray files but i ''ll settle for that. For 1080p video the desync is significant.
Following are some of the outputs
Code: | lspci -kk | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
lspci -kk | grep Display
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
lspci -kk | grep Audio
00:1b.0 Audio device: Intel Corporation NM10/ICH7 Family High Definition Audio Controller (rev 02)
Subsystem: Toshiba America Info Systems NM10/ICH7 Family High Definition Audio Controller
|
USE flags for mpv and ffmpeg
https://paste.pound-python.org/raw/w1jcQm2TjkwGiIS03FOa/
https://paste.pound-python.org/show/ocKxZdObTcQSDGbfzPha/
Code: | ~ $ cat ~/.config/mpv/mpv.conf | grep -v '^[#]'
profile=opengl-hq
video-sync=display-resample
interpolation
tscale=oversample
cache=153600
|
Any suggestions to resolve the issue will be appreciated.
Thanks
Rejoy |
|
Back to top |
|
|
mir3x Guru
Joined: 02 Jun 2012 Posts: 455
|
Posted: Fri Aug 10, 2018 10:40 am Post subject: |
|
|
check vainfo command
and maybe try mpv with --hwdec=vaapi ? _________________ Sent from Windows |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Fri Aug 10, 2018 10:50 am Post subject: |
|
|
hi,,
this is the ouput of vaininfo
Code: | ~ $ vainfo
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/drivers/i915_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit |
Thanks
Rejoy |
|
Back to top |
|
|
mir3x Guru
Joined: 02 Jun 2012 Posts: 455
|
Posted: Fri Aug 10, 2018 11:00 am Post subject: |
|
|
I'm not using intel vaapi since long time so Im just kind of guessing:
it shoudl help:
https://wiki.gentoo.org/wiki/Intel#Intel_DDX
sna Enable SandyBridge's New Acceleration (useful on all chipsets, not just SandyBridge)
Jaglover that whole playback is strange, I remember I had big mkv lagging on my old Core 2 duo on fullhd
but they are fluent on tablet with 2560x1600 with Kirin 950 and tablet is not getting warm even a little ....
EDIT: I see you are using glamor and ddx is deprecated so changing /etc/X11/xorg.conf.d/20-modesetting.conf as described should work ? _________________ Sent from Windows |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Aug 10, 2018 5:32 pm Post subject: |
|
|
An i945 is nowhere near powerful enough for temporal rescaling and opengl-hq. You might have some results using --vo=xv or =x11, depending on the CPU. |
|
Back to top |
|
|
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Sat Aug 11, 2018 1:27 pm Post subject: |
|
|
Hi,
I am confused as to how to go about making changes. According to https://wiki.gentoo.org/wiki/Intel#Feature_support opengl 2.1 can be used for gen 3 chipset.
My /etc/X11/xorg.conf.d/ has only a single file 20opengl.conf and there is nothing in there.
Code: |
$ cat 20opengl.conf
Section "Files"
EndSection |
Is there a way to check the version of opengl. glxinfo doesn't work unless I install x11-apps/mesa-progs. Will installing x11-apps/mesa-progs help resolve the issues and should USE flags egl gles2 be enabled.?
I created both files 20-intel.conf and 20-modesetting.conf as described in https://wiki.gentoo.org/wiki/Intel#xorg.confand will use them alternatively . X doesn't start if I have 20-modesetting.conf. Also the CPU usage is high anywhere between 60-100% and there is heating.
Though I had initially mentioned the problem is more pronounced with 1080p as compared with 720p even 720p videos start stuffering after a few minutes with CPU usage spiking up to a 100% even with --vo=xv
CPU performance seems slightly better without the 20-intel.conf and the 720p videos don't stutter as much.
vainfo still gives the error
Code: | ~ $ vainfo
libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/va/drivers/i915_drv_video.so
libva info: va_openDriver() returns -1
vaInitialize failed with error code -1 (unknown libva error),exit
|
Thanks
Rejoy
[Moderator edit: added [code] tags to preserve output layout; removed code tag from URL so that readers can click it. -Hu] |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sat Aug 11, 2018 11:03 pm Post subject: |
|
|
Rojoy ... same card here:
lspci -kk | egrep '(VGA|Display)': | 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03) |
Rejoy wrote: | X doesn't start if I have 20-modesetting.conf. Also the CPU usage is high anywhere between 60-100% and there is heating. |
In my experience you won't get accelerated graphics with modesetting, however, you need to provide 'BusID "pci:0:2:0"' in 30-modsetting.conf (see 'lspci' output above) ... that may be why it doesn't start.
Rejoy wrote: | Though I had initially mentioned the problem is more pronounced with 1080p as compared with 720p even 720p videos start stuffering after a few minutes with CPU usage spiking up to a 100% even with --vo=xv |
That is because you have no hardware decoding, so everything has to be done in CPU. What you're seeing is simply the result of the decoder stuggling to handle those resolutions ... even 720p would be a struggle with a GMA and the typical CPU shipped with them. In my case <720p would play ok with mpv and '-vo opengl-legacy', but that support has been removed (at least in -9999) and now you're stuck with either x11, or xv ... both of which are terrible. Yes, rev3 should support opengl-2.1 but that doesn't mean that mesa is going to ... the last decent x11 for me was mesa-12.0.1 and xf86-video-intel-2.99.917_p20160621. Unfortunately upstream doesn't care to support "legacy" hardware.
Rejoy wrote: | vainfo still gives the error |
The card doesn't support vaapi.
best ... khay |
|
Back to top |
|
|
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Sun Aug 12, 2018 4:20 am Post subject: |
|
|
Hi,
I was using Crunchbang linux prior to installing gentoo and never experienced problems of this kind. So I don't think the hardware is severely limited for playing 1080 files or at least not to this extent.
I am posting the mpv logs
1. for the 720p file
https://paste.pound-python.org/show/K2UODXzFPZiqA9LZN7LL/
2 For the 1080p file
https://paste.pound-python.org/show/JDSyBkJPHQK1kggWozEs/
3 glxinfo
https://paste.pound-python.org/show/gsNW4u2cts9iDhF0cKF3/
The only errors are X11 error: GLXBadFBConfig when creating open gl contexts higher than version 2.1. The openGL context for version 2.1 does get created though.
Other the playing videos, the CPU and RAM usage of the m/c is quite low.
Code: | /usr/lib/va/drivers $ ls
i965_drv_video.la nvidia_drv_video.so vdpau_drv_video.la
i965_drv_video.so s3g_drv_video.so vdpau_drv_video.so |
so the required library files for the i915 drivers aren't even there in the location. However lspci gives the following output
Code: | 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
Subsystem: Toshiba America Info Systems Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller
Kernel driver in use: i915 |
So vaapi is not supported I guess. But then how did debian get the video to work...
Thanks
Rejoy |
|
Back to top |
|
|
Anon-E-moose Watchman
Joined: 23 May 2008 Posts: 6098 Location: Dallas area
|
Posted: Sun Aug 12, 2018 10:19 am Post subject: |
|
|
Rejoy wrote: | So vaapi is not supported I guess. But then how did debian get the video to work... |
It was probably using either the xv or opengl "software" drivers.
Even on my faster chip, I've had the hardware decoding look pretty crappy.
As far as debian working, what version of xorg-server, x drivers and mesa was it using?
Edit to add: and as khayyam says sometimes the older drivers/mesa worked but the newer stuff doesn't work as well on older hardware.
Edit to add2: the drivers under /usr/lib/va are put there by mesa, if you don't have any i915 drivers then you probably didn't have the i915 flag turned on for mesa.
From the link earlier about ddx, etc
Code: | Portage uses the VIDEO_CARDS variable, which expands into the USE_EXPAND variable, for enabling support for various graphics cards. Assuming the x11-base/xorg-drivers package has already been installed, setting the VIDEO_CARDS variable in /etc/portage/make.conf will pull in the correct video driver:
FILE /etc/portage/make.conf Gen 2 and Gen 3
VIDEO_CARDS="intel i915" |
_________________ PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Aug 12, 2018 1:39 pm Post subject: |
|
|
Rejoy wrote: | I was using Crunchbang linux prior to installing gentoo and never experienced problems of this kind. So I don't think the hardware is severely limited for playing 1080 files or at least not to this extent. |
Rejoy ... again, it's not just hardware:
FAQ: OpenGL wiki wrote: | Intel tends to phase out their integrated GPUs relatively quickly, dropping support for integrated GPUs that were released only a few years before. Once they drop support, they will not provide new drivers that expose higher versions of OpenGL. |
So, if the version of mesa, or xf86-video-intel, is higher than the versions provided by crunchbang/debian then it may nolonger provide opengl-2.1 (or work in the same manner). Looking at your mpv.log is does seem to be using opengl-2.1, but I'm not sure if that is correct or not, based on the above (it doesn't work here, and as I said mpv dropped support for "-vo opengl-legacy").
Rejoy wrote: | Code: | /usr/lib/va/drivers $ ls
i965_drv_video.la nvidia_drv_video.so vdpau_drv_video.la
i965_drv_video.so s3g_drv_video.so vdpau_drv_video.so |
so the required library files for the i915 drivers aren't even there in the location. |
Those are not video drivers they are vaapi drivers ... different thing, and your card doesn't support hardware acceleration.
Rejoy wrote: | So vaapi is not supported I guess. But then how did debian get the video to work... |
Debian stable tends to be some years behind upstream ... so, that probably explains it. As I said, I used to have a perfectly functioning x11, and video playback (though not 1080p), in the last year or so it's beyond crap, it's craptastic!
best ... khay |
|
Back to top |
|
|
Josef.95 Advocate
Joined: 03 Sep 2007 Posts: 4553 Location: Germany
|
Posted: Mon Aug 13, 2018 8:58 pm Post subject: Audio/Video desynchronisation detected! mpv 1080p.h264. |
|
|
Rejoy wrote: | Code: | # equery uses ffmpeg
[...]
-cpu_flags_x86_3dnow
-cpu_flags_x86_3dnowext
-cpu_flags_x86_aes
-cpu_flags_x86_avx
-cpu_flags_x86_avx2
-cpu_flags_x86_fma3
-cpu_flags_x86_fma4
-cpu_flags_x86_mmx
-cpu_flags_x86_mmxext
-cpu_flags_x86_sse
-cpu_flags_x86_sse2
-cpu_flags_x86_sse3
-cpu_flags_x86_sse4_1
-cpu_flags_x86_sse4_2
-cpu_flags_x86_ssse3
-cpu_flags_x86_xop |
| It is all disabled, this is probably no good idea.
For help finding your supported cpu_flags_x86_* flags you can using the cpuid2cpuflags tool. |
|
Back to top |
|
|
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Tue Aug 14, 2018 5:49 am Post subject: |
|
|
Hi,
Khay maybe right. It must be the case of upstream packages not supporting old hardware well enough. Meanwhille I booted my laptop on Puppy linux slacko using drivedroid image on my old android phone and the Gnome-mplayer plays the 1080p video flawlessly without CPU overload or heating. I tried installing gstreamer and the required plugins. media-plugins/gst-plugins-xvid, media-plugins/gst-plugins-x264, media-plugins/gst-plugins-libav. There is improvement when playing the 720p video. The CPU is around 35-50% and the video clarity is much better. Will have to learn how to get the subtitles working and controls though. Playing the 1080p video throws the error
Code: | WARNING debug information: (2902): gst_base_sink_is_too_late (): /GstPlayBin:playbin/GstPlaySink:playsink/GstBin:vbin/GstXvImageSink:xvimagesink0: There may be a timestamping problem, or this computer is too slow. WARNING A lot of buffers are being dropped. |
Code: | /usr/src/linux $ cat .config | grep 915
# CONFIG_MFD_DA9150 is not set
CONFIG_DRM_I915=y
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
CONFIG_SND_HDA_I915=y
rejoy@Rejoy /usr/src/linux $ cat .config | grep FRAME
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FRAME_WARN=1024
CONFIG_FRAME_POINTER=y
CONFIG_UNWINDER_FRAME_POINTER=y
rejoy@Rejoy /usr/src/linux $ cat .config | grep FBDEV
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
usr/src/linux $ cat .config | grep DRM
CONFIG_DRM=y
CONFIG_DRM_MIPI_DSI=y
# CONFIG_DRM_DP_AUX_CHARDEV is not set
# CONFIG_DRM_DEBUG_MM is not set
# CONFIG_DRM_DEBUG_MM_SELFTEST is not set
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_KMS_FB_HELPER=y
CONFIG_DRM_FBDEV_EMULATION=y
CONFIG_DRM_FBDEV_OVERALLOC=100
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_AMDGPU is not set
# CONFIG_DRM_NOUVEAU is not set
CONFIG_DRM_I915=y
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_VGEM is not set
# CONFIG_DRM_VMWGFX is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
CONFIG_DRM_PANEL=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
# CONFIG_DRM_ANALOGIX_ANX78XX is not set
# CONFIG_DRM_HISI_HIBMC is not set
# CONFIG_DRM_TINYDRM is not set
# CONFIG_DRM_LEGACY is not set
# CONFIG_DRM_LIB_RANDOM is not set
|
Support for frame buffer devices is not set. Also # CONFIG_DRM_I915_ALPHA_SUPPORT is not set and # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
Code: | ~ $ glxinfo | grep direct
direct rendering: Yes
|
Code: | $ glxgears
Running synchronized to the vertical refresh. The framerate should be
approximately the same as the monitor refresh rate.
223 frames in 5.0 seconds = 44.351 FPS
299 frames in 5.0 seconds = 59.703 FPS
298 frames in 5.0 seconds = 59.459 FPS
298 frames in 5.0 seconds = 59.456 FPS
298 frames in 5.0 seconds = 59.469 FPS |
Code: | ~ $ cat /var/log/Xorg.0.log | grep EE
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 32.998] (EE) Failed to load module "fbdev" (module does not exist, 0) |
Code: | $ cat /var/log/Xorg.0.log | grep ??
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 32.644] (--) PCI:*(0:0:2:0) 8086:27a2:1179:0005 rev 3, Mem @ 0xffd80000/524288, 0xe0000000/268435456, 0xffd40000/262144, I/O @ 0x0000cff8/8, BIOS @ 0x????????/131072
|
Should change VIDEO_CARDS = "intel i915" to VIDEO_CARDS = "intel i915 vesa fbdev" in make.conf. Would that make a difference.
I 'll check on the suggestion for enabling the required CPU flags.
Thanks
Rejoy |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Aug 14, 2018 7:32 am Post subject: |
|
|
Rejoy ...
very breifly, Josef.95's suggestion is advised, with CPU_FLAGS there will be additional optimisation for ffmpeg, etc. I would run 'cpuid2cpuflags' and add the output to CPU_FLAGS in make.conf ... and then rebuild the effected packages using '--changed-use'.
VIDEO_CARDS="vesa fbdev" wouldn't make any difference, inteldrmfb is a framebuffer, and i915 is designed to use that framebuffer.
If you reboot puppy linux then I would save the xorg.0.log, versions of mesa/xorg in use, /proc/config.gz (if it exists) ... these might provide a clue.
best ... khay |
|
Back to top |
|
|
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Tue Aug 14, 2018 10:27 am Post subject: |
|
|
Hey thanks Khay and Josef.95 .. Josefs.95's suggestion for enabling the CPU FLAGS does work. The performance for the 720p video is 230-250MB ram usage and 35-50% cpu usage on the openbox desktop (only has an instance of the opera browser running and nothing else). The video plays without stuttering. There is an improvement in the playback of the 1080p video but it does stutter and the cpu usage is very high over 85%.
I 'll get the logs from puppy and post it on the thread..
Edit: the logs from puppy linux..
https://paste.pound-python.org/show/zLr4xSb4UIoT8WAzCLzz/
Also the default option for the driver is gallium instead of classic. Should I try to switch over to classic
Code: | $ eselect mesa list
i915 (Intel 915, 945)
[1] classic
[2] gallium *
i965 (Intel GMA 965, G/Q3x, G/Q4x, HD)
r300 (Radeon R300-R500)
r600 (Radeon R600-R700, Evergreen, Northern Islands)
sw (Software renderer)
[1] classic
[2] gallium *
|
Thanks
Rejoy |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Aug 14, 2018 6:57 pm Post subject: |
|
|
Rejoy wrote: | Edit: the logs from puppy linux.. |
Rejoy ... as I suspected, the xorg version is 1.12.4 and the kernel is 3.4.82 ... so everything is well prior to the changes I pointed to above.
Rejoy wrote: | Also the default option for the driver is gallium instead of classic. Should I try to switch over to classic. |
You will probably get better performance with gallium ... but it doesn't hurt to try.
best ... khay |
|
Back to top |
|
|
Rejoy n00b
Joined: 09 Jul 2018 Posts: 20
|
Posted: Sat Aug 18, 2018 4:46 am Post subject: |
|
|
Hi,
I tried to switch from gallium to classic.. But it doesn't seem to make much of a difference.. if at all anything the gallium option seems to perform better..
also recompiled the kernel with support for framebuffer devices and frame buffer console rotation.. even that didn't make much difference..
Using gst-play-1-0 with the option flags=0x57, the CPU load and ram usage is kept under check.. however the videoplayback is choppy with a large number of frames getting dropped..
So for now I 'll have to settle with only the 720P videos on gentoo..
Thanks for all the support ..especially khay and josef.95..
Thanks
Rejoy |
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Sun Sep 09, 2018 7:27 pm Post subject: |
|
|
Rejoy ...
a quick follow-up, I discovered that enabling USE="gallium llvm gles1 gles2 xa" on media-libs/mesa has the effect of providing opengl for media-video/mpv (and squashing the error re missing opengl-2.1).
EDIT: and it seems to be worse than it was previously (at least for me) ... rolling back.
HTH & best ... khay |
|
Back to top |
|
|
|