I have a 200MB AVI that I'm trying to add hardsubs to. I'm using VirtualDub to do it. I selected the H264 lossless codec for compression. The resulting file is 800MB. Why does this happen? Is there a better way to do this?

  • fyi an avi can hold video with arbitrary encoding. – akostadinov Feb 25 '13 at 21:10

The reason is that lossless doesn't loss any quality but makes the file bigger and lossy which is the oppostite reduces video and sound quality but at a smaller file.

I would choose a different codec or choose the H.264 Lossy Codec for it.

EDIT: I would choose H.264 Lossless Codec and convert it using Handbrake MP4 ffmpeg format.

  • Yes yes I know about lossy and lossless compression. Even if it's lossless that shouldn't cause the file size to go up by a multiple of four should it? I would expect the file size to not change much since I'm just adding subtitles. It should probably even go down since the subtitles cover graphical information. – tony_sid Jan 1 '11 at 2:16
  • See my edit. About Handbrake – Benny Jan 1 '11 at 2:17
  • Lossy compression loses information, and makes a smaller file size. When you expand you get an image back. That has a certain size (width x height) and colour depth (number of bits, normally between about 16 and 32 bits / pixel). When you then re-encode that in a lossless format, there is no permitted information that can be thrown away, so you are basically just (re-)encoding the picture, frame by frame. It will be bigger a consequence, and being lots bigger is no surprise. – quickly_now Jan 1 '11 at 2:26
  • So are you saying that the original AVI is compressed, and when I convert it it gets uncompressed and that's why it gets bigger? – tony_sid Jan 1 '11 at 2:35
  • every time you re-render and try not to lose data it will get bigger, hence the use of sameq or vcodec copy to generally maintain file size with ffmpeg. virtualdub may not be able to do this...and hard adding subs isn't something i like doing. you can add a track with sync data so that they can be toggled on and off with MUCH lower size overhead – RobotHumans Jan 1 '11 at 2:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.