Monday, January 2, 2012

Unsolved problem: Playing HD video 720p 1080p on Linux netbooks such as AO722

Netbooks means weak CPU.  Linux means no hardware video acceleration because of open source drivers or incomplete proprietary drivers.  This is the case for Acer Aspire One 722.  Because 720p can fit in the screen, so in theory it's a lot easier than rescaling the 1080p into full screen.

The bundled Movie Player (Totem) doesn't play anything HD, so I thought the AO722 is useless for video.  I used another player and even 1080p can play smoothly with out of sync sound.

I spent some time investigating because, if you are given a HD video, you want to be able to view on the netbook without recoding the whole movie into 480p, which can take hours I think.

The core component of a media player is the codecs.  All the players use more or less the same, such as FFmeg.  The problem is these things have license restrictions, making it a nightmare to distribute.  So often you are not using the best and fastest codecs.  These codecs are available as plugins to overcome the license restrictions.

On the next level there's the video backend, or engine.  There are basically 4, gstreamer, mplayer, vlc, xine.  Gstreamer has a few plugins doing similar things.  Mplayer has different branches.  Xine is basically fading away but still has updates.

There are one to many GUI frontends for each engine.  The default ubuntu, gnome player is Movie Player, which is actually called totem, use gstreamer.  There is the Gnome-mplayer, and smplayer for the mplayer backend.  There's also the mplayer-gui and mplayer can be used in the command line.  Similarly there are a few xine gui's.  The company Videolan makes both the frontend and backend of VLC and not used by any others.

Movie Player (Totem) and VLC don't play any HD on AO722 in any meaningful way by default.  Mplayer and xine plays even 1080p smoothly.  But I can't find ways to sync the audio because the video is lacking far behind.

In a faster but old machine, I discovered that only VLC can sync the audio, in the expense of some noticeable artifacts on the video.

On the AO722, I discovered that I can tweak the preferences to get a lower quality video but with perfect sync of HD 1080p (>900p) such as the Bourne Ultimatum demo clip.  Try low quality, skip frames, etc.

I concluded that you can watch HD on AO722 smoothly, with compromise in quality.  The problem is how to configure the player.

Totem/Gstreamer is most comprehensive.  I can't believe that I couldn't find out how to install and use the ffmpeg plugins, for example.  Not in the official website nor the ubuntu forums.  At least not in the form I understand. 

You should be able to configure a lot of things for mplayer (and xine), but the problem is too many options.  There's no tutorial for crippling the player for slow machines.

I manage to tweak the VLC options to play HD with perfect sync.  But some 1080p are more consuming that others.  So it's not a complete solution.

Video for the browser is another story.  HD on youtube is mostly mp4.  It's better to use a video player to play youtube videos, mp4 or not, than using the crippled flash implementation.  The VLC browser plugin doesn't work.  That left us with the Gnome-player plugin.  Disable other plugins and use FlashVideoReplacer extension for Firefox and you can play youtube videos just like flash, but only on  youtube and a few other sites.  You can play 720p with perfect sync, but not any higher.  That's not a problem because youtube always give you different resolutions from 240 up to 1080p.


matbonucci said...

same prob i can't play 1080p mkvs on ubuntu but in windows they play perfect, both using vlc

The Player said...

Windows has video hardware card acceleration.

There's hope on the mplayer based players. Actually I played HD mkvs files on the Wii perfectly. Don't remember if it's 1080 or just 720.

mertin said...

a lot of conclusions but no how-to

mertin said...


The Player said...

Hey, my conclusion is that you can have a bad player without hardware acceleration. I can't even sync the whole thing. I was hoping someone know more about players will figure out how to at least maintain video and voice sync throughout a movie. There's no howto because there is one that can reasonably play a movie. I just like to tell stories.