Go to the dropdown
Tools -> Preferences, then on the preferences menu make sure you have
All selected on the bottom left corner of the screen.
From there select
Input / Codecs from the left hand side and scroll all the way down to the bottom on the right hand side to get to the section called
In there the option for
File Caching sets how many milliseconds of video to buffer in RAM when the video source is a file.