DVD video playback using BeTVOut.

BeTVOut supports the two existing special DVD resolutions:

- NTSC 720x480: used for region 1 (USA) and 2 (Japan) for instance;
- PAL 720x576: used for region 2 (Europe) and 4 (Australia) for instance.

You should preferably use these modes on the respective discs, as this will offer the sharpest output possible while keeping CPU-load to the bare minimum (if no 'hardware overlay' is used anyway). The reason for this is that in these disc/mode combinations the picture does not have to be rescaled to be shown in the correct aspect ratio. If you do not have a TVset that can display both PAL and NTSC you can use only the supported one. The tradeoff is that while the correct aspect ratio can still be maintained by resizing the output the sharpness will degrade and CPU-load will increase. To resize the output keep the 'keep aspect ratio' option turned off and just resize the output window te be 'full screen'.

Note please that displaying NTSC movies (30 frames/sec) on PAL modes (displayes only 25 full frames/sec) is not possible without distortions on TV. If you use the vga_sync driver mentioned below (in the VLC section) you will notice 'missing' frames. If you do not use this driver, then you will notice frequent distortions (horizontal stripes) in random places on the screen.

Use of LCD VGA screens: If you want to watch video on a LCD VGA screen, then you don't want to use BeTVOut. The whole story on preventing resizing of the video output window will not increase the sharpness on VGA LCD screens, as they have 'fixed pixels' in the screen itself. Just use a standard Desktop resolution of 1024x768 preferably (and use upscale resizing), or use 800x600 if your LCD does not support 1024x768 (and use downscaling).

Optimal refreshrates for videoplayback: Because NTSC DVD's are coded for 60Hz (field) refreshrate and PAL DVD's are coded for 50Hz, these are the optimal refreshrates for playback also. You have to use them for display on TV anyway, because TV's cannot handle other refreshrates (The videostandards do not allow that). If you are watching on VGA and you are annoyed by these low refreshrates, you have only one practical alternative: double the refreshrate (if your monitor supports it!). This means that for PAL you could also use 100Hz refreshrate, while for NTSC you could use 120Hz.
You can also use other refreshrates, but you will then start to notice 'artefacts' during movie playback. If you use 75Hz for PAL for example, you would see image 'X' twice, while you would see image 'X+1' only once. After this the process repeats itself in this case. This translates to speedvariations which especially can be seen in scenes with rapid movement in it. If you use more awkward refreshrates, things will only get worse.

Synchronized playback to the screen refresh: Sometimes you can also see broad horizontal ofsetted display 'bars'. Such a bar is a part of the framecontent but it's a little bit shifted horizontally (best seen also during rapid movement in a scene). This is something that occurs if a new frame is not inserted in the displayed framebuffer during screen retrace time (the screen is turned off then), but during actual display time. This should be prevented by the DVD player application (or so) by synchronizing to the vertical retrace moment. This works optimally only if the refreshrate of the screen matches (or is double) the refreshrate of the movie. If you choose an awkward refreshrate it might not work at all...

The comb-effect and (de-) interlacing: Do not mix up the above effect with the 'comb' effect sometimes seen. This is the effect of mixing two fields (an even frame and a odd frame: de-interlacing) of a movie to get one complete image for display on VGA which is non-interlaced. This comb-effect looks like horizontal offset also, but this consists of very small horizontal 'bars' (only one 'line' in width). This effect can also be seen best during rapid movement in a scene. The process of filtering out this comb-effect is called 'motion compensation'. (VLC does not do this correctly (yet) with 4:3 coded discs so you can see the effect prominently then...)
One nice thing of sending the video output back to the TV-set is that the de-interlaced VGA output is re-interlaced again by the TVout chip. If playback is properly synchronized (to refreshrate and retrace) you can even turn off the de-interlacing process. On VGA this will look ugly, but on TV it will be perfectly OK...

Color depth versus CPU load: You should use at least 16bit color depth for video playback. If you do this you might still encounter color artifacts though. For instance if you look at a clear blue sky while the sun is visible also, you will notice blue color 'circles' surrounding the sun. These are visible because if you look to the sky further away from the sun the sky gets darker very gradually. The human eye can detect more that 64 shades of a color which is the maximum displayed in this mode (16 bit is 5+6+5 bits for the base 'light' colors red, green and blue; 6 bits is 64 'stages').
In order to loose this visible effect you should select a higher color depth. If you choose 32bit color then 24bit color is delivered on the TVoutput because this is the maximum the TVout chips can get inputted in RGB mode (all 32bits are delivered to the VGA screen however). On TV the number of bits per color becomes 8 (8+8+8 = 24) so the maximum displayed number of shades per color becomes 256. This is just enough for the human eye not to notice this artifact.

