Bug 47858 - 1080p hardware accelerated video playback stutters on Ironlake
Summary: 1080p hardware accelerated video playback stutters on Ironlake
Status: CLOSED WONTFIX
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: haihao
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-25 12:46 UTC by spb.nevill
Modified: 2017-01-06 08:19 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments
vainfo output (417 bytes, text/x-log)
2012-03-25 12:46 UTC, spb.nevill
Details
dmesg output (52.65 KB, text/plain)
2012-03-25 12:47 UTC, spb.nevill
Details
Xorg.0.log (32.31 KB, text/plain)
2012-03-25 12:48 UTC, spb.nevill
Details
xrandr --verbose output (2.58 KB, text/plain)
2012-03-25 12:49 UTC, spb.nevill
Details
reg dumper output (11.58 KB, text/plain)
2012-03-25 12:49 UTC, spb.nevill
Details
i915_error_state untruncated (1.40 MB, application/octet-stream)
2012-04-02 22:47 UTC, spb.nevill
Details

Description spb.nevill 2012-03-25 12:46:54 UTC
Created attachment 59019 [details]
vainfo output

I use Acer TM5744-383G32Mikk with Intel Corporation 5 Series/3400 Series Chipset. 

Distributive: Kubuntu 12.04
Kernel^ 3.2.0-20-generic
xserver-xorg-video-intel: version 2:2.17.0-1ubuntu4
libdrm-intel1: version 2.4.32-1ubuntu1
Mesa: version 8.0.2.
VLC: version 2.0.0-6~ppa1

Playing videos with VLC player with video accelerator option turned on results in a noticeable stuttering. Switching the acceleration off gets rid of the issue.

Tested on Bluray 1080p rips, both 8bit and 10bit. I have attached vainfo output for good measure.
Comment 1 spb.nevill 2012-03-25 12:47:50 UTC
Created attachment 59020 [details]
dmesg output
Comment 2 spb.nevill 2012-03-25 12:48:28 UTC
Created attachment 59021 [details]
Xorg.0.log
Comment 3 spb.nevill 2012-03-25 12:49:05 UTC
Created attachment 59023 [details]
xrandr --verbose output
Comment 4 spb.nevill 2012-03-25 12:49:38 UTC
Created attachment 59024 [details]
reg dumper output
Comment 5 spb.nevill 2012-04-02 22:47:36 UTC
Created attachment 59406 [details]
i915_error_state untruncated
Comment 6 spb.nevill 2012-04-02 22:51:10 UTC
Sorry, i915_error_state attachment was from another report.
Comment 7 spb.nevill 2012-04-12 11:50:11 UTC
The problem persists with SNA driver.
Comment 8 Anonymous Helper 2012-07-18 09:50:34 UTC
>VLC: version 2.0.0-6~ppa1

It stutters on my SNB too, but according to the link, it also applies to AMD cards due to VLC's inability to direct rendering. So, it seems to be not Intel-related in any kind.

Why don't you try it with GLX output turned off(use XVideo) or just with mplayer-vaapi -vo vaapi:gl -va vaapi? This is completely usable even with high bitrate files.

http://trac.videolan.org/vlc/ticket/4405
http://forum.videolan.org/viewtopic.php?f=13&t=86168

>00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)
Comment 9 ykzhao 2013-11-29 02:44:45 UTC
Will you please try the latest intel-vaapi driver and see whether the issue still exists?

Thanks.
Comment 10 russianneuromancer 2013-12-31 06:50:50 UTC
> Will you please try the latest intel-vaapi driver and see whether the issue still exists?
Tested with 1.2.1:
1. In VLC with enabled VA-API now there is no stuttering. Now video just freeze after playback start (audio continue to playback). After rewind player display few new decoding frames (from position where we rewind) and video again freeze. So VLC support simply broken with 1.2.1 - I need to fill separate bugreport?
2. In mpv video is not stutter, but seriously lag behind sound, like there is not enough compute power to decode video. Judging from CPU load while video playback (6% on Intel Celeron U3400) options that used for mpv launch ("--vo=vaapi --hwdec=vaapi") and mpv logs, hardware decoder is in use, however with software decoder result is much better (less lag).

