Bug 47776 - Choppy video playback
Summary: Choppy video playback
Status: RESOLVED INVALID
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.6 (2010.12)
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-23 09:35 UTC by Lollerke
Modified: 2016-06-15 12:05 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
dmesg (54.88 KB, application/octet-stream)
2012-03-28 01:44 UTC, Lollerke
no flags Details
Xorg (44.38 KB, text/plain)
2012-03-28 01:45 UTC, Lollerke
no flags Details
dmesg (54.88 KB, text/plain)
2012-03-28 01:46 UTC, Lollerke
no flags Details
glxinfo (24.01 KB, text/plain)
2012-03-28 01:47 UTC, Lollerke
no flags Details

Description Lollerke 2012-03-23 09:35:15 UTC
Choppy video playback with GNOME Shell, Unity, Gnome-fallback with compiz, but not with Unity 2D and Gnome-fallback without compiz on two machines (1. Laptop with ATI Radeon X200M, 2. Desktop system with ATI Radeon HD6450). Media players doesn't report dropped frames, CPU usage is well below 100%. Tested with a 720p x264 video at about ~6000kbps. See https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/961124. Tried Fedora 16 and the problem is the same.
Comment 1 Lollerke 2012-03-27 11:16:47 UTC
Same under KWin too.
Comment 2 Michel Dänzer 2012-03-28 00:18:49 UTC
Can you elaborate what 'choppy' means exactly? And how you estimated around 20 fps?
Comment 3 Michel Dänzer 2012-03-28 00:22:11 UTC
Also, please attach the Xorg.0.log file and the output of dmesg and glxinfo to this report.
Comment 4 Lollerke 2012-03-28 01:44:10 UTC
Created attachment 59141 [details]
dmesg
Comment 5 Lollerke 2012-03-28 01:45:36 UTC
Created attachment 59142 [details]
Xorg
Comment 6 Lollerke 2012-03-28 01:46:08 UTC
Created attachment 59143 [details]
dmesg
Comment 7 Lollerke 2012-03-28 01:47:35 UTC
Created attachment 59144 [details]
glxinfo
Comment 8 Lollerke 2012-03-28 01:50:45 UTC
It's looks like the the video is skipping some frames (2 or 3) every second, so the picture is stuttering and in rare cases there's also some tearing. I also noticed that if I run glxgears (Vsync on) I can see stuttering there too, but not that often (every 5-10 sec).
Comment 9 Lollerke 2012-03-28 01:59:52 UTC
Correction: it's not true, that it skips the frames every second, sometimes the video playback is smooth for 3 sec. Looks like a syncing issue.
Comment 10 Michel Dänzer 2012-03-28 03:03:24 UTC
Is that with fullscreen and/or windowed video playback?

Which version of gnome-shell are you running? Have you configured compiz and kwin to unredirect fullscreen windows?
Comment 11 Lollerke 2012-03-28 04:07:09 UTC
Both full screen and windowed, but if I shrink the media player's window size to about 400 x 280 the video is smooth. Also if I try to play an SD Xvid (632x486) video it's smooth even on fullscreen. This indicates that the problem depends on video resolution.

I tried turning on the unredirect fullscreen windows option, but it didn't help. I have Gnome Shell 3.3.92 and 3.2 (in Fedora).
Comment 12 Lollerke 2012-03-28 04:10:19 UTC
I mean not video resolution, the playback resolution.
Comment 13 Lollerke 2012-03-28 04:30:14 UTC
Sorry, it depends on both, because a 600x400 video plays back smoothly on fullscreen (1280x800), but a 1280x720 video doesn't. The interesting thing is that the 1280x720 video is running smoothly at 600x400.
Comment 14 Lollerke 2012-03-28 05:31:03 UTC
Also if the video is running smoothly, there's no tearing.
Comment 15 Christian König 2012-03-28 05:45:33 UTC
May I guess something?


Cause mplayer isn't complaining about dropped frames the best explanation is that instead of a constant stream of frames:

---*---*---*---*---*---*---*---*---*--- ...

We get something like this:

---***---------****------------*---*--- ...

That is usually caused by to long pipelines, e.g. the 3D rendering causes to long stalls, witch lead to burst of frames with the playback...

I'm also guessing that you are using Xv + "classic" mplayer, could you try the VDPAU implementation with mplayer2 instead? The result won't be better, but you get at least a good error message of what is going wrong here.
Comment 16 Lollerke 2012-03-28 06:06:32 UTC
If I run glxgears simultaneously with the video playback even though the video is stuttering badly I get 56-60 fps on glxgears (my monitor works at 60Hz).

I'm already using Mplayer2, but with XV - Textured Video. If I try VDPAU I get this message: "Failed to open VDPAU backend libvdpau_r300.so: cannot open shared object file: No such file or directory".
Comment 17 Lollerke 2012-03-28 06:25:20 UTC
But I guess, that's the problem. The glxgears FPS should be at 60 all the time. If I run glxgears during an SD video, it starts stuttering and tearing.
Comment 18 Lollerke 2012-03-28 06:30:23 UTC
Correction: Running glxgears during an SD video introduces some tearing, but no stuttering.
Comment 19 Michel Dänzer 2012-03-28 07:43:09 UTC
Does

    Option "SwapbuffersWait" "off"

make the stuttering better (or worse)? Note that it'll probably increase tearing for non-fullscreen apps.
Comment 20 Lollerke 2012-03-28 08:26:07 UTC
Xorg.0.log:
[    14.912] (II) RADEON(0): KMS Color Tiling: enabled
[    14.913] (II) RADEON(0): KMS Pageflipping: enabled
[    14.913] (II) RADEON(0): SwapBuffers wait for vsync: disabled

Nothing changed, the stuttering remained the same.
Comment 21 Lollerke 2012-04-10 01:58:11 UTC
I get tear-free video playback with disabled metacity compositing and enabled EXAVSync in the xorg.conf file under Unity 2D and Gnome fallback. Disabling compositing alone doesn't solve the tearing problem, it only works with enabled EXAVSync.
Comment 22 Michel Dänzer 2012-04-10 03:15:14 UTC
(In reply to comment #21)
> Disabling compositing alone doesn't solve the tearing problem, it only works
> with enabled EXAVSync.

For some reason, Ubuntu seem to have patched their metacity to enable automatic (server side) compositing even when client side compositing is disabled in the metacity configuration.

Does EXAVSync help also when compositing is explicitly enabled in metacity?
Comment 23 Lollerke 2012-04-10 08:05:10 UTC
"Does EXAVSync help also when compositing is explicitly enabled in metacity?"

Yes.
Comment 24 Christian König 2016-06-15 12:05:08 UTC
This one turned out to be a configuration problem with metacity.

I think we can close it now.


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.