Things You'll Need:
- MPlayer application
- GIMP application
- Digital video file (any format)
- Video player software for your digital video file (optional)
- Text editor
-
Step 1
Download and install MPlayer. Accept the defaults presented by the installer. Icons for SMPlayer and MPUI should now be located on the desktop.
-
Step 2
Download and install GIMP. Accept the defaults presented by the installer. An icon for GIMP should now be located on the desktop.
-
Step 3
Click on "Start." Click on "Settings" and click "Control Panel."
-
Step 4
In Control Panel, double-click "System." Click the "Advanced" tab and then click the "Environment Variables" button.
-
Step 5
Under "User Variables," click the "New" button. As shown in the example, in the "New User Variable" dialog's two fields, enter this text: %PATH%;"C:\Program Files\Joe Brown\MPlayer for Windows\"
Make sure you use double-quotes as shown. In that text, instead of typing "Joe Brown," enter the account name that's used in the paths for your folders (see Tips). After you enter the text, click "OK." -
Step 6
In the "Environment Variables" dialog, click "OK" and close Control Panel.
-
Step 1
Start Windows Notepad or another text editor. Select the "File" and "New" command to open a blank document.
-
Step 2
Copy the following series of lines and paste them into the editor. The example shows exactly what should appear in the editor.
:
:
: Make-JPEG-vid-frames.bat
:
:
: TO USE THIS BATCH FILE -
: Drag video file's icon onto this batch file's icon and release
:
:
: OUTPUT -
: This batch file writes JPEG files to the folder JPEGDIR on Desktop.
:
:
: NOTE -
: The 'mplayer' command below assumes that the location of mplayer.exe
: is already set in PATH environment variable.
:
@echo off
echo .
echo .
echo .
echo Running make-JPEG-vid-frames.bat ...
echo .
echo .
echo .
:IN1
set INPUT1=
echo Type TIME INDEX (hh:mm:ss) in this video for start of animated GIF ...
set /P INPUT1=(For example, 00:07:23): %=%
if "%INPUT1%"=="" goto IN1
:echo Your input for TIME INDEX was: %INPUT1%
:IN2
set INPUT2=
echo Type VIDEO RUNNING TIME IN SECONDS for animated GIF ...
set /P INPUT2=(Number of seconds): %=%
if "%INPUT2%"=="" goto IN2
:echo Your input for VIDEO RUNNING TIME IN SECONDS was: %INPUT2%
mplayer -ao null -ss %INPUT1% -endpos %INPUT2% %1 -vo jpeg:outdir=.\Desktop\JPEGDIR
pause -
Step 3
In the batch file's next-to-last line, "JPEGDIR" is the name of the target folder on your computer's Desktop where MPlayer writes a set of JPEG image files. (MPlayer creates this folder if it doesn't already exist.) Optionally, edit the name "JPEGDIR" to another folder name of your choice. Use characters that are valid to use in a folder name, and do not include a blank space in the name.
-
Step 4
In the editor, select the "File" and "Save As" command to save the new batch file. Enter "Make-JPEG-vid-frames.bat" as the new file's name and select "Desktop" as the new file's location, then click "OK."
-
Step 5
For your convenience, move the icon for the new "Make-JPEG-vid-frames" batch file next to the "SMPlayer" icon on your computer's Desktop.
-
Step 1
Find on your computer a digital video file with the frames you want to capture into a new animated GIF file. Open its folder to view its name or icon. You can move the video's icon to your desktop if desired.
-
Step 2
Double-click the MPUI icon to start MPlayer and play your digital video. Notice the video's total running time, which is displayed in a status bar at the top or bottom of the video player's window. The running time is given as a three-part figure in the form of "hh:mm:ss", meaning hours, minutes and seconds.
-
Step 3
Make note of the time index at which you want to begin capturing video frames as well as the approximate number of seconds of video running time (up to about 5 seconds) you want to capture as frames. Close the video player software.
-
Step 4
Drag the video's icon and drop it on the "Make-JPEG-vid-frames" batch file found on your Desktop. This starts the batch file, and its output appears in a command line window.
-
Step 5
At the first prompt shown in the command line window, enter the time index of the SECOND during the video when you want MPlayer to begin capturing video frames. For example, the time index 00:07:10 refers to the tenth second of the video's seventh minute.
-
Step 6
At the second prompt, enter the number of seconds (up to about 5) of video running time that you want MPlayer to capture. After you enter the second response, the MPlayer command starts. The example shows the batch file's display after the user entered "00:00:03" as the time index and "3" as the number of seconds.
-
Step 7
After the MPlayer command finishes, the batch file pauses. You can scroll up and down within the command line window to view MPlayer's output messages. Most of these are status messages that describe MPlayer's activities; however, MPlayer also reports any problem it encountered among these status messages.
-
Step 8
Press any key to finish running the batch file.
-
Step 1
Open the target folder ("JPEGDIR" by default) on your Desktop and notice the set of JPEG image files that were written by MPlayer, each of which captured a video frame. Each JPEG file's name is an 8-digit number, such as "00000001". The name indicates the order of that video frame among the frames that were captured.
-
Step 2
Open the JPEG file named "00000001" in GIMP by dragging its icon and dropping it on the GIMP application's icon. Optionally, after GIMP opens, move its palettes aside so you can focus on GIMP's display of the image, as shown in the example.
-
Step 3
Select the "File" and "Open as Layers" command. In the "Open Image" dialog, click once on the JPEG file named "00000002" to select it, then scroll to the end of the list of JPEG file names. Press and hold the Shift key and click once on the last JPEG file name in the list. This selects all JPEG files in the list, excluding JPEG file "00000001", as shown in the example.
-
Step 4
Click the "Open" button to open all the selected JPEG files. Completing this step might require almost 1 minute of time, depending on the number of selected files.
-
Step 5
Select the "File" and "Save As" command. In the "Save Image" dialog, click on the control labeled "Select File Type (By Extension)". In the list that appears, select "GIF image" and click the "Save" button, as shown in the example.
-
Step 6
In the "Export File" dialog, click the control labeled "Save As Animation" and click the "Export" button, as shown in the example. In the target folder ("JPEGDIR" by default), notice that a new GIF file now exists with the name "00000001" (8 digits). Optionally, rename the new GIF file as you prefer.
-
Step 7
Double-click on the new GIF file to view it and observe its animation. If you're satisfied with the new animated GIF file, move it to a more permanent location on your computer.
-
Step 8
When you've finished making animated GIFs from this set of JPEG files, move the JPEG files as a set from the target folder ("JPEGDIR" by default) to another folder, or delete the entire set.










