ccseer / Seer

Seer bug report
http://1218.io
446 stars 45 forks source link

Leaking 20-60mb on every play of VP9 or H265 (hevc) video #325

Closed RanHum closed 2 years ago

RanHum commented 2 years ago

If you preview any (afaik) VP9 video, about 20mb minimum (around 60mb on 4K video rip from youtube) will be leaked every time playback ends, including every repeat, hence for very short VP9 videos it's leaking very fast. VP8 (and other codecs, I suppose) has no such problem for me. I can reproduce this with every webm video downloaded from youtube now, for example

Seer 2.7.4 Windows 10 x64 1909 Nvidia Pascal

ccseer commented 2 years ago

would you please send me a sample file?

On Sat, Oct 9, 2021 at 5:54 AM Ran Hum @.***> wrote:

If you preview any (afaik) VP9 video, about 20mb minimum (around 60mb on 4K video rip from youtube) will be leaked every time playback starts, including every repeat, hence for short VP9 videos it's leaking very fast. VP8 (and other codecs, I suppose) has no such problem for me. I can reproduce this with every webm video downloaded from youtube now, for example

Seer 2.7.4 Windows 10 x64 1909 Nvidia Pascal

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ccseer/Seer/issues/325, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZZIHSGJVREXMHPRTMZEVTUGAGO5ANCNFSM5FVDYKOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

RanHum commented 2 years ago

As I said, any file from youtube will do for me, but I used this for testing: webm vp9 test file.zip

ccseer commented 2 years ago

Thank you~

On Sat, Oct 9, 2021 at 11:46 AM Ran Hum @.***> wrote:

As I said, any file from youtube will do for me, but I used this for testing: webm vp9 test file.zip https://github.com/ccseer/Seer/files/7315938/webm.vp9.test.file.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ccseer/Seer/issues/325#issuecomment-939317352, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZZIHSJMAN63P6HYSYFHKDUGBPVPANCNFSM5FVDYKOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

ccseer commented 2 years ago

Thanks for your feedback!

On Sat, Oct 9, 2021 at 11:47 AM Corey Chen @.***> wrote:

Thank you~

On Sat, Oct 9, 2021 at 11:46 AM Ran Hum @.***> wrote:

As I said, any file from youtube will do for me, but I used this for testing: webm vp9 test file.zip https://github.com/ccseer/Seer/files/7315938/webm.vp9.test.file.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ccseer/Seer/issues/325#issuecomment-939317352, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZZIHSJMAN63P6HYSYFHKDUGBPVPANCNFSM5FVDYKOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

RanHum commented 2 years ago

Update: h265 (hevc) has this problem too. Test file recoded with handbrake or other h265 videos - doesn't matter, same results

ccseer commented 2 years ago

The bug has been located. It is a bug from Windows. But there is a workaround to fix it. Please wait until next update release.

Thank you for your report.

ccseer commented 2 years ago

Seer.zip

  1. Quit Seer
  2. Replace Seer.exe
  3. Run again
RanHum commented 2 years ago

Just tried, it seems working, on 4k file it will eat a couple of hundred megs steadily and not growing more but will release them gradually afterwards. I think it can pass as fixed if you think so

ccseer commented 2 years ago

Yes. The memory is not released immediately. Windows has a way to handle it. It takes a while. If you preview an image, then stop previewing. The memory will be back to normal after several minutes.

ccseer commented 2 years ago

Fixed in 2.8.0

RanHum commented 2 years ago

Hmm, I've just updated to 2.8.0 and again saw a rapid increase in memory consumption, but different kind of, and much more aggressive. This time it's not about repeating the same video - repeats don't leak anything, but the very opening of preview does, codecs the same. Every time I open the same test file for preview seer 2.8.0 is leaking 100-130mb (!) of memory, and it's rather harsh, quick browse through media folder can stress system badly enough that I noticed it in the first couple of minutes... It releases most of the memory (about all) after about half-hour of idle, but only from the working set, not private bytes. Luckily I still have an installer of an old version for this time

ccseer commented 2 years ago

Sorry. I can reproduce it now.

ccseer commented 2 years ago

The bug is located. Sorry about that. All d3d related decoding will leak the memory. Only FFmpeg decoder works fine, but it is not that efficient.

RanHum commented 2 years ago

Sad to hear that, but can we really do nothing with it? Maybe it depends on Windows version, and mine is affected? Is it possible to switch decoders on demand? Sorry if I distract you, I just want to cooperate

ccseer commented 2 years ago

Thank you~

I will let you know when it is fixed. You can help me test it before I release it.

ccseer commented 2 years ago

What graphic card are you using, Intel or nvidia? I guess it's Intel?

RanHum commented 2 years ago

As I said in the very first message, I use Nvidia Pascal. I have Intel iGPU too but it's disabled in the device manager.

Update: Tried 2.8.2, it crashes with default settings for video decoding, I enabled iGPU and tried again, same results. If I remove MFT:d3d=11 in the beginning of decoders string (resulting in MFT:d3d=9 D3D11 DXVA CUDA FFmpeg), it's working and not realy leaking i guess, releasing most of the memory from the working set after a while and only leaving 150mb in the private bytes. If there is only FFmpeg in here, it's leaking around 10mb per small video and 130mb on 4k video

Update 2: It's still leaking with MFT:d3d=9 D3D11 DXVA CUDA FFmpeg, but in basic avc1 videos instead, about 10mb per opening...

ccseer commented 2 years ago

Downloads.zip

  1. Quit Seer
  2. Replace Seer.exe and mdk.dll
  3. Run again

it should work now. Please let me know if it is working well.

ccseer commented 2 years ago

Hi

can you take a look at this issue: #341

Seems like I have fixed it.

ccseer commented 2 years ago

fixed in 2.8.3

RanHum commented 2 years ago

Yeah, just updated on my pc, it's not leaking anymore afaics, thank you very much!

ccseer commented 2 years ago

thank you for your feedback~~