[FFmpeg-user] [AVCHD] Join + resize?

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Oct 31 13:28:46 CET 2012


Gilles <codecomplete <at> free.fr> writes:

> >> Is there a codec that would give a less compressed 
> >> output than mpeg4?
> >
> >less compressed?
> 
> Yes. With this...
> 
> ffmpeg -i myfile.mts -s 640x480 -codec:v mpeg4 -profile:v 3 -codec:a
> copy myfile.mp4
> 
> ... the video shows heavy compression ("patches" in dark aeras).

The term is "artefacts" or "compression artefacts".
If you say "less compressed" it usually says nothing 
about quality, it asks for a worse (older) encoder...

> >Without you specifying a bitrate or a constant quantiser, 
> >this is not going to produce something useful.
> 
> Problem is, I know next to nothing about video :-/

You can either encode with constant quality (and variable 
bitrate). This can be achieved (with most encoders) with 
-qscale. 2 means best quality, the highest value varies 
with the encoder. This is likely not what you want, except 
if you need to re-encode (because the player does not support 
the original codec or you want to resize), best quality is 
wanted and size does not matter.

The alternative is constant bitrate (variable quality), this 
can be achieved with -vb, the default is -vb 200k which is a 
very, very low bitrate.
For best results, use two-pass encoding, ie first encode with 
-pass 1, then with -pass 2 (an intermediate text file will be 
saved that allows ffmpeg to know about future frames on pass 2).

> All I know is that the original files combined are about 2.5GB for
> 40mn, and I'd like to end with something closer to movies off the Net
> (DivX, etc.), ie. about 350MB (1h30 movie = 700MB).

You will have to do the calculations yourself or use 
trial-and-error ;-)

> Ffmpeg supports so many codecs that I don't know which to try.

libx264 is the best encoder, use mpeg4 if you can't use it.
libx264 may not understand -qscale, the corresponding 
option is call -cfr iirc.

Carl Eugen



More information about the ffmpeg-user mailing list