For the first time ever, today my Mac has started to act up. I was on Skype with a friend, browsing the internet and rendering a video in MPEG Streamclip and my Mac started acting up and shutting down and turning back on. The first time this happened it completely shut-off and then second time this happened my screen went black and I had to hit the power button to get everything back to normal. Both times this has happened I was rendering in MPEG Streamclip so I have a feeling it might be that program.
Any tips or suggestions to fix this would greatly be appreciated, my Mac has NEVER given me a problem so this happening really scared me?
Could it be a software or hardware problem, I don't know you guys tell me?
Link to Youtube Video explaining and showing you guys the problem.

http://www.youtube.com/watch?v=R2oKoDuUkYs
Any tips or suggestions to fix this would greatly be appreciated, my Mac has NEVER given me a problem so this happening really scared me?

Could it be a software or hardware problem, I don't know you guys tell me?
Link to Youtube Video explaining and showing you guys the problem.
http://www.youtube.com/watch?v=R2oKoDuUkYs