Add strobbing(blank frames) to videos
#1
Hi so I'm trying to add a strobbing effect to videos, so strobbing is basically inserting a blank(black) frame after each real frame, e.g. Real frame > Black frame > Real Frame > Black frame etc...
As far as I can tell, I think I have to use either avisynth or vapoursynth for this? There's no native option for this?
Anyway, I made this script for avisynth:

blackframe=clp.blankclip()
interleave(clp, blackframe)

I insert the above in the custom section, with the option to insert at End.
Ok so the problem is that, it works, but it's about half the speed as it should be. I googled around and found a function to speedup the video, with AssumeFPS? So I tried this:

AssumeFPS(60)
blackframe=clp.blankclip()
interleave(clp, blackframe)

but this doesn't work. Anyone got any ideas?

I also tried vapoursynth, but for some reason when I try to insert a script in custom section, it always crashes, no matter the script, even if I disable the custom section it still crashes, I have to restart hybrid (or switch to avisynth then back to vapoursynth) for hybrid to work, but vapoursynth still won't work. Here's the vapoursynth script for reference:

import vapoursynth as vs

core = vs.get_core()
clip = core.std.AssumeFPS(video_in, fpsnum=24)
blank = core.std.BlankClip(clip)
clip = core.std.Interleave(clips = [blank, clip, blank, clip, blank, clip])

clip.set_output()
Reply
#2
Quote:There's no native option for this?
No.

Quote:but it's about half the speed as it should be.
Enable "Filtering->Speed Change->Speed Settings->Change speed" and set it to 60fps.

About using the custom-option:
If you don't know how Avisynth/Vapoursynth works and how their scripts syntax works using the custom option is probably a bad idea.
Do look at the Avisynth/Vapoursynth Script View to see what Hybrid does with the custom addition you entered.

Also changing:
  • the frame count will mess with the progress indication, file size calculation, etc.
  • changing the resolution will cause Hybrid to crash or create invalid outputs
  • changing the frame rate will have no effect

Quote:Here's the vapoursynth script for reference:

import vapoursynth as vs

core = vs.get_core()
clip = core.std.AssumeFPS(video_in, fpsnum=24)
blank = core.std.BlankClip(clip)
clip = core.std.Interleave(clips = [blank, clip, blank, clip, blank, clip])

clip.set_output()
that script naturally crashes since "video_in" is unknown.

simply using:
blank = core.std.BlankClip(clip, length=clip.num_frames)
clip = core.std.Interleave(clips = [blank, clip])
with Vapoursynth
or
blank = core.std.BlankClip(clip)
clip = core.std.Interleave(clips = [blank, clip])
with Avisynth,
both create proper outputs here.

Cu Selur

Ps.: side note: if you use vfr video that isn't converted to cfr during the processing will produce asynchronous output.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)