Posts Tagged ‘Playback’

Compiling mplayer with multi-core decoding support in ubuntu linux

Thursday, September 10th, 2009

Its a great advancement in HD playback on Linux and people should be able to take advantage of it. I found this process from http://ubuntuforums.org/showthread.php?t=786095
To use mplayer with multithreaded decoding abilities all you have to do is compile mplayer as per usual, but having replaced the normal ffmpeg source code (within the mplayer source code directory) with the ffmpeg-mt source code (http://gitorious.org/projects/ffmpeg/repos/ffmpeg-mt).  I’m going to use the following guide written by andrew.46 entitled [Howto] Successfully install the svn mplayer + gmplayer + all the codecs as the basis for my tutorial as it’s very thorough and I feel there’s no need to reinvent the spoon.

Installation Process

1. Follow andrew.46’s guide until you reach the point “Download and Compile the svn mplayer” (you can skip the step “Installing the amr libraries” if you don’t need these.
2. When you reach the step “Download and Compile the svn mplayer” proceed as andrew.46 says with downloading the mplayer source code from SVN:

$ cd $HOME
$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

3. When this is done it’s time to download the ffmpeg-mt source code. First you need git, install it with the following command:
sudo apt-get install git-core

Then download the source code for ffmpeg-mt using git:
$git clone http://git.gitorious.org/ffmpeg/ffmpeg-mt.git

In order to make use of the now downloaded ffmpeg-mt source code you need to replace the three following folders from the mplayer source directory with the folders from the ffmpeg-mt directory: “libavcodec”, “libavformat” and “libavutil”.
cd mplayer #enter the directory where the mplayer source code is

rm -rf libavcodec libavformat libavutil #delete the three aforementioned folders
cp -a ../ffmpeg-mt/libavcodec . #copy the three folders from the ffmpeg-mt source dir to mplayers source dir
cp -a ../ffmpeg-mt/libavformat .
cp -a ../ffmpeg-mt/libavutil .

Now you have the mplayer source code in which the ffmpeg source has been replaced with the ffmpeg-mt source. You should be ready to go.

Now just follow the rest of andrew.46’s guide starting from:

$ cd $HOME/mplayer
$ ./configure –enable-gui
$ make
$ sudo make install
$ make clean

and mplayer should compile with no problems.

Here are some benchmarks of mplayer with the normal single-threaded ffmpeg decoder compared to the multi-threaded ffmpeg decoder playing various 1080p H.264 video samples (using my Core2 Quad 2.83GHz CPU):

Code:SINGLE-THREADED FPS    MULTI-THREADED FPS    PERCENT INCREASE IN FPS

The Dark Knight        37            121            329%

In Bruges        45            134            296%
(no -ss 120)

The Bank Job        46            141            305%

The Terminator        37            126            341%
(no -ss 120)

Done with the installation process.

Google waves architecture

Wednesday, July 22nd, 2009

Google Wave is a new model for communication and collaboration on the web, coming later this year. Here’s a preview of just some of the aspects of this new tool.

Google Wave is a product that helps users communicate and collaborate on the web. A “wave” is equal parts conversation and document, where users can almost instantly communicate and work together with richly formatted text, photos, videos, maps, and more. Google Wave is also a platform with a rich set of open APIs that allow developers to embed waves in other web services and to build extensions that work inside waves

What is a wave?

A wave is equal parts conversation and document. People can communicate and work together with richly formatted text, photos, videos, maps, and more.

A wave is shared. Any participant can reply anywhere in the message, edit the content and add participants at any point in the process. Then playback lets anyone rewind the wave to see who said what and when.

A wave is live. With live transmission as you type, participants on a wave can have faster conversations, see edits and interact with extensions in real-time.

What is the Google Wave API?

The Google Wave API allows developers to use and enhance Google Wave through two primary types of development:

  • Extensions: Build robot extensions to automate common tasks or build gadget extensions to provide a new way for users to interact
  • Embed: Make your site more collaborative by dropping in a Wave

Google Wave is currently available in a developer preview as the APIs and product continue to evolve. Accounts on the developer sandbox will be given out to people intending to build with the Google Wave APIs prior to the public release.

This platform enables people to communicate and work together in new, convenient and effective ways. We will offer these benefits to users of Google Wave and we also want to share them with everyone else by making waves an open platform that everybody can share. We welcome others to run wave servers and become wave providers, for themselves or as services for their users, and to “federate” waves, that is, to share waves with each other and with Google Wave. In this way users from different wave providers can communicate and collaborate using shared waves. We are introducing the Google Wave Federation Protocol for federating waves between wave providers on the Internet.

Wave Gustav 12072009 openwave

Here are the initial white papers that are available to complement the Google Wave Federation Protocol:

  • Google Wave Federation Architecture
  • Google Wave Data Model and Client-Server Protocol
  • Google Wave Operational Transform
  • General Verifiable Federation

The Google Wave APIs are documented here.

DVD Playback in Linux

Sunday, July 5th, 2009

Well, hell froze over: Novell took me seriously when I said they should open source SuSE Linux Professional. Color me impressed — even if they didn’t name the distribution “Geeko”. (I guess you can’t have everything.)

I also said in a previous column that if Novell opened SuSE Linux Professional, I’d go out on a limb and run the distribution personally, because its sibling, SuSE Linux is that good. Thus, I recently installed SuSE Linux 10 on my brand new HP nx9600, a fire-breathing, 3.6 GHz, 64-bit, dual-core, Pentium 4 laptop with a 17-inch LCD screen and a built-in DVD-recorder unit.

I must say I am dazzled with SuSE Linux 10’s performance and its plethora of features and bleeding-edge enhancements. The distribution is a power user’s delight. It’s that good. In fact, I think every advanced user looking for a state-of-the art Linux distribution should go to http://www.opensuse.org and download a copy right now, especially if you have a PC with a 64-bit chip, such as the Pentium 4 HT or the AMD Athlon FX/64. If SuSE Linux 10 were a car, it’d be a BMW 760i or a Mercedes S-Klasse S55 AMG.

Imagine my surprise, however, when I discovered that DVD playback capability was intentionally crippled in the open source version of SuSE Linux 10. Whoa! Or should I say, Scheiße!

Geben Sie Mir Meinen DVD Spieler, Dumbkopf!

Of course, you can play DVDs on Linux, and you most certainly can have it in SuSE Linux 10, but to do so, you have to jump through a few hoops, make a few modifications, and possibly break a few laws — kind of like yanking the catalytic converter and adding Euro-spec Bosch headlights and a high-performance intake and exhaust system to your high-performance German touring sedan.

Due to a variety of legal issues, SuSE Linux 10 cannot include working copies of a number of components needed for DBD playback. So, the first thing to do is remove the bad parts to make room for the new ones. Fire up a command prompt, type…

$ su root

… and then enter the root password. Once you’re root, run the following set of commands:

# rpm –e kdemultimedia3-video-xine-3.4.2-10
# rpm –e amarok-xine-1.3.1-7
# rpm –e xine-ui
# rpm –e xine-lib
# rpm –e kaffeine

These commands remove crippled versions of the libraries and applications needed to play DVDs.

YaST2: Der Überconsole

Now it’s time to put in the good parts. Assuming that you’re still logged in as root, type…

# yast2

… to launch the YaST2 Control Center (YaST is purportedly an acronym for “Yet another Software Tool”), the SuSE “ überconsole” that allows you to configure virtually every aspect of your SuSE Linux system.

FIGURE ONE: The YaST2 “Software Source Media” screen



Once YaST2 is launched, click on “Software”, then “Installation Source” to reveal the “Software Source Media” screen (See Figure One.) Next, click on “Add& gt; HTTP”. For the server name, type in packman.iu-bremen.de; for the directory, use suse/10.0 (see Figure Two). Then click on OK. Click on Finish to exit the “Software Source Media” screen and to return to the “YaST Control Center” screen.

Figure Two: Adding an HTTP repository



What did you just do? As it turns out, just as it is with your domestically-bought Mercedes or BMW, there are a number of 3rd-party places to get souped-up replacement parts that aren’t exactly “spec”. One of those places is Packman, a software repository in Germany that makes updated and supplementary RPM packages for SuSE Linux. (For more information on YaST2 software repositories, check out the page about it on the OpenSUSE Wiki at http://www.opensuse.org/YaST_package_repository.)

Packman, Anyone?

Now that you’ve added Packman as an installation source, you can use YaST2’s “Software Management” feature to pull down and automatically install the needed components.

From the main YaST2 “Control Center” screen, click on “Software Management”. The Software Management application will then refresh its internal database of available software from the Packman repository that you just added. Next, from within the Software Management application, enter kaffeine and click on the Search button to yield a list of applications related to Kaffeine, the KDE multimedia player. Check off everything that it finds and click on Accept. (See Figure Three.)

Figure Three: Choosing all of the components needed for Kaffeine



When prompted with the “Changed Packages” window, click on Continue to install the new software from the Packman repository.

Freigabe der libdvdcss, Mein Herr!

At this point, you probably want to fire up Kaffeine and play your Invader Zim DVD. Not so fast, Herr Skippy. Not only do you need the updated Kaffeine and the xine-lib stuff, but you also need this little library called libdvdcss, produced by the international VideoLAN group, which is able to read a DVD like a block device and actually bypass the encryption.

Now, here is where we get into quasi-you might need to seriously consider not doing this territory. The use and distribution of libdvdcss is controversial in a number of countries, including the United States because of its Digital Millennium Copyright Act. If you’re unsure about the legality of using and distributing libdvdcss in your country, please consult your lawyer. Ingredients of libdvdcss include an unknown glowing substance that fell to Earth, presumably from outer space. If after using libdvdcss your computer begins to smoke, get away immediately, seek shelter, and cover head. Your mileage may vary. Please do not taunt libdvdcss.

Since you were going to install that nitrous oxide injector and pull the catalytic converter off your BMW any way, the latest version of libdvdcss can be downloaded from http://download.videolan.org/pub/libdvdcss/. At the time of this writing, the latest version was 1.2.9. Download the RPM version, which you can find at http://download.videolan.org/pub/libdvdcss/1.2.9/rpm/libdvdcss2-1.2.9-1.i386.rpm.

When prompted by your web browser, save the file to your home directory. When finished, and after logging in as the root user, issue the command:

# rpm –Uvh libdvdcss2-1.2.9-1.i386.rpm

(If you’re using the 64-bit version of SuSE Linux, download the libdvdcss source code, libdvdcss-1.2.9.tar.gz, unpack it, change directory to ./libdvdcss-1.2.9/, run ./configure, and then run make install.

So now, if you run Kaffeine and pop in your favorite movie, everything should be wunderbar. And I’d watch out for those black helicopters from the Department of Motor Vehicles if I were you.

In addition to Kaffeine, you might want to also install mplayer, another cool media

player, as well as xine-ui, totem, and gxine, for those of you using GNOME.

Video streaming using RTMP Plugin

Wednesday, June 17th, 2009

Introduction:
RTMP(Real Time Messaging Protocol) is a TCP based propriety protocol developed by Adobe System for the purpose of streaming Audio/Video data between Flash Player and media server.

RTMP Stream Plugin makes the flash video player, which generated by Moyea Web Player, supports the playback of live streaming videos, SMIL presentations, and streaming videos from RTMP servers: Wowza Media Server, Open Source Red5 server, FMS (Adobe’s Flash Media Server) and other RTMP servers. And it makes the flash video player gets the following highlight features:

  • Playback of RTMPT streams.
  • Random seeking to any positions of the video timeline.
  • Starting playback from any position in the video timeline
  • Playback of live streams.
  • Playback of SMIL presentations
  • Playback of streams from multiple RTMP servers.

Demo with a treaming video from Red5 RTMP server and a SMIL Presentation. Try seeking to randon position to start playback in the video timeline

DOWNLOAD HERE

Where this plugin appears:
After installed, this RTMP Stream Plugin will appear on the following interface of Moyea Web Player.

Example:

To implement the above demo, the step-by-step tutorial as below:

Step 1: Click “Add RTMP Stream” on the following interface, and then input streaming video URL (If the video extension is .flv, please don’t include .flv in the URL) into Moyea Web Player

Step 2: Choose “none” to be the value of “User define area” to remove the “Embed & URL” area at the right of the player.

Step 3: Click “Publish” button, and then you could get the above demo.

Stream Videos from Multiple servers?Live Streaming videos and SMIL Presentations
This RTMP Stream Plugin enables the generated flash video player to support the playback of video streams from multiple RTMP servers, the playback of live streaming videos and SMIL presentations. To stream these streaming videos, the procedure is the same as the above example.

Term interpretation:
SMIL
(pronounced “smile”) stands for Synchronized Multimedia Integration Language, is a W3C recommended XML markup language for describing multimedia presentations. It defines markup for timing, layout, animations, visual transitions, and media embedding, among other things. SMIL allows the presentation of media items such as text, images, video, and audio, as well as links to other SMIL presentations, and files from multiple web servers. SMIL markup is written in XML, and has similarities to HTML.