4
$\begingroup$

[SOLVED] A friend suggested me the solution. The problem was the FILE CODEC. Smartphones often use H264 codec that are awful to decode on the fly, so preview will hang even with a decent hw. Ironically, a 100 Mb video file from a smartphone (LG G3 in my case) can be heavier to decode on the fly than a 1 Gb file encoded with Xvid (wich probably isn't the best option for a video edit, but at least prevents sluggishness).


I'm stuck in this problem and I don't know if it's a software problem, hardware problem, an OS problem, a codec problem or what.

I'm managing multiple 4k files made with my LG G3.

When I start playing preview, after about ten seconds, FPS value falls down and become sluggish.

Same problem with other movie editors: tested it with OpenShot, KDEnlive et al.

Av-Sync enabled. Frame rate specified. Tried also to re-encode with Handbrake (thought it was a codec problem) but with no luck.

Sw details:

Blender 2.76

Lubuntu 15.04 64 bit

Installed and running all media codec of this and even the parallel universe

Hw details:

Xeon E3-1241v3 quad core 3.5

16 Gb RAM 1600

SSD

VGA MSI GTX 970 oc

... so I cannot believe it's an hw problem.

RAM, GPU and CPU sensors show me that PC is almost bored (near 3% usage, temperatures around 30°C).

Maybe the same old problem with pulseaudio?

So... what can I do?

$\endgroup$
1
  • $\begingroup$ you have to create proxy, i think to lower the resolution in the preview windows. $\endgroup$ Commented Oct 24, 2016 at 5:38

3 Answers 3

5
$\begingroup$

Why does it happen?

There is a very simple explanation to this: to increase performance of various things (including video playback), Blender has a fixed-size cache in your RAM. Using this Blender preloads frames into quicker memory for faster playback (this is what you see for the ten first seconds.). When the cache fills, Blender starts doing the following:

  1. Read the frame from the hard drive

  2. Decode the frame

  3. Push it to the cache (overwriting whatever was in the way)

  4. Read it from the cache and draw it on screen.

This is slower because:

  • You are limited by the speed of your hard drive.

  • Decoding the frame takes time

  • Pushing things to the cache is an extra overhead.

  • The processing time used up by the above is taken away from actually playing back the video.

This explains the overall sluggishness.

How does one solve it?

You can adjust the size of the cache: in User Preferences > System > Memory Cache Limit. I personally advise using as much as you can manage. It also reduces the amount of crashes due to memory leaks (this is especially true on Windows). A bigger cache means a faster Blender in general.

Also, you can make Blender prefetch frames in the Clip Editor and Sequencer. Do this by going to User Preferences > System > Sequencer / Clip Editor. I hope this helps.

Also have a look at:

[Edit]

If the codec is slow to decode, having frames cached is even more important.

$\endgroup$
5
  • $\begingroup$ Thank you, the problem was on the file codec, but I appreciated your useful tips. Marked as solved. $\endgroup$ Commented Oct 21, 2015 at 11:49
  • 1
    $\begingroup$ Sorry to bother you, but are you sure you marked this as solved? $\endgroup$
    – Mörkö
    Commented Oct 21, 2015 at 14:08
  • 1
    $\begingroup$ @YuriRefolo instead of editing the question marking it as solved, write an answer in the answer section and select it as accepted. Please read: blender.stackexchange.com/help/answering $\endgroup$
    – user1853
    Commented Oct 21, 2015 at 22:15
  • $\begingroup$ Sorry, I'm quite a lurker. Thank you for your suggestion. Fixed. $\endgroup$ Commented Oct 23, 2015 at 8:00
  • 3
    $\begingroup$ Where can I find the options you mentioned in Blender 2.78? I only have found Sequencer Memory Cache limit, but not Memory limit for Blender in general nor the prefetch frames option you mentioned. $\endgroup$
    – piegames
    Commented Dec 12, 2016 at 17:32
3
$\begingroup$

A friend suggested me the solution.

The problem was the FILE CODEC.

Smartphones often use H264 codec that are awful to decode on the fly, so preview will hang even with a decent hw. Ironically, a 100 Mb video file from a smartphone (LG G3 in my case) can be heavier to decode on the fly than a 1 Gb file encoded with Xvid (wich probably isn't the best option for a video edit, but at least prevents sluggishness).

$\endgroup$
1
$\begingroup$

If you make the video a proxy, it reduces the resolution of the preview so it doesn't have to render a large file size, but also keeps the original intact. This video explains how to do it. https://www.youtube.com/watch?v=KZl1xS9Lmvw

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .