Tuesday, August 31, 2010

Video

Over the past few days I've half finished a picture... I say half finished because I was unhappy with the picture and have decided to stop half way. More about that later.

First, a video. Two days ago I went to Chester Zoo and took some films there with the aim of making a short music video, mainly to test out AVISynth, some free video software. Here is the result...



AVISynth uses a script language to edit and assemble videos. It only uses AVI files, so I used something called SUPER (very good software) to convert between formats. This script was quite simple but it already did some sophisticated things.

I'll describe it in detail!

1. startclip=assumefps(imagereader("start.jpg", end=300), 30000,1001)

That loads the start.jpg picture as a video of 300 frames. The two numbers at the end set the frame rate (speed) to the same as the aquarium video I took at the zoo (about 29.97 frames per second, the NTSC standard apparently).

2. endclip=assumefps(imagereader("end.jpg", end=300), 30000,1001)

That loads the end.jpg picture and does the same. Both of these are now videos as far as the program is concerned.

3. vidclip=ConvertToRGB24(killaudio(avisource("fish.avi")))

Line three loads the aquarium video, converts it to RGB24 format to make it the same as the pictures. It also kills (removes) the soundtrack.

4. part1=trim(dissolve(startclip, vidclip, 150), 0,4075)

This put together the start picture with the aquarium video, fading over 150 frames. The trim command cuts down the result to 4075 frames, which is around two minutes.

5. part2=dissolve(part1, endclip, 150)

That line takes the above video and puts the end clip at the end, fading again over 150 frames.

6. audio=wavsource("R1B-T04-MarkSheeky-Interference.wav")
7. audiodub(part2, audio)

Those lines load the audio and dub it to the video.

That's the full script.

In total that took about an hour, which included lots of reading the docs and fixing bugs!

3 comments :

John Salmon. said...

That was very relaxing music and video Mark. I've subscribed on YouTube.

Andrew Williams said...

Very nice! Simple and elegant. If I didn't know better, I'd have thought you recorded the music based on the fish.

Dan Kent said...

So nice to watch, and I love the music!