RSully/interframe — pull request #2 by RSully (2014-04-09 14:07:40+00:00)
Title: Refactor to use compositor

:warning: not ready for merge

After watching the 2013 WWDC video on AVFoundation I got this idea to use instructions/compositions/etc. to cleanup this project and handle the logic better, while making it easier to incorporate tracks like audio.

The idea I outlined looks like this:

- Create new comp
- Set timing to `1 / (2x - 1)` fps (where x is input fps)
- Add input video track 2 times
- Second addition is added at +1 frame offset
- Generate array of instructions (might look like the following)

```text
Input frame 1 2 3 4
Output frame 1 2 3 4 5 6 7

Tracks:

-------------------------------------------
| | | | | | |
Prior | X | | | | | |
| | | | | | |
--------------------------------------------------
| | | | | | |
Inbetween | X | | X | | X | |
| | | | | | |
-------------------------------------------
| | | | | | |
Next | | X | | X | | X |
| | | | | | |
-------------------------------------------
```

**Prior** is source track, **Next** is source track at +1 frame offset, **Inbetween** is result of interpolation instruction. The **X** indicates where the frame is being taken from for the output composition.