Slow Motion Oil Fire

I wanted to see how the Raspberry Pi and Pi Camera would handle doing a slow motion video of a chip pan fire.  So, with the help of a colleague in the science department, we set up a copper pot of boiling oil, some water in a test tube and a metre stick.

Here is the setup.  I clamped the Pi B at about mid-flame height using a clamp stand from the lab.

Oil Fire PiCam Setup

The pot and Bunsen burner, to get the oil heated up, was about 4 metres away.

Oil Fire PiCam Setup2

I also used a scorpi flexible arm to hold the camera in place, from the sweetbox company (makers of the sweetbox kickstarter case)

We made sure lab coats and safety specs were on and this is the result.

How to record the video

Having set things up, I did a quick 5 second test video.  In a terminal window I typed.

raspivid -t 5000 -o video.h264

This recorded a 5 second file called video.h264.

That worked, so I tried out the settings for a 10 second video at a resolution of 640×480 and a frame rate of 90fps.

raspivid -w 640 -h 480 -fps 90 -t 10000 -o test90fps.h264

Oops, my video was upside down, because of how my camera was positioned, but that is easily fixed, without changing the physical setup.  Use the rotate switch in the line above.

raspivid -w 640 -h 480 -fps 90 -t 10000 -rot 180 -o test90fps.h264

I also wanted to make sure I recorded for long enough, so changed my time from 10000 milliseconds to 60000 milliseconds (1 minute).

raspivid -w 640 -h 480 -fps 90 -t 60000 -rot 180 -o oilfire.h264

I then installed the tools to process the H264 file.

sudo apt-get install -y gpac

With MP4Box now installed, I can do the conversion.

MP4Box -fps 30 -add oilfire.h264 oilfire.mp4

Then I needed to install the MP4 player called omxplayer.

sudo apt-get -y install omxplayer

Now I could play the video on the Pi 🙂

omxplayer oilfire.mp4

I was amazed to find that it was only 121.8Mb.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s