Script for deleting every other frame?

essami wrote on 8/20/2009, 3:22 AM
Hi,

Is there a script that would allow me to delete every other frame from a video? I think I've seen this somewhere on the forum but neither search nor google yielded any results.

In essence what I need to do is have a video that will jump from one videotrack to another.

frame 1 = video track 1
frame 2 = video track 2
frame 3 = video track 1
frame 4 = video track 2
frame 5 = video track 1
etc.

Would be awesome if you can choose the amount of frames between 1 and more. So I can experiment what works best for my project. Can anyone point me in the right direction?

Thank you!

Sami

Comments

TeetimeNC wrote on 8/20/2009, 4:14 AM
Sami, if you have Ultimate S, this thread might help.

Jerry
essami wrote on 8/20/2009, 4:23 AM
Thanks, I dont have Ultimate S though. Would anyone know of anything free?
Chienworks wrote on 8/20/2009, 4:24 AM
Without using scripting at all ...

Create a new video with one frame solid white and the second frame solid black. Render this to a new uncompressed .avi file. Add this new file as a mask on the track above your videos. Stretch it out as long as needed. Wherever it's white, the track immediately below will be shown. Wherever it's black, the next track lower will show through.

Ctrl-drag to lengthen the alternation to more than one frame.

Strikes me as simpler and far less intensive to accomplish than scripting would be.
TeetimeNC wrote on 8/20/2009, 4:34 AM
Kelly, very clever.

Jerry

Without using scripting at all ...
essami wrote on 8/20/2009, 4:39 AM
Thanks, sounds clever indeed!

Also a somewhat related question, what is the easiest way to advance the cursor frame by frame on the timeline?

Sami
PeterWright wrote on 8/20/2009, 4:55 AM
>what is the easiest way to advance the cursor frame by frame on the timeline? "

Alt / Right or Left Arrows
Christian de Godzinsky wrote on 8/20/2009, 6:46 AM
Terve Essami,

Rendering out this video of yours - be aware that your field "flopping" will run havoc most of the long GOP encoders (mpeg2, mpeg4). Consider to render out as AVI or something similar (with no temporal compression), if the quality is an issue.

Christian

WIN10 Pro 64-bit | Version 1903 | OS build 18362.535 | Studio 16.1.2 | Vegas Pro 17 b387
CPU i9-7940C 14-core @4.4GHz | 64GB DDR4@XMP3600 | ASUS X299M1
GPU 2 x GTX1080Ti (2x11G GBDDR) | 442.19 nVidia driver | Intensity Pro 4K (BlackMagic)
4x Spyder calibrated monitors (1x4K, 1xUHD, 2xHD)
SSD 500GB system | 2x1TB HD | Internal 4x1TB HD's @RAID10 | Raid1 HDD array via 1Gb ethernet
Steinberg UR2 USB audio Interface (24bit/192kHz)
ShuttlePro2 controller

ScorpioProd wrote on 8/20/2009, 11:35 AM
>what is the easiest way to advance the cursor frame by frame on the timeline? "

You can also remap the keyboard to have the cursor frame by frame as simply the Right or Left Arrow keys without needing to hold down ALT. I did this years ago, much more convienient.
johnmeyer wrote on 8/20/2009, 12:58 PM
Here's a link to a VEG file (done in Vegas 7, so it should open in V8 and V9) that basically does what Kelly suggested, except it uses generated media. When you open it, Vegas will tell you that a video file is missing. Choose the "replace" option and choose your own media file.

Alternating Mask.veg

This link is good for seven days.

I use the B&W fX on the second track, so the video alternates, frame-by-frame from full color to B&W. Obviously you'll want to delete this and then do to either the event or one of the tracks whatever it takes to achieve the alternating frame effect you want.

This sort of idea could definitely be used to create all sorts of strobe effects, all you would need to do to vary the strobe duty cycle would be to change the width of the black and white generated media. Do it for once instance of each, and then copy and past them a few times. Once you've done that, select ALL instances, and then copy/paste all of them. Once you done THAT a few times, select ALL instances and copy/paste them. After a few iterations, you'll be copying several minutes of individual events with each paste.

Save your work often because I have no idea whether Vegas will barf if you put 10,000 generated media events on the timeline. If it does, go to plan B and follow Kelly's advice and render the black and white frames to an uncompressed video file and use that instead.




Chienworks wrote on 8/20/2009, 1:35 PM
Got thinking about this during some odd moments at work and decided that my method would probably be more convenient if one created a file of a couple dozen pairs of black & white frames. It will still work exactly the same, but then you'll have a clip about 1.5 to 2 seconds long which will be easier to handle than a 2-frame clip.
altarvic wrote on 8/20/2009, 9:27 PM
johnmeyer, thanks for the project
Some thoughts:
1) You can create 2-frame Solid Color Generated Media and use keyframes to change colors for each frame (set interpolation type to Hold)
2) Use Edit - Paste repeat to create multiple events (with Create a reference option)
Rosebud wrote on 8/20/2009, 11:06 PM
You should get same result with my script VideoStrobe:
http://www.sonycreativesoftware.com/forums/ShowMessage.asp?MessageID=521466
jetdv wrote on 8/21/2009, 6:53 AM
And the "Strobe Light" tool in Excalibur can also easily do this.
dand9959 wrote on 8/21/2009, 9:44 AM

"Is there a script that would allow me to delete every other frame from a video? "

I suspect that if you just use 9.0a long enough, this will eventually happen to you automatically.
essami wrote on 8/25/2009, 2:30 AM
Rosebud, The script you did worked like a charm and was easy and quick, thank you!!!
A. Grandt wrote on 8/25/2009, 4:32 AM
Kind of an extension on this one. Is there a simple script that can pick out every 25th frame for instance, or even every 1500th, and put them on a new track? (for time lapse)

jetdv wrote on 8/26/2009, 4:11 PM
Once again, Excalibur can do that. If you really want it on a separate track, it would take a little more work. If you don't mind just deleting the extra frames, that can be done with the Strobe tool as well.