Full-screen MPEG for Linux

This message discusses issues related to direct graphic
access (e.g. full-screen video) on Linux and other OS’s
using X11.–

Our MPEG/VCD Player (mtv) now has a full-screen mode that uses
^^^^^^^^^^^^^^^^
hardware scaling on Linux. It uses Sam Lantinga’s SDL library
that provide direct graphic access through the XFree86 drivers.

For those interested to look at SDL or to try mtv, there are
links at the end of this message.

It would be nice if the SDL library could also work with
Xi Graphics Accelerated-X server. Jeremy, any chance that
some type of compatibility will exist in the future ?

It would be even better if there was some type of standard library
on Linux (and other Unix’s ?) to provide direct graphic access,
including access to hardware planes, full-screen in various
resolutions, double-buffer/buffer-flipping,
and other hardware acceleration such as color conversion
(YUV to RGB) and accelerated motion compensation, which are
necessary to do real-time MPEG-2 decoding and are now supported
by many graphic chips.

Without such support it will be very difficult to develop
a DVD player for example. If we could do that, we think many more
people would choose Linux for some multimedia-based applications
where the only choice today is Windows. This would be very good
for the Linux industry.

Sam Lantinga did a good job with SDL, but unfortunately SDL still
has some limitations:

  • X11 version only works with XFree86 (and only on Linux)

  • Require that the appropriate resolutions (for MPEG-1 at least
    320x240, 352x240, 352x280 and 352x288) be properly configured
    in the XFree86 config file. Configuring XFree86 is not always
    a trivial thing to do, but we can hope that some better and
    more automatic XFree86 configuration tools will become available.

  • Requires to run application as root or set-uid root
    in order to have access to full-screen mode. I heard
    this will be fixed.

  • No access to color conversion and accelerated motion
    compensation (because there is nothing in the XFree86 driver
    to access those features even when available in graphic chips).

  • A few bugs, some graphic chips/cards (RIVA128) not well supported,
    but all those problems will be solved eventually.

Any effort that would solve those problems and improve multimedia
support for Linux would be welcome!

What would be the best forum/mailing-list/newsgroup
to discuss / work on this type of issues ?


Regards, – Tristan Savatier (President, MpegTV LLC)

MpegTV: http://www.mpegtv.com
MPEG.ORG: http://www.mpeg.org


The SDL home page:
http://www.devolution.com/~slouken/SDL/

There is more infos on mtv’s full-screen mode at:
ftp://ftp.mpegtv.com/pub/mpeg/mpegtv/player/doc/README-Fullscreen

The mtv player (an MPEG / VCD player for Linux & Unix)
can be downloaded from our ftpsite:
ftp://ftp.mpegtv.com/pub/mpeg/mpegtv/player

Installation instructions are available from our website:
http://www.mpegtv.com/download.html

Just a few clarifications…

It would be nice if the SDL library could also work with
Xi Graphics Accelerated-X server. Jeremy, any chance that
some type of compatibility will exist in the future ?

I believe the issue is Xi Accelerated-X doesn’t support the DGA extension.
Video playback still works in a window.

It would be even better if there was some type of standard library
on Linux (and other Unix’s ?) to provide direct graphic access,
including access to hardware planes, full-screen in various
resolutions, double-buffer/buffer-flipping,

Hopefully SDL will be able to provide this. It already does to some extent,
and will be greatly improving in the future.

Sam Lantinga did a good job with SDL, but unfortunately SDL still
has some limitations:

  • X11 version only works with XFree86 (and only on Linux)

This is fullscreen only. Windowed modes work on all X servers.

  • Require that the appropriate resolutions (for MPEG-1 at least
    320x240, 352x240, 352x280 and 352x288) be properly configured
    in the XFree86 config file. Configuring XFree86 is not always
    a trivial thing to do, but we can hope that some better and
    more automatic XFree86 configuration tools will become available.

If the smaller modes are not defined, the full-screen display will be
centered within a larger mode. If the larger mode has an odd aspect
ratio, this will result in stretching of the display on the screen.

  • Requires to run application as root or set-uid root
    in order to have access to full-screen mode. I heard
    this will be fixed.

I don’t anticipate this being fixed in the X server, but other fullscreen
solutions (fbcon, etc.) should fix this.

  • A few bugs, some graphic chips/cards (RIVA128) not well supported,
    but all those problems will be solved eventually.

These are bugs in the XFree86 DGA implementation, and need to be addressed
by the XFree86 group.

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Sam Lantinga wrote:

Just a few clarifications…

It would be nice if the SDL library could also work with
Xi Graphics Accelerated-X server. Jeremy, any chance that
some type of compatibility will exist in the future ?

I believe the issue is Xi Accelerated-X doesn’t support the DGA extension.
Video playback still works in a window.

Yes, of course, but we only use SDL for full-screen.

For video playback in a window we use the X shared memory extension,
which is I believe what SDL uses too, so the performances
are the same, and it does work on all X server that support
shared memory.

