|
|
| 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 |
 |
| 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. |
 |
| 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? |
 |
| 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 |
 |
| 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. |
 |
| 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 |
 |