Note that 32bit color means that twice as much video data has to be moved than in 16bit color, so CPU load will rise. So if your system is not fast enough to display movies in 32bit colordepth, you should try to use 16bit colordepth instead.

HINT: aspect ratio: The 'keep aspect ratio' switch should only be turned on in two situations:
- You want to view a DVD using a standard (so 4:3) desktop resolution on TV and/or VGA, so in 640x480, 768x576 (used for PAL MPEG1/VCD only), 800x600 or 1024x768 (for VGA only) mode. In this case the screen aspect ratio (pixel-wise) is different from the recorded aspect ratio (pixel-wise). If you do not 'translate' the recorded aspect ratio to the displayed aspect ratio then you will notice distorted shapes (A full-moon will not be round for example).
- You want to view a 'anamorphic wide screen' DVD on a 4:3 TV-set that does not have a 'widescreen' mode, or on VGA. Luckily the TV-set situation does not apply very often: These 'very old' TV-sets (older than say 10-12 years) are 'nearing distinction'. On 'modern' 4:3 sets you turn on the 'widescreen' mode which does the aspect ratio 'translation' for you (it adds horizontal black bars on the top and bottom of the screen), while 16:9 TV's can be set to the 'widescreen' mode also. In this case the picture is 'broadened' to match the size of the TV screen which also is a form of aspect ratio 'translation'. These forms of aspect ratio 'translation' do not increase the CPU load of course and on 16:9 TV's also increase the resolution considerably!

HINT: TVout flickerfilter: The flickerfilter in the TVout chip was invented because of the fact that human eyes are more sensitive to low refreshrates on static pictures than on moving pictures. Because on TV everything moves all the time, you will (almost) not detect the low refreshrate used there. If you display the computer desktop on TV however you will detect this. Thus a flickerfilter is used. This filter cuts off the sharp edges from the displayed image by combining a few displayed lines to generate one line. For the human eye this looks more attractive apparantly than the flickering effect.
If you want to display a movie 'generated' on a computer, then you should turn off this filter as the picture sharpness will increase while you will (almost) not detect the flickering anyway (moving pictures)...

Definition of the 'anamorpic wide screen' format: This format is used for widescreen DVD's only, like 16:9, 21:9 or 22:9 movies. If you record widescreen movies just 'as they are' you will always have these horizontal black bars on the top and bottom of the screen. This is a waste of the MPEG2 standard. Also it is a waste of the analog (TV) video standards, as these black bars have to be 'transmitted' even though it carries no real information. If you stretch the 16:9 format movies vertically (the 21:9 and 22:9 also using the same 'scaling factor'), you will put this unused space/capacity to use.

Of course, on 4:3 TV's you will have to shrink the movie again (add the black bars manually: widescreen mode) to get the correct aspect ratio on screen. You will loose the added 'resolution' because the movie will be displayed on the same amount of horizontal TV-'lines' as it would if the extra lines were not used. But, if you have a 16:9 TV, you only need to stretch the picture horizontally (to fill up the entire screen at the left and right side) to restore the correct aspect ratio. This means that the extra 'resolution' will actually be displayed on TV! This picture quality improvement (up to around 30%) is surely visible to the user...

Anamorphic widescreen recorded DVD's are sometimes labeled with the 'anamorphic widescreen' text on the box. Luckily most widescreen movies (as far as I know) that do not have that label are in fact also recorded in this format...

Just one more thing here: As far as I have seen until now TV-broadcasts do not (yet) use this anamorpic widescreen format (they could do this technically speaking!). So if you sometimes feel that DVD's can be sharper than actual broadcasts on TV, you are right!

Playback of 4:3 discs and non-anamorphic discs on any TV and/or on VGA:

If you play 4:3 aspect ratio discs or other aspect ratio discs that are not recorded in the 'anamorphic wide screen' format you will be able to correctly display them on any TV (4:3 or 16:9) and on VGA simultaneously while enjoying optimal sharpness. You need to turn off the 'keep aspect ratio' option in the player software and display the ouput window in 'full screen' mode in the special DVD resolutions (720x480 or 720x576).

Playback of anamorpic wide screen discs on 16:9 (or modern 4:3) TV-sets:

In this case you should keep the 'keep aspect ratio' option disabled. Use the TV's 'widescreen' mode instead to correct the aspect ratio. Be sure to use the special DVD resolutions. These settings offers the sharpest DVD experience possible if viewed on a 16:9 TV! Note that on VGA you will get distorted output however (i.e. the full moon is not round..).

Playback of anamorphic wide screen discs on old 4:3 TVs:

