The first thing to know is that a yellow bar isn't a sign of a problem (nor is a red bar, necessarily).
See this article for details:
... and this movie for a somewhat less detailed explanation:
Here's the summary:
Note the uses of the word probably above. The colors aren’t a promise. They’re a guess based on some rather simple criteria. If you have a fast computer, then a lot of things marked with red may play back in real time; if you have a slow computer, then some things marked with yellow may need to be rendered to preview files before the segment can be played in real time.