Extract frames to PNG with FFMPEG from a file list while creating folders

I use FFMPEG on macOS and Windows for a single purpose and I‘m new to using it. I‘m using this code so far to extract frames from videos and save them as PNG files:

ffmpeg -i "/Volumes/Extreme SSD/Neu/filename.mp4" -vf fps=1/4 01_%0004d.png

What I need is a code to do the following:

  • either use a folder or file list that contains all videos to extract frames from
  • extract the PNG files to a newly and automatically created folder using the filename of the video

Right now I always create the output folder manually and I load FFMPEG video by video. Using a file list or converting all files within the Folder „Neu“ would make it easier and speed up the process because I would not need to start it for every video file. Sometimes the videos are .mp4 and sometimes .webm.

Can anyone help and provide the code? I tried adapting another code, but that produces a parsing error.

Thanks for your help!

EDIT: I have the following code after using Google and Copilot:

ffmpeg -f concat -safe 0 -i /Volumes/ExtremeSSD/ConvertMe/video_list.txt -vf fps=1/4 "output_folder/%04d.png"

But I keep getting an „Error opening input“ and „unknown keyword“.

Read more here: Source link