Now you should enable the 'keep aspect ratio' option and select NTSC 640x480 or PAL 768x576 MPEG1/VCD TVout mode. Of course the playback quality and the CPU load are not optimal now...
If you would still use the special DVD resolutions you would get the wrong aspect ratio (a 16:9 movie for example would get a height of 405 pixels instead of the needed 432 for PAL or 360 for NTSC). Note once again that on VGA you will get distorted output then also (i.e. the full moon is not round..).

(Universal) playback of DVD's on VGA only.

Now you always should keep the 'keep aspect ratio' option enabled and view the discs in 1024x768 resolution. The DVD application should resize the output window (default size) to scale-up the output so that the horizontal 'resolution' is corrected to match the vertical resolution of the disc for the aspect ratio that is required (for PAL 16:9 this would be 1024x576, for NTSC 16:9 853x480). If your monitor doesn't support 1024x768 then 800x600 should be selected, and the DVD application should scale down the vertical 'resolution' to match the horizontal resolution for the required aspect ratio. In this case a 16:9 movie for example requires a 720x405 output window for both PAL and NTSC discs.
Scaling down gives a less sharp image than scaling up, but uses probably less CPU cycles to create it. One problem you will always have is that if you want 'fullscreen' output (maximize the output window) extra rescaling is required which will eat up CPU cycles and decay the image sharpness.

If you use the special DVD resolutions on VGA however, then these problems would disappear (rescaling is not neccesary then: turn 'keep aspect ratio' off). Unless you want to view anamorpic widescreen movies. These have to be rescaled but with another factor than usual now (see 'Playback of anamorphic wide screen discs on old 4:3 TVs' above), which will probably not be supported by the DVD player application: So don't use the special DVD resolutions for these movies on VGA...

VLC use on BeOS using BeTVOut.

VLC V0.31 can be used with BeTVOut almost without modifications or restrictions these days. If you have a TNT card, you'd best use the old downloads below for now, but if you have a GeForce card (or another card that supports hardware overlay on BeOS) you should try VLC V0.31 with a few caveats:
- You'll need command line options to set VLC for optimum results. Hey, it's not that hard. Read how to do it here (4kB).
- If you have a GeForce card, you'll also need a tweaked version of VLC to get subtitles working. The source is here (8kB: copy it to vlc-0.3.1/plugins/spudec/ and just recompile) and the complete precompiled version including sources is here (2.6Mb: compiled for R5.0.3 with P3 CPU).

Old stuff:
VLC (VideoLan Client) is a opensource DVD player application which runs on many platforms, including BeOS. It still is in constant development and isn't finished yet. For instance it does not support the 'keep aspect ratio' switch (yet). Also accurate default window sizes are not yet implemented. It also looks like the synchronisation to the screen retrace does not exist yet. Unfortunately the DVD menusystem is also not yet implemented, this is planned for version 0.3 as fas as I know.
If you want to use VLC for DVD playback using the special DVD resolutions, there's a 'trick' to get VLC to display with the 'keep aspect ratio' switch off. (Note that you do not need this for discs that are coded in 4:3 aspect ratio.) I suspect it keeps scaling anyway, but it scales back also to the original ratio recorded on the disc. I can imagine 'roundoff' errors still exist, and also the CPU-load could be lower. You can also recompile the VLC with some changes for real disabled aspect ratio scaling output.

VLC disable 'keep aspect ratio switch' trick for non 4:3 discs: Start a terminal session and switch to the vlc folder. Start VLC by typing 'vlc --height=405'. If you have a DVD resolution mode active, just resize the VLC output window to display full screen. That's it. It works also for NTSC discs on PAL mode and vice versa. In these cases the output will be resized to match the output screen so you will loose some sharpness...

Recompiling VLC with real disabled 'keep aspect ratio' switch and improved subtitle readability is also possible. You can read how to do this in this file.

Recompiling VLC with VGA vertical retrace lock can also be done. This takes care of the 'mid-screen refresh' frame-updates but only if display is at 50 or 60Hz, otherwise the DrawBitmap function used is to slow to be executed entirely in the retrace time-period. (It would be nice if DirectWindow which should be faster could be used: Someone at Videolan is working on this, and also on better audio/video sync...)

This 'trick' involves installing a small extra (included) driver called vga_sync. Also you have to place two files in the VLC sourcetree, in '/plugins/beos/' before you recompile. It has been tested with the snapshots of 20011029 and 20011106 (this one has chapter/title select options). Be aware that CPU load will rise somewhat though...

Get the files neccesary here (17kb), or just download the precompiled VLC versions on the main BeTVOut page.
If there are errors in this page please let me know. Thanks.


- Back to BeTVOut main page.

(Page last updated on May 1, 2002)