views:

108

answers:

2

Currently what I have a Linux application that was written using Xlib and I needed to add video playing capabilities into it.

What libraries would you recommend that I could use for video decoding and rendering that works well with Xlib?

A: 

ffmpeg or mplayer.

Rob
A: 

The options are plentiful.

Xine is probably the easiest (easier than FFmpeg, anyhow) without requiring anything beyond itself and Xlib. There's a short, complete example in under 180 lines of actual code.

muxine is a very small player that just creates a X11 window and play a given stream MRL. Source code: muxine.c.

You can compile muxine with:

gcc -Wall -O2 `xine-config --cflags`
    -o muxine muxine.c `xine-config --libs`

On the other hand, using MPlayer+XEmbed is pretty easy too, much easier if you don't care to have much control over the video playback. Create a X11 window, and run mplayer -wid <window-id>.

ephemient