MPlayer Developers Interviewed
cruocitae writes "Three of the MPlayer developers just gave an interview, talking about the "mysterious" versioning system of their software and shared a few secrets about the upcoming releases, for example some words about the long-awaited Windows GUI, and of course, DVD menus. Project integrity also was a subject.."
Which does anyone prefer?
But I have had problems with WMVs, ASFs, and other proprietary formats.
It's like sex, except I'm having it!
No, definately not. MPlayer dvdnav was wholely written by Ötvös Attila (http://dcxx.fw.hu/)
The dvdnav patch has been publicly available (in it's unstable form) for quite a while now. It's almost certain that the XBMC guys just grabbed the patch and applied it to their sources.
Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
I can't find so maybe it's gone now, but MPlayer used to have a "joke FAQ" with entries like "Q: Why do I get audio but no video? A: You're blind". Unfortunately, a lot of people (myself included) mistook it for the real FAQ because a) in a Google search on "MPlayer FAQ" it came up first and b) honestly, it wasn't significantly more obnoxious or less helpful than the people in #mplayer.
What I'm listening to now on Pandora...
I'm constantly running into segfaults in mplayer.
I'm not surprised. I hacked mplayer once. And I do mean hacked, not programmed.
For starters, mplayer.c is 4000 lines long. Apparently only one man really knows what's going on in there, and he's not taking a look at it. Making sense of it was beyond what my cursory overview of the code could muster. Near as I could tell most of it was written to deal with bugs.
The main developers are from eastern europe, I think. They have a pechant for three letter variables, and not a character over. Terse and unreadable code is also preferred. I remember being asked why I dond't compress a three line, readable piece of code into a once liner, line noise version. Comments have long since passed into myth. I sometimes wondered if their compilers supported them.
The mplayer system is based on plugins. Written in c code that is hacked to the limit to introduce, insofar as it is possible, object orientation into c. Void pointers abound, and are probably the most common datatype in the respository.
The main mplayer "filter chain", works backwards, with each filter pointing to the previous one in the chain. It's method completely escaped me, but it did support adding filters on the fly... sort of.
All that said, the program is fantastic. I've rarely encountered many bugs, and its abilites are amazing. I've yet to encounter a video, audio or subtitle stream it cannot handle, and mencoder can write to a multitude of formats. Once you grok the command line syntax, there is no better tool for video manipulation, period. Just don't expect to be able to make custom modifications at a moments notice.
May the Maths Be with you!
Also, mplayer can get ornery when it can't grab as much memory as it wants. Closing an app or two usually does the trick...
I used to run mplayer on an old PII 450Mhz dell latitude with 64MB of ram under windows 2000 using direct rendering and framedropping i could watch 640x480 XVIDs (~150mb per file) at very reasonablle levels of quality. And I wasn't even using the winvidix thing for video accelleration on account of it not supporting the neomagic chipset. trying to play these same files in WMP was akin to watching a slideshow with the "next slide" guy passed out in his chair. winamp with ffdshow worked much better than WMP, but mplayer still beat it.
I wasn't just talking about mplayer.c . There's a whole respotory in there as well. Here's a wonderful snippet I worked on. This from "vf.c"
// Find the last filter (should be vf_vo)
// funcs: // caps: // used by default query_format() // used by default config() // data:
vf_instance_t* vf_add_before_vo(vf_instance_t **vf, char *name, char **args) {
vf_instance_t *vo, *prev = NULL, *new;
for (vo = *vf; vo->next; vo = vo->next)
prev = vo;
new = vf_open_filter(vo, name, args);
if (prev)
prev->next = new;
else
*vf = new;
return new;
}
Here's an example of the hacking in c to support OO I was talking about. Please note the void function pointers. This from "vf.h"
typedef struct vf_instance_s {
vf_info_t* info;
int (*config)(struct vf_instance_s* vf,
int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt);
int (*control)(struct vf_instance_s* vf,
int request, void* data);
int (*query_format)(struct vf_instance_s* vf,
unsigned int fmt);
void (*get_image)(struct vf_instance_s* vf,mp_image_t *mpi);
int (*put_image)(struct vf_instance_s* vf, mp_image_t *mpi);
void (*start_slice)(struct vf_instance_s* vf, mp_image_t *mpi);
void (*draw_slice)(struct vf_instance_s* vf, unsigned char** src, int* stride, int w,int h, int x, int y);
void (*uninit)(struct vf_instance_s* vf);
unsigned int default_caps;
unsigned int default_reqs;
int w, h;
vf_image_context_t imgctx;
vf_format_context_t fmt;
struct vf_instance_s* next;
mp_image_t *dmpi;
struct vf_priv_s* priv;
} vf_instance_t;
The codebase isn't pretty, but it does compile.
May the Maths Be with you!