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.

  • how did you copy the cartoons? Jul 25, 2012 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, 2012 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.

  • Cheers, I will give it a try!
    – Grzenio
    Jul 26, 2012 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, 2012 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. Jul 29, 2012 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, 2012 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. Jul 29, 2012 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.


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



You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .