VCD/MPEG1 video playback using BeTVOut.




BeTVOut supports two special VCD/MPEG1 resolutions:

- NTSC 640x480: used for movies with 30 frames per second (or less) preferably coded in 320x240 resolution;
- PAL 768x576: used for movies with 25 frames per second (or less) preferably coded in 352x288 or 384x288 resolution.

You should preferably use these modes on the respective movies, 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. Make sure you keep the 'keep aspect ratio' option turned on 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 on this site 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.

Optimal refreshrates for videoplayback: You should use 50Hz refreshrate on movies coded with 25 frames per second and 60Hz refreshrate on movies coded with 30 frames per second for the smoothest playback. You have to use these 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!).
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 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: Because each horizontal 'line' in a movie is shown exactly twice this effect does not exist for VCD / MPEG1 movies. For each even and odd frame exactly the same picture is shown...

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 always be turned on for VCD/MPEG1 movies. Do not use the DVD video modes because these will mess up the aspect ratio shown.

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)...

(Universal) playback of VCD/MPEG1 movies on VGA only.

Again: keep the 'keep aspect ratio' option enabled. View the discs in the resolution that matches or is one step higher than the movie is coded in. This is because scaling down gives a less sharp image than scaling up.


VLC use on BeOS using BeTVOut.

Update:
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 and VCD/MPEG1 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 VCD/MPEG1 playback using the special VCD/MPEG1 resolutions the aspect ratio should be turned on as it is by default.

Recompiling VLC with VGA vertical retrace lock can 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 DVD 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.

Playing VCD discs on BeOS can be done if you download BeVCD (for example) from BeBits and install the included VCD filesystem-addon. You can mount VCD's then and watch them on TV using the tweaked VLC with 'vga_sync' active using BeTVOut. The video output looks very nice then...
If there are errors in this page please let me know. Thanks.

Rudolf.

- Back to BeTVOut main page.

(Page last updated on May 1, 2002)