MartinEesmaa / VVCEasy

VVCEasy is that you don't have to compile or/and coding to encode VVC (known as Versatile Video Codec). Simple. Easy. Encode. Decode
https://martineesmaa.org/en/vvceasy
MIT License
145 stars 15 forks source link

Unable to convert PNG format photos to VVC format #45

Closed jiangzemin-xudamin closed 2 months ago

jiangzemin-xudamin commented 2 months ago

In the version of FFmpeg you modified, it is normal to convert photos in png format directly to avif or jxl, but it is not possible to convert them directly to vvc format. What parameters need to be added to convert properly?

屏幕截图 2024-04-05 175531 屏幕截图 2024-04-05 175801 屏幕截图 2024-04-05 175905
MartinEesmaa commented 2 months ago

Hello, @jiangzemin-xudamin!

When encoding lossless picture to VVC in FFmpeg, it has to be divisible by 2 and only allows even numbers of integer. JPEG, AVIF, JPEG-XL and any supported images codecs can support any sizes of images without limitation.

I saw both errors output in your PowerShell terminal inside vvenc on FFmpeg:

Parameter Check Error: picture width is not an integer multiple of the specified chroma subsampling
Parameter Check Error: picture height is not an integer multiple of the specified chroma subsampling

The solution you can upscale or downscale by image size of width or/and height using -s:v command to make sure it is divided by 2 on FFmpeg to avoid errors.

Here's the command:

.\ffmpeg_vvceasy -i 1.png -s:v 1894x1358 1.vvc

I hope this solves your problem. :) Feel free to reply or ask question to me.

Thanks!

Regards

jiangzemin-xudamin commented 2 months ago

Think you very much! Martin

jiangzemin-xudamin commented 2 months ago
屏幕截图 2024-04-06 084947

With the default parameters, the VVC file is the one that takes up the least disk space among them