AOMediaCodec / libavif

libavif - Library for encoding and decoding .avif files
Other
1.44k stars 188 forks source link

Extended uncompressed YUV/Y4M support #179

Open Krav4uK opened 4 years ago

Krav4uK commented 4 years ago

avifenc 0.7.3 reports an error Unsupported y4m pixel format: PC601YUV420P8.y4m when *.y4m file starts with YUV4MPEG2 W1920 H1080 F25:1 Ip A0:0 C420mpeg2, replacing it with YUV4MPEG2 W1920 H1080 F25:1 Ip A0:0 C420jpeg XYSCSS=420JPEG XCOLORRANGE=FULL works fine, need to be able to adjust input YUV details manually(Full/Limited range, chroma position).

There is support for reading ICC profile from input .jpg file, but it is impossible when performing encoding from Y4M to specify the same .jpg file as a source of ICC profile, and if it is present - add to the output *.AVIF file.

Not able to receive Y4M through STDIN like avs2pipemod64 -y4mp avisynth.avs | x265, without creating temporary files.

Is it possible to support combining multiple images into *.AVIFS sequence or animation? For example by automatically cropping the black edges of Y4M containing multiple frames with different resolutions? This will save extra space on file systems with a large cluster size (also prompted to automatically change the quantizer to round the file size to 64KB).

joedrago commented 4 years ago

This sounds like 4 independent GitHub issues all piled into one, but I have news for the last two paragraphs:

The next release of libavif should be able to not only encode AVIF image sequences, but I hope to support y4m piped from stdin in avifenc. I might have to bolster the y4m reader to detect more formats, but my early tests are looking good (testing with avs2yuv).