Looking for a video editing program with a particular feature

I’m looking for a program that’ll allow me to do the following :-

  • Open a video file (.mp4)
  • Watch the video file
  • When i press a key (eg space bar), copy a section (from 1 or 2 seconds either side of
    the point i hit the key) and place it in a new video file.

Preferably free !
Any suggestions welcomed.

Yes Discourse, on this occasion you are right. This topic is similar to those.

I’m not aware of a program that will do this.

However, VirtualDub makes it easy to pause the video, scroll back and forth through the frames using the mouse wheel, and then mark a section (e.g., 30 frames on either side) that can be exported directly to a file.

I’d be concerned that my reaction time to hit the space bar (or whatever) would not be quick enough. That’s why the frame scrolling feature of VDub is so helpful. It will also display the frame type (I, P, or B) and the actual frame number and elapsed time.

I think that’s why the OP asked for it to copy from 1-2 seconds on either side of the marked point. If you’re just trying to clip a relevant portion and don’t care about frame accuracy, that would be sufficient. Seems like a reasonable way to do things if you need to extract a large number of clips from a long video without too much extra effort.

That said, I don’t know of any program that would do that. It might be possible to use AutoHotkey or the like to control VirtualDub.

There are some scripting options in VirtualDub that might allow for this.

I do quite a bit of this type of work (i.e., extracting short segments from various video sources) on a professional basis and VirtualDub has many distinct advantages. Unlike most linear editors, it allows rapid review using the scroll wheel so you don’t have to play the video in real time to select the sequence you want to save. The OP might be assuming that the best way to select the sequence desired is to simply play the video and quickly select the frame(s) desired. In my experience, this is inefficient and subject to errors. It is much, much easier to slide the video progress bar indicator as required to reach the target frame(s). Of course, OP can always play the video at normal speed to review or identify the frame(s), but actually selecting them is accomplished more easily with the method I’ve described.

No, I have no vested interest in VirtualDub. It is an older program and has many weaknesses. But it is free to use, has many useful plug-in filters, and is much better than simple players or linear video editors for this type of work.

Forgot to add: I don’t know the OP’s purpose in extracting these video sequences, but it might also be of interest that VirtualDub can insert the frame numbers, elapsed time (in milliseconds), date, or all three in each frame when the OP exports the sequence.

Yes ! that’s exactly what I want to do !
Thanks for all your replies … I’ll take a look at VirtualDub - scripting sounds good…
It sounds like it should be something not too hard to program (ie modifying someone else’s code !!)
I’ll check the PureBasic forums !

BTW, you need VirtualDub 2 to deal with modern codexes and containers (like h.265 and .mkv).

http://virtualdub2.com/

With the right (free) plug-ins, the original VDub handles these codecs and containers just fine. But I agree that VDub2 has better overall compatibility.

However, VDub does not handle variable frame-rate video very well and you can only save to avi containers.

So it therefore doesn’t handle them just fine?

Lossless AVI files are just fine. It only takes a few seconds to batch convert them to whatever encoding or bitrate you need.

As I said before, VirtualDub does have limitations. But for selecting a short segment from a video as it is playing and exporting the segment to a separate video file it is one of the most effective tools. One simply plays the video, pauses at the target frame (which will show you the frame number and elapsed time in the status bar), selects one second before and one second after, and exports the selected sequence as a lossless file. Keep playing the video and repeat.

I get paid to do this all the time. It is not unusual for me to be exporting 20 or more sequences for analysis. I’ve tried many other tools and procedures and doing it this way is the fastest and gives the best results.

Forgot to add: You see, you can’t just “clip” any random sequence of frames from a video. In most cases, the closest you can come is to trim to a sequence that starts with an I-frame and includes the necessary P-frames to provide the required picture data to to any B-frames you might have. The likelihood that you would be able to do this easily while just watching the video play is quite low. The VirtualDub method disregards the I-frame, P-frame, and B-frame locations and just transcodes the sequence completely. Therefore, you can select a two-second sequence that starts and ends with a B-frame without any complications.

Thanks @ZonexandScout
Looks like VirtualDub is the way forward…

Thanks for that, i’ll look into it. (i’d prefer a downloadable version)
Welcome to the board, btw !