Concatenate JPG Images to MP4 Clip on Windows 10: First Frame Scaled to Clip Resolution and Frame Rate

Abstract: Fixes incorrect frame rate and resolution when converting JPG images to MP4 on Windows 10 using FFmpeg.

Created: 2026-10-23 by

Use FFmpeg’s -framerate input flag and the scale video filter to convert a sequence of JPG images into an MP4 file on Windows 10. This approach ensures the first frame is correctly scaled to your desired resolution while maintaining the specified frame rate for smooth playback.

Understanding FFmpeg Image Input Parameters

When converting static images into a video stream, FFmpeg requires specific instructions on how to interpret the image sequence. By default, many users assume that FFmpeg will automatically detect the frame rate or resolution from the first image, but this often leads to incorrect output or playback issues. To ensure the first frame is scaled to the clip resolution and frame rate, you must explicitly define these parameters before the input file specification. The critical component here is the -framerate option. Unlike the -r flag which can sometimes be ambiguous depending on whether it is applied to input or output, placing -framerate immediately before the -i (input) flag tells FFmpeg how many frames per second to expect from the incoming image sequence. If you do not specify this, FFmpeg may default to a very low frame rate (often 25 fps or even lower depending on the version), causing the video to appear choppy or run at an unexpected speed. Another common pitfall involves the resolution. Images often have varying dimensions, or you may want to standardize all frames to a specific width and height. The s:v (video size) option allows you to set the resolution directly in the input stream. However, relying solely on s:v might not apply scaling filters if the aspect ratio changes, so combining it with explicit filtering provides more control.

Constructing the Correct Command

To fix the previous errors involving non-existent filters like video_scale, we must use the standard scale filter within the -vf (video filter) chain. The correct syntax involves chaining the framerate setting and the scaling filter together. Here is the robust command structure that works reliably on Windows 10:
ffmpeg -framerate 30 -i "image_%03d.jpg" -vf "scale=1920:1080" -c:v libx264 -pix_fmt yuv420p output.mp4
Let us break down why each part of this command is necessary. The -framerate 30 sets the input frame rate to 30 frames per second. This means FFmpeg will treat every image as lasting for 1/30th of a second. The -i "image_%03d.jpg" specifies the input pattern. The %03d is a printf-style format specifier that matches files like image_001.jpg, image_002.jpg, etc. Ensure your image files follow this naming convention, or adjust the pattern to match your actual filenames. The -vf "scale=1920:1080" part applies the scaling filter. This filter takes the original image dimensions and scales them to 1920x1080 pixels. If you wish to maintain the aspect ratio and only specify one dimension, you can use scale=1920:-1, where -1 tells FFmpeg to calculate the height automatically based on the width. It is crucial to place this filter after the input definition but before the codec selection. Finally, -c:v libx264 selects the H.264 video codec, which is widely supported by media players and web browsers. The -pix_fmt yuv420p flag ensures pixel compatibility with most players, preventing color distortion issues in some older software.

Handling Aspect Ratios and Scaling Issues

Sometimes, simply scaling to a fixed resolution results in stretched or distorted images if the source images do not match the target aspect ratio. In such cases, you might prefer to pad the image rather than stretch it. You can achieve this by using the scale filter in combination with the pad filter. For example, if you want to scale the image to fit within 1920x1080 without stretching, and then center it on a black background, you can use:
-vf "scale=1920:1080:force_original_aspect_ratio=decrease,pad=1920:1080:(ow-iw)/2:(oh-ih)/2:black"
This complex filter chain first scales the video down if necessary while preserving the aspect ratio. Then, the pad filter adds black bars to the top/bottom or left/right to fill the 1920x1080 canvas. The expressions (ow-iw)/2 and (oh-ih)/2 calculate the offset to center the content. This method is superior for photo slideshows where maintaining the integrity of the original image is important. If you are dealing with a large number of images, consider checking your file naming consistency. Missing numbers in the sequence (e.g., jumping from _009.jpg to _011.jpg) can cause FFmpeg to skip frames or fail entirely. Using a tool to rename files sequentially before running the FFmpeg command saves debugging time. For more advanced manipulation like cropping or changing resolution dynamically, see FFmpeg Cropping, Changing Resolution, and FPS in One Process.

Optimizing Output Quality and Performance

The quality of the resulting MP4 clip depends heavily on the bitrate and preset settings used with the H.264 encoder. By default, FFmpeg uses a variable bitrate that may not be optimal for all use cases. You can control the quality by adding the -crf (Constant Rate Factor) option. A CRF value between 18 and 23 is generally considered visually lossless to high quality. Lower values mean higher quality and larger file sizes.
ffmpeg -framerate 30 -i "image_%03d.jpg" -vf "scale=1920:1080" -c:v libx264 -crf 20 -pix_fmt yuv420p output.mp4
Adding -preset fast or -preset medium can also help balance encoding speed and compression efficiency. fast is quicker but produces slightly larger files, while medium offers better compression at the cost of encoding time. For most slideshow applications, the difference in file size is negligible, so medium is a safe default. It is also worth noting that if your images contain transparency (PNGs instead of JPGs), you need to handle alpha channels differently. Since JPG does not support transparency, this guide assumes opaque images. If you switch to PNG inputs, you may need to add -c:v libx264 -pix_fmt yuva420p to preserve alpha data, though most standard players ignore alpha in MP4 containers. For those interested in other multimedia tasks on Windows 10, such as handling audio streams without transcoding, refer to How to Use ffmpeg (No Transcoding) for Audio on Windows 10.

Frequently Asked Questions

Why is my video playing too fast or too slow?

This is usually caused by an incorrect -framerate setting relative to your image sequence. If the framerate is set too high, the video plays faster; if too low, it plays slower. Ensure the -framerate value matches the intended duration of each image display.

Can I use individual image names instead of a numbered sequence?

Yes, but you must list each file individually in the command line separated by spaces, or use a text file with -f concat. The wildcard or pattern matching (%03d) is only valid for sequentially named files. Listing hundreds of files manually is impractical for large projects.

How do I prevent the image from being stretched during scaling?

Use the force_original_aspect_ratio=decrease option within the scale filter. This ensures the image fits within the target resolution without distorting its proportions. You may need to combine it with a pad filter to fill the remaining space.

What is the best codec for sharing MP4 clips online?

The libx264 codec with yuv420p pixel format is the industry standard for compatibility. It is supported by virtually all web browsers, mobile devices, and social media platforms. Avoid newer codecs like HEVC unless you specifically need smaller file sizes and know your audience supports them.

Does FFmpeg resize all frames or just the first one?

FFmpeg applies the same filters to every frame in the input sequence. If you define a scale filter, every image will be resized to the specified dimensions. There is no special behavior for the first frame unless you use complex conditional logic, which is rarely needed for simple conversions.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More