Page MenuHome

Motion Tracking: pre Blender 2.8 file prefetch footage freezes Blender
Open, Needs TriagePublic

Description

System Information
System: Windows 7 64bit
RAM: 4096 MB
renderer: 'GeForce GTX 760/PCIe/SSE2'
vendor: 'NVIDIA Corporation'
version: '4.5.0 NVIDIA 364.72'

Blender Version
Broken: blender-2.80.0-git.0f5b53ba4dc-windows64
Worked: Blender 2.79c

Short description of error
Motion Tracking: pre Blender 2.8 file prefetch footage freezes Blender

Exact steps for others to reproduce the error

Needed: Blender Course (DVD, Blender Cloud) Track, Match, Blend!
(I think every pre Blender 2.8 setup tracking file will do)

  1. Open the file blendfiles\03_advanced_techniques\02_externalreference\reference.blend
  2. Load UI (default)
  3. Click "P" for prefetch footage
  4. Prefetch progressbar animation is not displayed and Blender freezes (GUI not responsive to clicks)

Details

Type
Bug

Event Timeline

Michael P. (forest-house) renamed this task from Motion Tracking: pre Blender 2.8 file prefetch freezes Blender to Motion Tracking: pre Blender 2.8 file prefetch footage freezes Blender.
Michael P. (forest-house) updated the task description. (Show Details)

I don't see a bug here. It's true, Blender does become unresponsive for a moment, but that's just due to the prefetching of the movie file. Prefetching image sequences works smoother. At least on my system (Linux64bit) I cannot see a difference in prefetching between 2.80 and 2.79.

How long is the GUI unresponsive? How long is the prefetching taking for you?

As described above I use Windows 7. It freezes for a while, then the GUI is responsive again. But the prefetch of the footage didn't happen at all.

How much RAM do you have, and what's set in your User Preferences, in System>General>Memory Cache Limit? If you prefetch and watch your System's memory consumption, is your RAM filling up or not?

Ram 4096 MB. Set the value to 3072 MB (good thinking, btw). But still the same issue.

But I testet this with a png image sequence and the prefetch works. It seems that it doesn't work with video files.
It freezes as described. But when I play the clip with "play animation" button it prefetches while playing.

Interesting. Would be nice if some other windows user could test this. At the very least I'll have my colleagues in the office test this on monday.

My colleague just tested this on Windows10 with the most recent Blender 2.80 build.
While it does prefetch the footage, it does act a bit weird. The interface seems to freeze until the prefetching is done. Unlike in your case however the footage is in memory after prefetching is finished.
Even though the GUI is a bit unresponsive, we could still press the little X in the prefetching progress bar to cancel it. It works pretty much the same as on my Linux system. Our systems are quite good though (32GB, Hexacore). 4GB of system memory is far from ideal for motion tracking, so poor system performance might play a role in your case. Still, I can't really see a bug here.
However, responsiveness when caching movie files could definitely be improved. When prefetching image sequences the interface stays fully repsonsive here, and the way the progress bar is reporting the prefetching progress is more realtime and repsonive as well.
When 2.8 is more stable and there is a bit more time for polishing this might be something to look at, @Sergey Sharybin (sergey)?

@Sebastian Koenig (sebastian_k), did i get it correct:

  • Prefetching image sequence is fast, responsive, and such.
  • Prefetching movie files is slow, freezes interface and such ?

That's weird and definitely something to look into.

@Michael P. (forest-house), in 2.8 we've increased default value of movie cache size, to be more helpful for more real-world scenarios. So maybe you'd want to set it to a lower value.

@Sergey Sharybin (sergey)

I have tested this with a cache setting of 1024 MB. It prefetches a video (not the video from above), could not see any GUI freezings and the progress bar updates.
But the frame rate is low: around 4 to 9 fps. (I see this in a 3d view port in the left top corner of a camera view).
If I play the video (play button, not prefetching) the frame rate is also 4 to 9 fps. But the second time I play it, the part that was "played" plays now with 24 fps.

I tested this with an png sequence and I got the same behaviour as above.

Then I tested the same video with 2.79 master (blender-2.79.0-git.c0b3e3daebd) and cache setting of 1024 MB, and I can prefetch and play without any
problems and I get 24 fps all the time.

BTW. I wanted to reset the cache size in the preferences, but it resets to 0 and not to 4096.

This sounds very much like an issue with colormanagement. In 2.80 the default view transform is Filmic. In order to display movie clips correctly the correct mapping has to be applied first. This happens during playback. So once the clip has been played back once, the movie was "converted" internally to the correct view transform. That's why playback is realtime the second time you play it.
You can also set View Transform in Color Management panel from "Filmic" to "Default". That should give you better playback performance right from the first play of the movie.
(Sidenote: "Default" is really not an adequate term anymore, since it isn't even the default setting! :)

@Sebastian Koenig (sebastian_k)

Just run a test with the "Default" Color Management. The fps was 11 to 13 fps. So the performance is better, but I don't think this is the main issue here.