Take the 2-minute tour ×

I copied some cartoons from a VCD to my hard drive, to be able to manage the content more easily. However, probably because of the VCD outdated technology, there are two issues with these clips:

  1. There are massive black margins at the top and bottom of the clips. It seems that these margins make a widescreen film fit an old style 4:3 screen, but it is not really relevant in my case. How can I get rid of these margins?
  2. The quality is rather horrible. The image is a bit blurred and because this is a cartoon it looks more horrible than it would look for a normal film. Can I sharpen the image somehow?

I am running Debian Testing.

share|improve this question
how did you copy the cartoons? –  Janus Troelsen Jul 25 '12 at 21:42
@ysangkok, using the rip VCD option in k3b. But when I watch the actual VCD using one of the multimedia players, the issues are exactly the same. –  Grzenio Jul 26 '12 at 9:00

3 Answers 3

From the mencoder man page:

          Crops the given part of the image and discards the rest.  Useful to remove black bands from widescreen movies.
                  Cropped width and height, defaults to original width and height.
                  Position of the cropped picture, defaults to center.

It is a video filter (vf) so you apply it like this: mencoder -o out.mp4 -vf crop=320:240:0:10 in.mp4 for cropping a 320x240 region from point (x,y)=(0,10).

There is a sharpen filter too:

   -ssf <mode>
          Specifies software scaler parameters.

             -vf scale -ssf lgb=3.0
                  gaussian blur filter (luma)
                  gaussian blur filter (chroma)
                  sharpen filter (luma)
                  sharpen filter (chroma)
                  chroma horizontal shifting
                  chroma vertical shifting

You can apply the crop filter first, or you can apply the sharpen filter first, but it is probably faster to crop first since you are throwing data outside the crop region away anyway.

You're not gonna get much improvement. VCD uses MPEG-2 which is a pretty bad codec compared to modern standards.

The black bars are not inherently the fault of the VCD format. If your original source had the aspect ratio of 2.35:1, it would need to be letterboxed to fit in the supported 16:9 format. However, it is not necessary to letterbox a 16:9 source in 4:3.

share|improve this answer
Cheers, I will give it a try! –  Grzenio Jul 26 '12 at 9:54
I tried just the cropping bit, but I get the following error message: No audio encoder (-oac) selected. Select one (see -oac help) or use -nosound.. How do I know which audio encoder I need? –  Grzenio Jul 29 '12 at 7:21
You can copy the sound using -oac copy. No need to re-encode it unless you use an output container that doesn't support it. –  Janus Troelsen Jul 29 '12 at 11:59
Now I get the same message, but for video encoder. Which one is preferable? No video encoder (-ovc) selected. Select one (see -ovc help). –  Grzenio Jul 29 '12 at 17:42
Try lavf. Also, try stuff out before you ask. If the result is good, use it. If it isn't try something else. Codecs are often a matter of taste, you can't objectively say which one is better, it depends on your use case. In this day and age, MPEG-4 is often preferred. Try looking for examples online and see what they use. –  Janus Troelsen Jul 29 '12 at 17:45

If you prefer a GUI method I would recommend Avidemux. It is basically a frontend to mencoder (of ffmpeg I cant remember) but it lets you easily set conversion options. I would say if you are running transforms such as sharpen be prepared for a long wait, even on a fast computer.

share|improve this answer
it has sharpen, thx! –  Aquarius Power Dec 1 at 18:58

FFmpeg is likely the tool you are looking for. Someone may even have written the exact tool you need.


share|improve this answer
Maybe, but ffmpeg has a squillion options, many of them arcane. What options would be useful, with what value? –  Gilles Jul 25 '12 at 23:02
Yeah, I had a quick look at ffmpeg... but I would really appreciate precise options for my problems, because this stuff seems to do everything you can imagine and more... –  Grzenio Jul 26 '12 at 9:07

Your Answer


