My dishes were misbehaving today!
Posted on Sat 27 February 2016 in fun
I knew something weird was happening in my kitchen lately, so I decided I should investigate this. I hid my camera in the cupboard and went to write some code on my laptop in the living room. Of course, I had music playing, but it was not loud enough that I don't notice the noises coming from the kitchen.
Needless to say that I was shocked by the state of the kitchen when I opened the door. Luckily, the camera recorded everything! Look what happened!
The video
Stop lying!
Oh, OK... It's all a lie :(
How to do it?
Just take a bunch of photos, copy them to your computer and run the following two pieces of code. The first one to rename the photos into a more convenient form:
a=0
for i in *.JPG; do
new=$(printf "frame_%04d.JPG" ${a}) #04 pad to length of 4
mv ${i} new/${new}
let a=a+1
done
And the second one to turn the frames into a video:
ffmpeg -i frame_%4d.JPG -vcodec mpeg4 -b 800k -vf "setpts=3*PTS" video.avi
That's it! Hooray!