Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

20240304 1170.0.0.0 regression - the lwi file is always recreated instead of using the cache #58

Closed
FranceBB opened this issue Mar 8, 2024 · 3 comments

Comments

@FranceBB
Copy link

FranceBB commented Mar 8, 2024

Starting with version 20240304 1170.0.0.0 there's a regression about using the lwi files.
The version before the latest release was checking whether there was an lwi file in the same directory as the file and if it was written with the same version of LWLibav.
If it was written with an older version, then it would recreate the lwi index, otherwise it would use the one it found.
In this new version, however, it recreates the lwi file every single time, not just with AVSPmod mod but also with ffmpeg and any other application.
For instance, in this very same unchanged script, we have two different command lines calling ffmpeg and it's recreating the index files both times:

video=LWLibavVideoSource("V:\fs0\clip.dir\HSM00342.mxf", cache=true)
ch12=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=1, cache=true)
ch34=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=2, cache=true)
ch56=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=3, cache=true)
ch78=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=4, cache=true)
audio=MergeChannels(ch12, ch34, ch56, ch78)
AudioDub(video, audio)

image

Setting cache=true doesn't affect it as it keeps recreating it anyway and it's set to true by default anyway even when it's left unspecified.
I tried with cachefile but it is still recreating it:

video=LWLibavVideoSource("V:\fs0\clip.dir\HSM00342.mxf", cache=true, cachefile="V:\fs0\clip.dir\HSM00342.mxf.lwi")
ch12=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=1, cache=true, cachefile="V:\fs0\clip.dir\HSM00342.mxf.lwi")
ch34=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=2, cache=true, cachefile="V:\fs0\clip.dir\HSM00342.mxf.lwi")
ch56=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=3, cache=true, cachefile="V:\fs0\clip.dir\HSM00342.mxf.lwi")
ch78=LWLibavAudioSource("V:\fs0\clip.dir\HSM00342.mxf", stream_index=4, cache=true, cachefile="V:\fs0\clip.dir\HSM00342.mxf.lwi")
audio=MergeChannels(ch12, ch34, ch56, ch78)
AudioDub(video, audio)

Even changing the disk didn't change a thing:

video=LWLibavVideoSource("A:\Ingest\MEDIA\temp\HSM00342.mxf", cache=true, cachefile="A:\Ingest\MEDIA\temp\HSM00342.mxf.lwi")
ch12=LWLibavAudioSource("A:\Ingest\MEDIA\temp\HSM00342.mxf", stream_index=1, cache=true, cachefile="A:\Ingest\MEDIA\temp\HSM00342.mxf.lwi")
ch34=LWLibavAudioSource("A:\Ingest\MEDIA\temp\HSM00342.mxf", stream_index=2, cache=true, cachefile="A:\Ingest\MEDIA\temp\HSM00342.mxf.lwi")
ch56=LWLibavAudioSource("A:\Ingest\MEDIA\temp\HSM00342.mxf", stream_index=3, cache=true, cachefile="A:\Ingest\MEDIA\temp\HSM00342.mxf.lwi")
ch78=LWLibavAudioSource("A:\Ingest\MEDIA\temp\HSM00342.mxf", stream_index=4, cache=true, cachefile="A:\Ingest\MEDIA\temp\HSM00342.mxf.lwi")
audio=MergeChannels(ch12, ch34, ch56, ch78)
AudioDub(video, audio)

image

adding a simple:

tweak(sat=1.31, dither=true)

as an example, makes it recreate the .lwi

image

@flossy83
Copy link

flossy83 commented Mar 9, 2024

I am unable to test right now but can you confirm the issue does NOT occur with 20240112 1167.0.0.0 as I would like to rule that out.
Thanks

Asd-g added a commit that referenced this issue Mar 9, 2024
@Asd-g
Copy link
Contributor

Asd-g commented Mar 9, 2024

Try the attached version.

LSMASHSource_1177.zip

Asd-g added a commit that referenced this issue Mar 10, 2024
@FranceBB
Copy link
Author

Amazing, thank you so much asd, as always.
The fix worked like a charm, I just tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants