Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 4th April 2018, 19:10   #1  |  Link
BernHard
Registered User
 
Join Date: Mar 2018
Posts: 2
Making accurate and smooth hyperlapse

Hello amazing forum.
I’ve got few gigabytes of FullHD H264 avi video at 30 fps which is essentially dashboard camera footage from long 1000 miles road trip in a car.
I want to do make a hyperlapse out of this video – by dropping most of the frames in regular intervals, let's say leaving in the footage only 1 frame out of 10, and then removing gaps and speeding up remaining image sequence to 60 fps or so.
Virtualdub does very dirty job (not smooth and choppy, seems not dropping frames evenly), so I am trying to explore avisynth to see if it can be done nicely on Windows PC.
Asking for help with following:

1. Can this be done with avisynth, in principle?
2. Could someone please guide me with script creation for such video decimation and acceleration?

Video stabilization can be done in virtualdub (deshaker plugin) very easily, so it is not part of the question.

Thank you!

Last edited by BernHard; 4th April 2018 at 19:57. Reason: spellcheck
BernHard is offline   Reply With Quote
Old 4th April 2018, 19:26   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,370
Quote:
Originally Posted by BernHard View Post
Hello amazing forum.
I’ve got few gigabytes of FullHD H264 avi video at 30 fps which is essentially dashboard camera footage from long 1000 miles road trip in a car.
I want to do make a hyperlapse out of this video – by dropping most of the frames in regular intervals, let's say leaving leaving in footage only 1 frame our of 10, and then removing gaps and speeding up remaining image sequence to 60 fps or so.
Virtualdub does very dirty job (not smooth and choppy, seems not dropping frames evenly), so I am trying to explore avisynth to see if it can be done nicely on Windows PC.
Asking for help with following:

1. Can this be done with avisynth, in principle?
2. Could someone please guide me with script creation for such video decimation and acceleration?

In principle, yes . It would be something like this

Code:
SelectEvery(10)
AssumeFPS(60)

But a "smooth hyperlapse" , what something like microsoft's hyperlapse produces, does other things like stabilization, motion blur

There are various ways you can attempt to do this too in avisynth - depanstabilize, mflowblur, or qtgmc shutter blur, or temporalsoften
poisondeathray is offline   Reply With Quote
Old 4th April 2018, 20:17   #3  |  Link
BernHard
Registered User
 
Join Date: Mar 2018
Posts: 2
Quote:
Originally Posted by poisondeathray View Post
SelectEvery(10)
AssumeFPS(60)

wow! that worked as a charm.
Thank you, Poisondeathray!
BernHard is offline   Reply With Quote
Old 5th April 2018, 13:50   #4  |  Link
Yanak
Registered User
 
Join Date: Oct 2011
Posts: 275
This can help too i think : http://forum.doom9.org/showthread.ph...ight=sickjumps

Allows to have an acceleration at the start and deceleration at the end and in between the video accelerated by the value you want, ( might be useful to keep the start and end of your footage more visible while in an acceleration and deceleration parts) , and with audio synchronized too if you use avisynth to manage the audio part ( i'm not sure if your dashcam footage have this tho )

then at the end assumeFPS(60) or ChangeFPS(60) to have you footage at 60 fps ( if the original is already 60 fps then there is no need for this part)

Code:
LoadPlugin("H:\plugins\ffms2.dll")
LoadPlugin("H:\plugins\SickJumps.dll")

video = FFVideoSource("H:\BigBuckBunny_DivX_HD720p_ASP.divx", colorspace = "YUV420P8")
			  
audio = FFAudioSource("H:\BigBuckBunny_DivX_HD720p_ASP.divx")

AudioDub(video, audio)

SickJumps(500, 14000, 1, 20, 5, 2, end_multiplier=1)

ChangeFPS(60)
Here the video accelerated part will be x20 speed of the original video, acceleration will start at the frame 500 and end at the frame 14000, the acceleration time will be 5 seconds ( during 5 seconds after reaching the frame 500 it will speed up progressively for 5 seconds until reaching speed x20 ) and the deceleration time is 2 seconds, ( 2 seconds before reaching frame 14000 it will slow down progressively until reaching speed x1 at frame 14000 )

the first "1" value is the speed before the acceleration process, and same thing for "end_multiplier=1", before and after the accelerated effect part the video will be at normal speed here.

Using the video found here : http://www.divx.com/en/devices/profiles/video

this is the result of the script : https://streamable.com/8lvhi

PS: smoothing all this can maybe be done with some other things like poisondeathray explained, might even be possible with the option " script_variable" inside Sickjumps plugin itself but i never tested this part much, this said i really don't like the blurry effects those hyper-lapse videos i saw end up, feels like playing games with motion blur which is something i really hate and one of the first options i disable in any video game i touch

Last edited by Yanak; 5th April 2018 at 14:06.
Yanak is offline   Reply With Quote
Old 5th April 2018, 14:38   #5  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,695
You can also do it in an NLE. I did this one in Vegas. It too is dashcam video. Easy.

Carmel Valley Road at 250 mph

If you really want to do this right, you should add some motion blur so that the sped up video "looks natural." I didn't add that blur. You can google "timelapse motion blur" and find out more about how to do really professional timeplapse.

Last edited by johnmeyer; 5th April 2018 at 14:46. Reason: added last paragraph
johnmeyer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:27.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.