【问题标题】:The same frame of the image, through the same algorithm or library, compression twice after the image is same or not同一帧图像,通过相同的算法或库,两次压缩后图像相同与否
【发布时间】:2018-08-15 01:59:19
【问题描述】:

同一帧图像,通过相同的算法或库,有损压缩两次,图像相同后压缩两次?

【问题讨论】:

    标签: ffmpeg compression frame


    【解决方案1】:

    图片不一样。有损编码器永久地操纵图像以减小文件大小,同时试图使质量看起来不错。这会引入伪影,这些伪影会成为原始图像中不存在的一部分。这称为世代损失。

    JPG 示例:

    1. 制作JPG图片:

      ffmpeg -i image.png image1.jpg
      
    2. 重新编码:

      ffmpeg -i image1.jpg image2.jpg
      
    3. 比较hash:

      ffmpeg -loglevel error -i image1.jpg -f hash -
      SHA256=9188931e7f40cd93101ef9eadaefa7ac8ace25c616e460fa7e58d8b4c7e138a1
      
      ffmpeg -loglevel error -i image2.jpg -f hash -
      SHA256=52c8b5ee9edbbc6e3a631d7f638df0d00a7c79ef10c7bb85659ff363a484be9d
      

    【讨论】:

      猜你喜欢
      • 2016-08-22
      • 2019-05-12
      • 1970-01-01
      • 1970-01-01
      • 2021-06-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多