Acer Aspire 753-U341ss, BIOS 1.24
Intel Celeron U3400
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile
Kubuntu 14.04 x86_64, Linux 3.13rc6
libva and libva-intel-vaapi-driver 1.2.1
X.Org Server 1.14.5
libdrm 2.4.50
Mesa 10.0.1
VLC 2.1.2, mpv 0.3.0, KDE 4.12 (compositing was disabled for this test) 
Sample video: http://mediafire.com/?tdukvcaj87nivn7

If you need additional logs, please let me know.
Comment 11 russianneuromancer 2015-01-31 21:41:52 UTC
With latest builds of the libva, driver, Mesa, kernel, VLC 2, etc. video doesn't freeze in VLC anymore.

But hardware acceleration of 720p and 1080p videos is still much slower than software, not only in VLC but also in mpv.
Comment 12 russianneuromancer 2015-02-02 05:04:16 UTC
After additional testing I find out that 720p can be played back using hardware decoder, but only in mpv and only in fullscreen mode.
Comment 13 Mihail Kasadjikov 2015-02-04 07:30:37 UTC
I confirm that 720p h264 video plays by HW decoder smoothly but 1080p not. Vlc and mpv can't play smoothly not 20 Mbit nor 10 Mbit 1080p streams by HW decoder.
Comment 14 haihao 2015-11-18 08:12:49 UTC
You should use "--vo vaapi" to play back the movie when you use MPV.
Comment 15 russianneuromancer 2015-11-18 08:26:33 UTC
I use vo=vaapi in mpv config instead of launch option. 1080p issue is reproducible with this config option (hwdec=vaapi is also here obviously).

Haihao, please download video from mediafire link (comment 10). This video can be decoded via DXVA but VAAPI decoding is stutter. That was tested on same hardware - in my case Acer Aspire 753-U341ss with Intel Celeron U3400.
Comment 16 haihao 2015-11-24 06:14:26 UTC
I failed to download the sample video from the link you mentioned.  Do you see similar log below when using vaapi ?

libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
Comment 17 russianneuromancer 2015-11-24 08:44:33 UTC
> I failed to download the sample video from the link you mentioned.
Okay, there is mirrors:
https://mega.nz/#!4RYnQZSa!ZzUo-g2I5gQu7NBTIqCY8DlKlnqOC2B_9Tg0_kkNIug
https://yadi.sk/i/J1JxBbeWkgpuv
https://www.sendspace.com/file/1gt3rf

Hopefully one of this will work out.

