[FFmpeg-user] Pattern_Type Glob *.JPG wildcard input file support for Windows 10?
Mark Dougherty
mark at d3memories.com
Sat Jul 10 05:16:45 EEST 2021
I am using WIndows 10 with "ffmpeg version 4.4-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev6, Built by MSYS2 project)".
I am writing a command-line that will create a basic slideshow MP4 video from multiple folders of dozens or hundreds of JPG and/or PNG images. The images are sourced from either digital cameras/smartphones or scanned photos (typically 600 dpi).
So far, I have been successful with this command for a small test group of 9 JPG files:
ffmpeg -framerate 1/2 -i test%%1d.jpg -filter_complex "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black,format=yuv420p" -r 30 -movflags +faststart output-1280-720.mp4
This command-line works perfectly and renders my JPGs in the correct orientation and correct aspect ratio
Only one issue remains.... my input file selection requires a more flexible "*.JPG" wildcard syntax because I have tens of thousands of images (52K images in over 1900 folders) that have a wide variety of naming conventions that don't match a simple 1, 2, or 3 digit numeric sequence. And in some cases, the images are just randomly named and simply sorted alphabetically by their file names.
I have tried two unsuccessful options to provide "*.jpg" wildcard functionality...
Option #1 (text file of filenames):
ffmpeg -framerate 1/2 -f concat -safe 0 -i "Test-ffmpeg.Txt" -filter_complex "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black,format=yuv420p" -r 30 -movflags +faststart output.mp4
I tried creating an input file list using this syntax: -f concat -safe 0 -i "Test-ffmpeg.Txt" but when I run the command, I get a "Option framerate not found" fatal error
Can I use an input text file with this particular set of encoding and processing options?
Option #2 (Pattern_Type glob):
ffmpeg -framerate 1/2 -pattern_type glob -i "*.jpg" -filter_complex "scale=1280:720:force_original_aspect_ratio=decrease,pad=1280:720:-1:-1:color=black,format=yuv420p" -r 30 -movflags +faststart output-1280-720.mp4
If I try using -pattern_type glob -i "*.jpg" I receive this fatal error message "Pattern type 'glob' was selected but globbing is not supported by this libavformat build. *.jpg: Function not implemented'
Is there a FFmpeg version (or license) that provides glob support on a Windows platform?. I'm certainly willing to pay for it. Or, in the absence of glob wildcard support, if there a way I can accomplish the "*.jpg" wildcard syntax?
Thank you,
Mark
More information about the ffmpeg-user
mailing list