It would be even better if there was some type of standard library
on Linux (and other Unix’s ?) to provide direct graphic access,
including access to hardware planes, full-screen in various
resolutions, double-buffer/buffer-flipping,

Hopefully SDL will be able to provide this. It already does to some extent,
and will be greatly improving in the future.

Excellent! I am so happy to hear that.

Sam Lantinga did a good job with SDL, but unfortunately SDL still
has some limitations:

  • X11 version only works with XFree86 (and only on Linux)

This is fullscreen only. Windowed modes work on all X servers.

Yes, I know (see my ealier remark).

  • Require that the appropriate resolutions (for MPEG-1 at least
    320x240, 352x240, 352x280 and 352x288) be properly configured
    in the XFree86 config file. Configuring XFree86 is not always
    a trivial thing to do, but we can hope that some better and
    more automatic XFree86 configuration tools will become available.

If the smaller modes are not defined, the full-screen display will be
centered within a larger mode. If the larger mode has an odd aspect
ratio, this will result in stretching of the display on the screen.

Yes, correct. But to get actual full screen (with no back margins
around the video) and correct aspect ratio,
you need the proper video mode to be setup in XF86Config.

Thanks for your good remarks, Sam.

-t

  • A few bugs, some graphic chips/cards (RIVA128) not well supported,
    but all those problems will be solved eventually.

This is a bug in XFree86, not in the SDL library. It’s mostly nVidia’s
fault, though, for not providing full technical docs on the Riva128 chip.

Any effort that would solve those problems and improve multimedia
support for Linux would be welcome!

What would be the best forum/mailing-list/newsgroup
to discuss / work on this type of issues ?


Regards, – Tristan Savatier (President, MpegTV LLC)

I own mpegtv, how do I get my (supposedly free, according to the thing I
read when i bought it) upgraded version?On Tue, 15 Dec 1998, Tristan Savatier wrote:


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

Just a few clarifications…

It would be nice if the SDL library could also work with
Xi Graphics Accelerated-X server. Jeremy, any chance that
some type of compatibility will exist in the future ?

I believe the issue is Xi Accelerated-X doesn’t support the DGA extension.
Video playback still works in a window.

yeah, the extension library is -lxf86_dga, no?

It would be even better if there was some type of standard library
on Linux (and other Unix’s ?) to provide direct graphic access,
including access to hardware planes, full-screen in various
resolutions, double-buffer/buffer-flipping,

Hopefully SDL will be able to provide this. It already does to some extent,
and will be greatly improving in the future.

Sam Lantinga did a good job with SDL, but unfortunately SDL still
has some limitations:

  • X11 version only works with XFree86 (and only on Linux)

This is fullscreen only. Windowed modes work on all X servers.

should work on freebsd as well, no?On Tue, 15 Dec 1998, Sam Lantinga wrote:


Scott M. Stone <sstone at pht.com, sstone at pht.co.jp>
Head of TurboLinux Development/Systems Administrator
Pacific HiTech, Inc (USA) / Pacific HiTech, KK (Japan)

should work on freebsd as well, no?

I don’t have FreeBSD, but it should with a minimum of tweaking.

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

Scott Stone wrote:

  • A few bugs, some graphic chips/cards (RIVA128) not well supported,
    but all those problems will be solved eventually.

This is a bug in XFree86, not in the SDL library. It’s mostly nVidia’s
fault, though, for not providing full technical docs on the Riva128 chip.

I know that the bug is in XFree86, not in SDL.

I own mpegtv, how do I get my (supposedly free, according to the thing I
read when i bought it) upgraded version?

Download it from our ftp site.

There are pointers at the end of the "Full-screen MPEG for Linux"
message.

If you have registered, you should have a serail number or
key code. you can use it with the upgrade.

make sure you backup the old version of mtv, just in case.

-t> On Tue, 15 Dec 1998, Tristan Savatier wrote:

Sam Lantinga wrote:

For video playback in a window we use the X shared memory extension,
which is I believe what SDL uses too, so the performances
are the same, and it does work on all X server that support
shared memory.

Are you using X for anything besides X shared memory extension?
If not, you might want to just remove it, since it’s silly to have
redundant code for the window. (Of course SDL doesn’t support
libXt, or window resizing or multiple windows or… :slight_smile:

Yes, right, I could use SDL, but I also allow window
resizing, which SDL cannot do, and I support multiple windows
and drawing the video in an existing window (e.g. the root window).

Also, I want support for all X servers and other Unix systems,
like Solaris etc.

So I like better to keep my old code for regular windows,
at least for now.

-t

Yes, right, I could use SDL, but I also allow window
resizing, which SDL cannot do, and I support multiple windows
and drawing the video in an existing window (e.g. the root window).

Also, I want support for all X servers and other Unix systems,
like Solaris etc.

So I like better to keep my old code for regular windows,
at least for now.

Yup, makes sense.

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/