You are not logged in.

#1 2011-07-09 18:23:06

Master One
Member
From: Europe
Registered: 2007-01-21
Posts: 249

gstreamer vs. mplayer2 / VLC >> x264 playback performance differences

I only have low power machines, like my good old ThinkPad with Pentium M 1.8GHz or some EeePC with Atom CPU, which formerly only could playback AVC1 720p matroska files using the patched mplayer with the CoreAVC on WINE hack.

As I have found out recently, mplayer2 can play such files on those machines just fine right out of the box, but I am not quite sure why. I now have Arch + Gnome3 on my ThinkPad, and a test with Totem, VLC and SMplayer-on-mplayer2 revealed, that VLC and mplayer2 can play such a file just fine, but gstreamer-based Totem can not (looks good at first, but after some time, the video gets choppy).

mplayer2 says its using ffh264 as video codec, and besides mplayer2, vlc and all the gstreamer stuff, the following is installed on my system:

extra/x264 20110617-1
extra/ffmpeg 20110622-1
extra/gstreamer0.10-ffmpeg

I don't know how mplayer2 or vlc does it, nor do I have a clue about the workings of gstreamer, ffmpeg and the codecs interaction.

So can gstreamer apps like Totem be made to perform the same like mplayer2 and vlc on such AVC1 encoded videos?

Offline

#2 2011-07-09 18:59:31

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: gstreamer vs. mplayer2 / VLC >> x264 playback performance differences

On the Atom, it depends on whether the ffmpeg used by a specific app supports multithreading. The ffmpeg in mplayer2 (and recently in mplayer too) does. The gstreamer plugin quite possibly uses an older ffmpeg which doesn't.
Pentium M is single core, so this doesn't apply. But it's possible there were generic optimizations done in ffmpeg and again the gstreamer plugin is too old to have them incorporated.

Then there's the big possibility that the gstreamer media pipeline is simply less efficient (does unnecessary copying of picture data around, does colorspace in software instead of letting the hardware do it, and similar stuff).

And one final thing: x264 is encoder-only, it has nothing to do with video playback.

Offline

#3 2011-07-09 19:12:24

Master One
Member
From: Europe
Registered: 2007-01-21
Posts: 249

Re: gstreamer vs. mplayer2 / VLC >> x264 playback performance differences

It is quite annoying, as said, even that old single core Pentium M does well with mplayer2 and VLC, but nothing else. It's the same with the flashplayer-browser-plugin. To be able to view 720p content from youtube, I first have to download the file (using VideoDownloadHelper in Firefox), and then play it in mplayer2 for it to work.

So I guess I have to stick with mplayer2 then.

Offline

#4 2011-07-09 20:09:13

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: gstreamer vs. mplayer2 / VLC >> x264 playback performance differences

Master One wrote:

It's the same with the flashplayer-browser-plugin.

Nope, with flash it's quite different. To be able to overlay complex graphics on top of the video (with youtube mostly ads) or do other transformations on it (the thumbnails when a video ends for example), flash needs to do scaling and colorspace conversion in software. Whereas dedicated video players use the graphic card to do it in hardware. This has changed in flash only very recently, and is for now limited to VDPAU (so Nvidia cards; Geforce 8 and up, including ION). Support for other graphic cards via VAAPI is coming, but with the slow pace of linux flash development, it might take a while.

Offline

#5 2011-07-09 21:03:43

Master One
Member
From: Europe
Registered: 2007-01-21
Posts: 249

Re: gstreamer vs. mplayer2 / VLC >> x264 playback performance differences

Well explained, Gusar, but what I meant with "It's the same with the flashplayer-browser-plugin." was just that I can't watch anything 720p with the intended app (browser + flash-plugin), but have to download the video first, to then watch it with mplayer2 due to my machines having not enough power to deal with inefficient video decoding. mplayer2 does the job, and I wish it would be useable as a backend for all the other apps.

Offline

Board footer

Powered by FluxBB