HomeOfAviSynthPlusEvolution / L-SMASH-Works

Forked from VFR-maniac/L-SMASH-Works; hydra3333/L-SMASH-Works; l33tmeatwad/L-SMASH-Works; HolyWu/L-SMASH-Works; AkarinVS/L-SMASH-Works.
89 stars 15 forks source link

Decode Failure #55

Closed RyougiKukoc closed 8 months ago

RyougiKukoc commented 9 months ago

Source: u2 DISC1 00005.m2ts Frame 31300 I tried rolling back until 20210811, this is the last release which decodes normally at this frame

Script:

from vapoursynth import core
core.std.LoadPlugin(r"xxx\L-SMASH-Works-20210811\x64\LSMASHSource.dll")
core.lsmas.LWLibavSource('00005.m2ts').set_output()

Normal / Fail decoded frame comparison: https://slow.pics/c/jaHj7kZ6

Asd-g commented 9 months ago

The link requires email, password... Can you share the sample in other place that doesn't require email/password?

RyougiKukoc commented 9 months ago

I uploaded the m2ts file here

Mr-Z-2697 commented 9 months ago

I've had this problem too, but it only seems to happen when seeking (including the sample provided by OP), so I ignored it. I have a sample that has much smaller size, here. I belive they have the same problem, even produced by the same encoder (based on the scaling list found in PPS). The file has several problematic frames, for example frame 25 and 1198 (and some following frames of course). Frame 1198 even claimed to be an I frame, but ffmpeg still reports missing references.

Asd-g commented 9 months ago

Thanks for the samples.

20210811 works for the Mr-Z-2697 sample too.

I have to check the ffmpeg updates. On the other hand - remuxing the video in mkv, works.

Asd-g commented 8 months ago

Can you test the attached version (it lacks some additional libs, so it's only for testing this issue).

LSMASHSource.zip

Mr-Z-2697 commented 8 months ago

It works perfectly. So it all about indexing right? I see the index file created by test build is essentially identical to 20210811. BTW the index file must be recreated for the problem to be gone.

Asd-g commented 8 months ago

Yes, it's about indexing. With FFmpeg >= 5.0 the extradata is stripped. This commit is the culprit.

Asd-g commented 8 months ago

Try the new version r1170.

Mr-Z-2697 commented 8 months ago

Sorry, this just looks like the same function in a different place, how does that affect the indexing results? Please enlight me.😂

Asd-g commented 8 months ago

You can compare the index files - https://www.diffchecker.com/2zWc8GDI/

Mr-Z-2697 commented 8 months ago

I already compred them when I tested the test build. I didn't express myself correctly before, I meant "how it affects indexing process", sorry

Asd-g commented 8 months ago

https://github.com/HomeOfAviSynthPlusEvolution/L-SMASH-Works/blob/1170.0.0.0/common/lwindex.c#L1584

It's not only in different place but it also doesn't have path to be externally accessed and parser_ctx->parser->split is NUL.