1. 4FipS.com
  2. Photos
  3. Videos
  4. Code
  5. Forums
  6. pfQuizzz
  7. About

4FipS.com Forums

Forums dedicated to the projects hosted at 4FipS.com

Skip to content

Joining multiple H.264 MOVs using AviSynth and QTSource

> About coding, hacking, photography, and such...

Joining multiple H.264 MOVs using AviSynth and QTSource

Postby FipS on Mon Sep 29, 2014 6:38 pm

I've finally decided to make my friends happy and provide them with the video I took during our summer holidays a few months ago. I didn't want to spend much time editing it, so came up with an idea just to quickly join the individual clips together, rescale them and encode the resulting video back into H.264 / MPEG-4.

I thought AviSynth / MeGUI would be the most straightforward tool to deal with this task, but was immediately disappointed when I found out I was not able to import the clips as they had been shot with my Nikon D7000 (Full HD, 1920x1080 at 24 fps) that produces a H.264 / MPEG-4 encoded QuickTime (.mov) container, and unfortunately AviSynth was not able to open it on its own.

Luckily, after a bit of googeling, I came across the QTSource plugin, which enables AviSynth to open QuickTime (.mov) containers (note that QuickTime Player also needs to be installed on the machine). Then I just put QTSource.dll alongside my AviSynth script (.avs) and all started to work.

Here's a simple AviSynth (.avs) script, showing the idea:
Code: Select all
LoadPlugin("QTSource.dll")

clip = \
QTInput("clip_1.mov", color=2) ++ \
QTInput("clip_2.mov", color=2) ++ \
QTInput("clip_3.mov", color=2)

clip = clip.Spline36Resize(1280, 720)
clip = clip.ConvertToYV12()

return clip

I've also experimented with fast motion to speed up some of the boring clips. Basically there are two simple options how to speed up a video without changing the actual FPS. Firstly, you can drop some of the frames. Secondly, you can blend frames together to get smoother frame transitions (a kind of motion blur):
Code: Select all
# drop frames
clip = clip.SelectEvery(2, 0) # 2x speed-up
clip = clip.AssumeFPS(2997, 125) # 23.976

# or blend frames
clip = Merge(clip.selectEven(), clip.SelectOdd()) # 2x speed-up
clip = clip.AssumeFPS(2997, 125) # 23.976
User avatar
FipS
Site Admin
 
Posts: 143
Joined: Wed Nov 12, 2008 9:49 pm
Location: Prague

Joining multiple H.264 MOVs using AviSynth and QTSource

Sponsor

Sponsor
 

Return to 4FipS.com General Discussion & Blog

Who is online

Users browsing this forum: No registered users and 0 guests