> Do you see similar log below when using vaapi ?
No.
Comment 18 haihao 2015-11-25 03:01:18 UTC
(In reply to russianneuromancer from comment #17)
> > I failed to download the sample video from the link you mentioned.
> Okay, there is mirrors:
> https://mega.nz/#!4RYnQZSa!ZzUo-g2I5gQu7NBTIqCY8DlKlnqOC2B_9Tg0_kkNIug
> https://yadi.sk/i/J1JxBbeWkgpuv
> https://www.sendspace.com/file/1gt3rf
> 
> Hopefully one of this will work out.
> 

They don't work for me :(

> > Do you see similar log below when using vaapi ?
> No.

If so, you don't used vaapi at all, maybe mpv falls back to software decoding. could you double check your environment?
Comment 19 russianneuromancer 2015-11-25 15:42:39 UTC
> They don't work for me :(
Try this sample instead: https://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4
It stutter too on Ironlake.

> If so, you don't used vaapi at all
I do:

~$ vainfo
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.38 (libva 1.6.0)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 1.6.0
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

> maybe mpv falls back to software decoding
mpv doesn't fallback to software decoding:

~$ mpv sintel_trailer-1080p.mp4
Playing: sintel_trailer-1080p.mp4
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=und (*) (aac)
File tags:
 Artist: Durian Open Movie Team
 Title: Sintel Trailer
libva info: VA-API version 0.38.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_38
libva info: va_openDriver() returns 0
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [vaapi] 1920x1080 vaapi
AV: 00:00:52 / 00:00:52 (99%) A-V:  0.000 Dropped: 813


Exiting... (End of file)
Comment 20 haihao 2015-11-27 01:42:06 UTC
I can download the sample from the new link. ILK was released a few years ago, I have no ILK machine on hand, Hope I can find a ILK machine to reproduce this issue.
Comment 21 groucho 2015-12-24 17:48:18 UTC
I can confirm this on an old thinkpad x201 with a core i5 520M.

Actually, I had the same issue on an older core 2 duo with gma 4500 and the g45-h264 branch, as described here : https://wiki.archlinux.org/index.php/Intel_graphics#H.264_decoding_on_GMA_4500
The only difference was that the stuttering at 1080p was worse.

Maybe is it related to this bug ?
Comment 22 russianneuromancer 2015-12-25 06:02:14 UTC
My guess is that with GMA4500 issues with HD playback is hardware limitation, but in case of Ironlake 1080p hardware decoding via DXVA does work in Windows (but in my tests for some reason only in Windows Media Player, not in MPC-HC) so there is something different here.
Comment 23 groucho 2015-12-25 19:28:44 UTC
If I recall correctly, the G45 was able to decode h264 1080p on Windows.
And it was supposed to be ported to linux : http://www.phoronix.com/scan.php?page=news_item&px=OTQ1NA
But it never was fully usable.

Since the symptoms are almost the same (low cpu usage, usable at 720p, choppy at 1080p), I thought it might have been the same issue. Of course, it was just a wild guess.
Comment 24 Sean V Kelley 2016-11-03 21:17:25 UTC
This much older platform has limited support.
Comment 25 Arthur Heymans 2016-11-04 14:37:16 UTC
G45 works perfectly fine with h264 vaapi accel (with the g45 branch) even on 1080p on the condition that the preallocated vram is sufficiently high. Many bios select the default of 32M on g45 which is unusable for h265 decoding. With 256M if your bios allow to change it, (in the GGC pci config register) decoding has no issues at all. 

I suspect this might also be the case for Ironlake, so the won't fix is good since it is an issue only the bios can solve.
Comment 26 russianneuromancer 2016-11-04 20:04:04 UTC
Arthur, please open attached dmesg and find line starting with 1.146097, as you can see here there is enough VRAM.

I find it strange that AMD somehow find money to suport their customers up to very first UVD with H.264 support, and even get it work more stable than with proprietary Windows driver. And Intel with more money and bigger team can't do this. This is astonishing.
Comment 27 Rhys Kidd 2016-11-06 02:56:56 UTC
For what it is worth, on my ILK system I experience smooth play back of the above 1080p Sintel Trailer with vaapi.

$ wget https://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4
--2016-11-05 22:48:22--  https://download.blender.org/durian/trailer/sintel_trailer-1080p.mp4
Resolving download.blender.org (download.blender.org)... 82.94.213.221
Connecting to download.blender.org (download.blender.org)|82.94.213.221|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14621544 (14M) [video/mp4]
Saving to: 'sintel_trailer-1080p.mp4’

sintel_trailer-1080 100%[===================>]  13.94M  3.62MB/s    in 4.6s    

2016-11-05 22:48:27 (3.05 MB/s) - 'sintel_trailer-1080p.mp4’ saved [14621544/14621544]

$ vainfo
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
vainfo: VA-API version: 0.39 (libva 1.7.1)
vainfo: Driver version: Intel i965 driver for Intel(R) Ironlake Mobile - 1.7.1
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264ConstrainedBaseline:	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileNone                   :	VAEntrypointVideoProc

$ mpv --hwdec=vaapi -vo vaapi sintel_trailer-1080p.mp4 
Playing: sintel_trailer-1080p.mp4
 (+) Video --vid=1 (*) (h264)
 (+) Audio --aid=1 --alang=und (*) (aac)
File tags:
 Artist: Durian Open Movie Team
 Title: Sintel Trailer
libva info: VA-API version 0.39.2
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [vaapi] 1920x1080 vaapi
AV: 00:00:52 / 00:00:52 (99%) A-V:  0.000


Exiting... (End of file)

$ cat dmesg.txt
...
[    1.846659] pci 0000:00:00.0: Intel HD Graphics Chipset
[    1.846676] pci 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
[    1.847134] pci 0000:00:00.0: detected 32768K stolen memory
[    1.847203] [drm] Memory usable by graphics device = 2048M
...
Comment 28 adam 2017-01-06 08:18:09 UTC
For what it's worth I can play it just fine too, I believe it was fixed by: https://bugs.freedesktop.org/show_bug.cgi?id=91254

Nevertheless it's still unusable because the video hangs up eventually (a few minutes usually and I think 20 at most), it just stops playing and requires video player restart.  There still has to be some inappropriate video hardware handling or the hardware is just crap.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.