[vlc-devel] Why/how VLC is so fast? Especially with MJPEG streams.

Rémi Denis-Courmont remi at remlab.net
Mon Jun 4 16:45:58 CEST 2012


   Hello,

On Mon, 4 Jun 2012 16:33:39 +0200, Eric Beuque <eric.beuque at gmail.com>
wrote:
> - How VLC can be more than twice faster than an really optimized library
> dedicated for this task?

Most probably the decoder is faster and the rendering mechanism too.

If you care so badly, benchmarking is really up to you...

> - How VLC perform the rendering? Qt has only one GUI Thread, to perform
> rendering. But I'm thinking that VLC do not render the video using this
GUI
> thread, right?

Right.

> Is VLC drawing directly to the X11 or GDI+ output?

Normally, VLC uses XVideo with MIT-SHM, OpenGL or DirectX for rendering,
depending on the operating system. That is much faster than X11 or GDI.

> I'm only
> using a QWidget where i render all QImage i received, but i think it's
not
> he best way to do that.

QImage is not meant for video. It is almost not optimized at all.

> - I tried to read the source code of VLC, i found the mjpeg demux, but i
> don't understand where the data goes to be decoded. Could you explain to
me
> how globally works the VLC core and it threading?

That's too complicated. You can find explanations on the wiki.

VLC uses either FFmpeg/libav or SDL-image for JPEG decoding.

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list