FFMpeg image sequence to video using VP9 encoder

1

I'm trying to transcode mp4 to webm format in a lossless way. I tried two ways to do that.

For that purpose, I extracted mp4 video to image sequences (png). Then, I converted image sequence(without changing any frame) to webm video with a lossless flag. But, when i extract webm video to image sequences and compared with the images that i extracted from mp4 video, i realized that PSNR values were not infinity. It changes from between around 53-55 dB.

On the other hand, I directly transcoded mp4 to webm with a lossless flag. Then, I extracted image sequences from mp4 and webm format and compared PSNR values. This time i realized that PSNR values are infinity.

Encoding image sequences to webm video with lossless flag is not actually lossless. Is this true or am i doing something wrong?

metlira

Posted 2016-01-29T14:25:00.893

Reputation: 113

Answers

4

The MP4 video will be using some variant of the YUV colorspace, as does VP9. PNG stores RGB pixels. So your MP4 -> PNG -> VP9 pipeline has two colorspace conversions i.e. YUV -> RGB -> YUV. These conversions aren't mathematically lossless.

Gyan

Posted 2016-01-29T14:25:00.893

Reputation: 21 016