Personal View site logo
Different times at one location: Extended dynamic range solution for 1080p Videos
  • MARCH-09-2012 - I did put an update of TimelapseVid.py, ExposureFusionVid.py and SlowMoVid.py (new) in the attatched Macros v2 file.

    Below you will find a user friendly freeware solution where you can extend the dynamic range for AVCHD timelapses, slow motions and freeze frame videos. This solution invites your creativity to work with different time measures at one location.

    Don't worry that it's based on Avisynth scripts as they were created automatically and in most cases you even don't need to modify them. You also need AvsPMod which is the basis of this user friendly method.

    Install the TimelapseVid.py and ExposureFusionVid.py files into the \AvsPMod\macros folder or subfolder. You will find then as soon as you freshly start the AvsPMod application and enter the menu "macros". For the ExposureFusionVid script you need to download a fuse/fusemask plugin which you will find at http://forum.doom9.org/showthread.php?t=152109. Save the fusion.dll file into the Avisynth\plugins folder.

    In my opinion this macro method has a lot of potential to be optimized by this community. I hope you will have a lot of suggestions to improve it. Maybe you have ideas for other procedures....

    The following video should demonstrate how it works.

    ==== TimelapseVid.py ====

    This procedure is focused on a simple 360 degree shutter angle timelapse workflow. It has similarities with the methods used by @GH13Timelapser discussed by http://www.personal-view.com/talks/discussion/595/mjpeg-fps-setting-for-timelapse-on-gh2/p1 but can run now with AVCHD files like *.MTS. Also @balazer described AviSynth Overlay methods in http://www.personal-view.com/talks/discussion/1559/avchd-1080p-time-lapse/p1. The resulting script of this macro is based on Avisynth TemporalSoften.

    First you will be asked for the video file which should be converted into a timelapse or averaged frame video.

    The second dialog box (see attatched picture) will ask you to enter used shutter speed, the frame rate of the resulting video, the timelapse rate and GOP. The generated script will take care about the correct GOP at given Shutterspeed. Usage of Group of Pictures (GOP) at different shutter speeds with 24p and Panasonic GH2 was discussed by @duartix at http://www.personal-view.com/talks/discussion/comment/39686#Comment_39686 and http://www.personal-view.com/talks/discussion/2396/gh2-motion-fluidity-360%C2%BA-shutter-test-on-slow-shutter-speeds./p1.

    Put in the third dialog box the name of your script. It is recommended to save the *avs scipt under similar name of the video that in future you can trace back what you have done.

    In AvsPMod you can check what you have done. Please also read the comments in the script to learn how to optimize your results.

    Now you can use this *avs script in Virtualdub, MeGUI or whatever to create the final timelapse video file.

    Comment: You can create an "averaged frame video" by just set TimelapseRate to Framecount. You end up in a video with just one frame. It could help for example to clean up a market place with moving people. This averaged frame should be over- or underexposed and can be used for subsequent Exposure Fusion procedure. In the Exposure Fusion procedure it would be converted into a freeze frame video with exactly same number of frames of the reverse exposed timelapse.

    ==== ExposureFusionVid.py ====

    ExposureFusionVid is a user friendly solution to improve the dynamic range of the timelapse. You can even work with different time units at one location. You can combine timelapse, slow motion or freeze frame videos with each other. Important is that one video has to be overexposed and the other should be underexposed.

    First you will be asked for the first video and subsequently for the second. If you have created an "averaged frame video" you have to open it by the first dialog box.

    Then you will be asked for the name of the *.avs script which should be saved.

    In AvsPMod you need to check the script for further optimization. Read the comments. You will see that there are two different mask methods which can be applied for the fuse method. Play whith them until your reach the best result.

    Again, now you can use this *avs script in Virtualdub, MeGUI or whatever to create the final video file.

    ==== SlowMoVid.py ====

    SlowMoVid.py can be used for progessive as well as for interlaced videos. If the base is progressive motion estimation will be derived by mvtools. If the video is interlaced QTGMC or Yadif will at the first step take care about deinterlacing. Subsequent motion estimation will be carried out by mvtools.

    ==================

    You need to install following plugins in your Avisynth plugin folder:

    GScript.dll download from http://forum.doom9.org/showthread.php?t=147846

    MVtools2.dll download from http://avisynth.org.ru/mvtools/mvtools2.html

    RemoveGrainSSE3.dll download from http://www.removegrain.de.tf

    Yadif.dll download from http://avisynth.org.ru/yadif/yadif.html

    Fusion.dll download from http://forum.doom9.org/showthread.php?t=152109

  • 4 Replies sorted by
  • Thank you a lot for revealing your workflow from end to end, and it's especially interesting to see it working on Freeware alone.

    Now I see why you were asking for GOPs to marry shutter speeds faster than 1/2s. Human motion flows a lot better and looks more natural, what SS did you use?

    And about the patch, what do you think about IQ? Is the Quantizer=20 giving you the quality you need or did you lower it?

  • @duartix your patch is very interesting also because that it offers 60i at best quality. Then you are able to slow it down to a motion rate of 1/2.5 when you would deinterlace it to 60p by Yadif. You are able to generate a video mixed up with slowmo and timelapse.

    Next think what I would like to do is to implement gradual speed up/slow down function. That means that you could start with slow motion and end up with timelapse smoothly within certain time. Thats all close to 360degree.

    Gradual speed up/slow down was discussed here: http://forum.doom9.org/showthread.php?t=161835

  • Thanks @tida. You are giving me a very strong argument to keep the patch with the 60i as it is ATM.

    Now, about the time distortions, even though it is interesting (and sometimes the only option for many people) to have it working like the link you posted, these times I'm much in favour of using a fully featured editor (like After Effects) and have proper workflow and near instant feedback on the edits I make. Don't get me wrong, Doom9 was my home almost a decade ago, but now I'm two kids shorter on time. :)

  • I did release an update of TimelapseVid.py, ExposureFusionVid.py and SlowMoVid.py (new). You will find it in the first post.