6.2. Usage tips
Prev | Chapter 6. TV input | Next

## 6.2. Usage tips

The full listing of the options is available on the manual page. Here are just a few tips:

- Use the `channels` option. An example:

      -tv channels=26-MTV1,23-TV2

  Explanation: Using this option, only the 26 and 23 channels will be usable, and there will be a nice OSD text upon channel switching, displaying the channel's name. Spaces in the channel name must be replaced by the "_" character.

- Choose some sane image dimensions. The dimensions of the resulting image should be divisible by 16.

- If you capture the video with the vertical resolution higher than half of the full resolution (i.e. 288 for PAL or 240 for NTSC), then the 'frames' you get will really be interleaved pairs of fields. Depending on what you want to do with the video you may leave it in this form, destructively deinterlace, or break the pairs apart into individual fields.

  Otherwise you'll get a movie which is distorted during fast-motion scenes and the bitrate controller will be probably even unable to retain the specified bitrate as the interlacing artifacts produce high amount of detail and thus consume lot of bandwidth. You can enable deinterlacing with `-vf pp=DEINT_TYPE`. Usually `pp=lb` does a good job, but it can be matter of personal preference. See other deinterlacing algorithms in the manual and give it a try.

- Crop out the dead space. When you capture the video, the areas at the edges are usually black or contain some noise. These again consume lots of unnecessary bandwidth. More precisely it's not the black areas themselves but the sharp transitions between the black and the brighter video image which do but that's not important for now. Before you start capturing, adjust the arguments of the `crop` option so that all the crap at the margins is cropped out. Again, don't forget to keep the resulting dimensions sane.

- Watch out for CPU load. It shouldn't cross the 90% boundary for most of the time. If you have a large capture buffer, MEncoder can survive an overload for few seconds but nothing more. It's better to turn off the 3D OpenGL screensavers and similar stuff.

- Don't mess with the system clock. MEncoder uses the system clock for doing A/V sync. If you adjust the system clock (especially backwards in time), MEncoder gets confused and you will lose frames. This is an important issue if you are hooked to a network and run some time synchronization software like NTP. You have to turn NTP off during the capture process if you want to capture reliably.

- Don't change the `outfmt` unless you know what you are doing or your card/driver really doesn't support the default (YV12 colorspace). In the older versions of MPlayer/ MEncoder it was necessary to specify the output format. This issue should be fixed in the current releases and `outfmt` isn't required anymore, and the default suits the most purposes. For example, if you are capturing into DivX using `libavcodec` and specify `outfmt=RGB24` in order to increase the quality of the captured images, the captured image will be actually later converted back into YV12 so the only thing you achieve is a massive waste of CPU power.

- There are several ways of capturing audio. You can grab the sound either using your sound card via an external cable connection between video card and line-in, or using the built-in ADC in the bt878 chip. In the latter case, you have to load the btaudio driver. Read the `linux/Documentation/sound/btaudio` file (in the kernel tree, not MPlayer's) for some instructions on using this driver.

- If MEncoder cannot open the audio device, make sure that it is really available. There can be some trouble with the sound servers like aRts (KDE) or ESD (GNOME). If you have a full duplex sound card (almost any decent card supports it today), and you are using KDE, try to check the "full duplex" option in the sound server preference menu.

Prev | Up | Next
6.1. Compilation | Home | 6.3. Examples