Selur's Little Message Board
[BUG] AviSynth Imagestream - Unable to export H264 4:4:4 lossless for TV Luma Range - Printable Version

+- Selur's Little Message Board (https://forum.selur.net)
+-- Forum: Hybrid - Support (https://forum.selur.net/forum-1.html)
+--- Forum: Problems & Questions (https://forum.selur.net/forum-3.html)
+--- Thread: [BUG] AviSynth Imagestream - Unable to export H264 4:4:4 lossless for TV Luma Range (/thread-1462.html)



AviSynth Imagestream - Unable to export H264 4:4:4 lossless for TV Luma Range - The_Tinkerer - 18.07.2020

I know you're away but I found some issues with image streams and lossless encoding and if I don't post while this is fresh in my head I'm going to lose it. Tongue

I have an image stream of PNG files that were processed from a source that has a Luma Range of Limited/TV.

I import with the following settings:

[Image: 1YgdI8L.png]

I export with the following lossless settings for H264:

[Image: cvadm0G.png]

In Vapoursynth, I can export i420, i422, and i444. They all look correct with regard to colors / levels (although I have to set a Levels filter in Vapoursynth to get it to match the source).

In AviSynth, I can export i420, i422, but not i444. I get a CRASHED ERROR with i444:

-> 2020-07-17@17_47_15_8310_02_video crashed: ERROR: C:\Users\ADMINI~1\AppData\Local\Temp\2020-07-17@17_47_15_8310_02.264 is too small! (byteSize: 0byte)
Aborting '2020-07-17@17_47_15_8310_02_video' due to: ERROR: C:\Users\ADMINI~1\AppData\Local\Temp\2020-07-17@17_47_15_8310_02.264 is too small! (byteSize: 0byte)

The AviSynth preview works so this only happens when processing the job to mp4 file.

In AviSynth, if I import the image stream with the Luma Range set to PC, like this:

[Image: pPmkMwk.png]

Then the above crash / error doesn't happen and I can export i444. However, the colors / levels are off from the source due to the "PC" luma range setting. I'm unable to fix it using AviSynth filters (Levels, Smooth Levels, Smooth Curves, etc.)... they all do some level of correction but don't match the source. That defeats the point of lossless encode. Tongue

(Source is on the left.)

[Image: 4vmgQYj.png][Image: u6o2NRT.png]

I attached debug files with the image stream source set to TV (crash) and PC (no crash).

[attachment=941]

Here's a zip of the image stream:

https://www67.zippyshare.com/v/a3vg0LOZ/file.html


RE: AviSynth Imagestream - Unable to export H264 4:4:4 lossless for TV Luma Range - Selur - 18.07.2020

Will look at it on Monday after work got no access to a pc over the weekend.


RE: AviSynth Imagestream - Unable to export H264 4:4:4 lossless for TV Luma Range - The_Tinkerer - 21.07.2020

Fixed in dev version 2020.07.20.1!