fuselibs icon indicating copy to clipboard operation
fuselibs copied to clipboard

Video seems to be making copies of the file on every reify?

Open Sunjammer opened this issue 8 years ago • 5 comments

screen shot 2017-12-06 at 10 43 50

Was investigating why my system block was so huge so i ran a utility that looks for bigger files

Found this:

screen shot 2017-12-07 at 11 47 01

Those are all temp copies of a video I was using to test a tag yesterday. Looks like the dir is set to clean every reboot but i barely ever reboot and all these copies are from one work session yesterday so... This seems bad?

Sunjammer avatar Dec 07 '17 10:12 Sunjammer

Its supposed to be deleted when <Video /> is disposed.

nekronos avatar Dec 07 '17 11:12 nekronos

Video has to make temp copies if the video source is a file in .Net. The .Net video APIs does not expose playback from a byte buffer/stream and when running in preview assets like this are only available as byte arrays.

Also .Net builds will pack assets into the dll, meaning we have to write the video assets to disk before using them...

nekronos avatar Dec 07 '17 11:12 nekronos

Just for the record, can confirm that the files are deleted after a reboot.

I understand the reason for a temp copy, but is the accumulation of those files more of a Preview problem?

Sunjammer avatar Dec 07 '17 11:12 Sunjammer

Its either a bug in preview where video is not unrooted. Or there is a bug in the .Net impl of Video

nekronos avatar Dec 07 '17 11:12 nekronos

My understanding is that this is supposed to be fixed "soon", because preview will actually start giving us on-disk files instead of in-memory data. Maybe @Tapped remember more?

kusma avatar Dec 07 '17 13:12 kusma