[Libav-user] What define the quality of a decoded video

Alex Cohn alexcohn at netvision.net.il
Sun Jun 23 22:49:17 CEST 2013


On Fri, Jun 21, 2013 at 5:45 PM, Guillaume Bersac <bersac_1 at hotmail.fr> wrote:
> HI,
>
> I have a basic .avi video. I decode it, reencode it using the same type of
> encoder without modifying the decoded data and finally I save it on one file
> of my computer. The saved video has a good framerate but it had lost a lot
> of quality in the process (it's now with a lot of pixel). I kwon that the
> image has been decoded without losing quality. The lost of quality appeared
> during the decoding and saving process.
> What define the quality of a decoded video ?
>
> Thanks,
> Guillaume Bersac
> 237bis rue de Pessac
> 33000 Bordeaux
> 06.65.30.89.43

The quality was lost because of re-encoding. Video encoders involve
irreversible transformations, e.g. quantization. Applying this kind of
transformation several times may easily result in bad visual.

Luckily, you don't need to go through this process if your goal is to
store some video file in a different format. ffmpeg accepts "-vcodec
copy" parameter, which will bypass decoding and re-encoding, and keep
the quality of the original. Same can be easily achieved
programmatically using libavformat and libavcodec, if you are writing
your program (implied by your posting to the libav-user list, and not
to ffmpeg-user list).

Note however that not all container formats are compatible with all
codecs, so in some use cases "-vcodec copy" is invalid.

Sincerely,
Alex


More information about the Libav-user mailing list