Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Extract Single Frame From Video, Which is the easiest way?
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
buehrenm
Posted: Feb 2 2008, 12:13 AM


Newbie


Group: Members
Posts: 1
Member No.: 22970
Joined: 2-February 08



Hi!

I want to extract a single frame from a video file as a JPEG image from the command line, without extracting all existing frames. What is the most simple way to do this? Do I need to use VirtualDub/AviSynth or is it even easier?

Markus
 
    Top
phaeron
Posted: Feb 2 2008, 08:18 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Put this in extract.script:
CODE

declare vd = VirtualDub;
declare p = vd.params;
vd.subset.Clear();
vd.subset.AddRange(Sylia.Atol(p[0]), 1);
vd.SaveImageSequence(p[1], ".jpeg", 0, 2, Sylia.Atoi(p[2]));


Invoke as follows:
CODE

vdub source-file-name /i extract.script frame-number image-file-name jpeg-quality


Downside: There is a 0 introduced after the name, i.e. image -> image0.jpeg. This is a limitation of the current version.
 
    Top
Trixter
Posted: Jul 7 2008, 05:34 AM


Newbie


Group: Members
Posts: 2
Member No.: 23840
Joined: 7-July 08



While this works for extracting a single named frame, I have a need to go through several videos and extract a few frames from each, seeking in the video to find them. Any chance a feature could be added (file->export->current frame perhaps?) that would allow the currently-displayed frame to be saved to disk?
 
     Top
stephanV
Posted: Jul 7 2008, 07:04 AM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



The fastest way to do this currently is just making a selection of one frame.

Go to the frame you want, press Home, then right-cursor, then End and go to export.

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
Trixter
Posted: Jul 7 2008, 08:29 PM


Newbie


Group: Members
Posts: 2
Member No.: 23840
Joined: 7-July 08



Yes, but then I have to reload the entire AVI to clip out additional frames. A simple seek->hotkey->seek->hotkey etc. would be best for this.

avidemux has this, but the number of formats they will load and decode successfully is substantially lower than virtualdub.
 
     Top
stephanV
Posted: Jul 7 2008, 08:45 PM


Spam killer ;)


Group: Moderators
Posts: 4348
Member No.: 8917
Joined: 18-February 04



No. You wouldn't have to reload the clip. You simply make a new selection.

--------------------
useful links:
VirtualDub, Input plugins and filters, AviSynth, AVI-Mux GUI, AC3ACM by fcchandler, VirtualDub FAQ
 
    Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
5 replies since Feb 2 2008, 12:13 AM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Filters and Filter Development