Take the 2-minute tour ×
Video Production Stack Exchange is a question and answer site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation. It's 100% free, no registration required.

I have several movie files in a mkv container.

ffmpeg -i filename gives me the following output:

Stream #0.0(eng): Video: h264 (High), yuv420p, 1280x720, PAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Stream #0.1(eng): Audio: dca (DTS), 48000 Hz, 5.1, s16, 1536 kb/s (default)
Stream #0.2(eng): Subtitle: [0][0][0][0] / 0x0000 (default) (forced)

Unfortunately the file size is pretty big. I was wondering, if there is a way to reduce the file size percentage-wise? Something like: "Reduce file size by 10%"?

I would prefer command line tools, such as ffmpeg/avconv or similar?

share|improve this question
Well, I'd prefer reducing file size. –  Frederik Spurner Apr 21 at 7:50
Do you want to achieve a specific file size, or do you just want it measurably smaller? Do you want to keep the 5.1 channels or make it stereo? Do you want to change 1280x720 to something smaller? –  LordNeckbeard Apr 22 at 16:46

1 Answer 1

There is no switch to set a file size in percentage but there is the -fs switch. This switch can bet set to let ffmpeg try to get to a specific target file size set in bytes (for example -fs 52428800 to get to 50MB). You can write a script that takes the original file size and calculates your new desired file size depending on your specified percentage value and passes that calculated value to the -fs switch. The resulting file wont be exactly at that file size though, ffmpeg will try its best but depending on the source file and your desired file size it wont be possible to reach that file size.

Even with the worst possible bit rate you can't produce a 20byte sized 720p mkv with 1 hour runtime. You get the idea, there will always be a certain error margin with the resulting file size.

If you simply want to reduce the file size by a good portion I recommend just using presets. Generally using the normal preset for x264 will give you a lot smaller video with no or very little quality reduction. Remuxed or encoded Blu-rays or camera recordings usually have a crazy bitrate which results in these huge file sizes.

In your case if you are not interested in 5.1 sound you could also convert the 5.1 DTS sound into stero AAC or MP3 sound which will reduce the file size quite a bit aswell without hearable quality loss (for most human beings) in the sound.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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