VSE Interface Freeze after every *action* -> Alt+A

Hello,

So I just went out to buy a new computer after having worked on an old laptop for a long time. The Blender VSE is more responsive than ever on this new thing - well it is except when I get these “lag spikes”. After working a few hours with them it seems to happen everytime I perform an action (cut, adjust strips) and then press Alt+A to start playback afterwards.

This is what I see in my system monitor whenever I do that:


I was just wondering if anyone else is experiencing this?

FYI I am using video material proxied at 25% q90 located on an SSD in a laptop with 8GB RAM and a i7-3630QM CPU + Nvidia Geforce GTX 660m. I’m on Arch Linux 64-bit and I have assigned 5000 megs of RAM for the VSE to utilize in the blender settings. This issue is frankly getting on my nerves… :confused:

So which release of Blender are you using? And what CODEC are you cutting up (if any)? Perhaps there is a buffering issue with a long GOP video?

I am using the latest Blender release: 2.66a. I have tested previous versions and cutting the video with 2.59 and below seems to have a much better performance (proxies look glitchy tho). The proxy material format is JPG and I am using the Timecode setting “Record Run No Gaps” as suggested by Sergey Sharybin. The original material I am working with, however, is Interlaced AVC/BDAV in 1920x1080 at 25FPS - raw material from my Sony videocamera. According to Mediainfo, Format Settings, GOP is M=2, N=13.

I am using proxies though, so I don’t really know how much influence the original format has in the editor. I asked at #blendercoders what they think the problem might be and one said it might have something to do with playback’s re-freshing of its cache for the selected strip. It mainly becomes a problem when I work with 50+ strips at once.

EDIT: Since I can perform all actions while the editor is playing, I have just left it playing in the scene so I don’t have to wait for the freeze all the time. But perhaps I should report this as a bug, it sounds odd.

Even with proxy turned on if you are using source audio then you are still loading the original into memory. Have you tried with AV sync off, say frame dropping instead. It often plays better (but sync is dubious).

ooh, that makes a lot of sense. Perhaps its time to introduce proxies for the audio in blender as well then :slight_smile:

Haven’t tried Frame Dropping yet, but did try No Sync - which reduced the freeze a little but not my much. :confused:

For now I’m dividing the video up into several scenes and work with parts of the video which makes the freeze half as long (I can live with 1-2 secs freeze now and then). I plan to render out the parts in PNG and do SFX in master afterwards then. Haven’t worked this way yet, but I guess its worth a try. :slight_smile:

Yeah it would be nice to be able to cut media to length in the VSE then generate decent PNG or EXR sequence for the compositor. Alas ffmpeg in Blender makes for a crappy transcoder.

I recall reading that Blender can choke at edit points when swapping between shots.

So I found out that this isn’t an issue when you simply decrease the length of the clip using the left/right handles. That’s basically what I do now, unless I need to cut several items out of the strip I’m working on. Just thought I wanted to share that with you, in case some of you have the same issue as me.

Really? I must test this. What happens when you just duplicate the strip and alter the handles at each end?

Duplicating a strip, deleting a strip and cutting a strip all creates a delay, unfortunately. I think it has something todo with Blender refreshing its entire cache or something but I don’t know. Maybe it will be a good idea to create a bug report about this to get some more info - I think I will do so tonight.

Maybe it will be a good idea to create a bug report about this

That is a great idea!

BTW have you tried this with and without audio? The other issue with bugs for the VSE is that they are hard to demonstrate with media. As the Devs like you to supply packed images in .blend files and you can’t do that with video files :frowning:

I tried cutting the proxy video only now and that works fine too without problems - the issue lies within the audio. The lag is probably very likely because Blender tries refresh its cache of a 147MB large video file or something. Perhaps this speaks well for future audio proxiesl- could be useful and would probably also mean less lagg when you scroll and have Draw Waveform activated for a whole horde of audio strips at once.

EDIT: Posted bug on blender bug tracker: http://projects.blender.org/tracker/index.php?func=detail&aid=35230&group_id=9&atid=498

Editing should be so smooooooooth on such a high end system, esp on Linux.
My system is similar minus SSD and 2GB RAM and editing is a very pleasant experience. Nothing compared to my old dual core 4GB RAM laptop.

I’ve experienced such a behavior about a year ago using trunk versions. I had to switch to a stable one to proceed cutting even simple files. Each new cut would add to the overall lag. Several cuts down the road, I would have to wait for 8 or even 10 seconds for VSE to update so I could continue editing. After the transition to a new stable version the problem disappeared.

Now, if you’re absolutely sure that the audio is the source of the lag, convert the audio to PCM and replace the source audio. This should work in most cases.
Finally, note that SDL is recommended for sequencer usage so check if you’re using that.

Is anyone here experiencing issues with recent releases rendering out muxed (audio embedded) files? I am getting crashes but only with audio codecs enabled. It’s fine using earlier builds though.

Yea, this was why I bought the system too - I used to be editing on a i3 CPU / 4GB RAM / Intel Ironlake and had to work with 263x148 pixel proxy files I made myself in order to make VSE a somehwat smooth experience. Now I just proxy it with Blender which works fine if it wasn’t for the stuttering I get when Blender access the material.

Thanks for the tip regarding SDL - I didn’t know it was recommended for sequencer usage. As to the audio, yea converting it to PCM could likely be a good solution. Last week I was editing MPEG-4+PCM material and everything was just as smooth as expected (except I kept running out of RAM - A simple Blender restart fixed that but maybe I should upgrade). Will have to make a script to change the source location first though but since this is a large project, it will probably be worth it.

Thanks for the help blendercomp!

If you by audio embedded files mean video files with audio, then no - haven’t experienced issues with recent releases. The only point at which Blender crashes for me nowadays is when it runs out of RAM during render - which only happened on my old system.

I notice that playback is smooth when in No Sync mode but sound drifts. Over edits it geys further apart. I gues AV Sync attempts to buffer the sound more effectively.

My render issue was on older build since fixed.

if you’re experiencing memory issues have you tried increasing the memory cache limit for the sequencer in the user preferences?
With an ssd it should be lightning fast if you set it to say half the size of your swap partition (assuming that you do have one set up).

But the User Prefs sequencer cache is very limited now isn’t it?

#3point: no, actually you can set it to whatever value you like.
For instance click in the field, type 1024*8, press enter and you should get the cache set to 8192 KB.
Ideally, you would want to set that to half of the physical ram available on your system.

Yes, when I edited the video back then I had set the cache size to 1024*8 which was all the RAM I had installed on the system. It did help making me able to edit 5 minutes more of video than before. I do have a swapfile on my SSD which is 16GB large (double of my amount of RAM). I also use a property on the Linux kernel telling it to use as much of RAM as possible before utilizing swap, to make the system speedier. Thanks for the tip regarding the VSE cache size - I have set it to 1024x4 for now. :slight_smile:

Btw, Sergey Sharybin posted on the bug issue that he will look into it after 2.67’s release. So that must mean soon! :slight_smile:

Good news, Joerg Mueller has posted a patch to fix this issue. I haven’t tried the patch out yet but will make sure to follow up and test myself! The hang only happens once to initialize the strips, it will no longer happen every time you Duplicate, Cut, or delete.

Source: http://projects.blender.org/tracker/?func=detail&atid=498&aid=35230&group_id=9