Im on windows 7. I have multiple videos in a folder and need to extract 1 image from the exact same frame of each of those videos (that is 20 seconds into each video), i know the command below extract the image from a single video:
and even tho it throws me this error:Code:ffmpeg -ss 20 -i video.mp4 -t 1 -s 590x340 -f image2 imagefile.jpg
the image is extracted just fine.Code:Could not get frame filename number 2 from pattern ' imagefile.jpg' (either set updatefirst or use a pattern like %03d within the filen ame pattern)
Any bash script that could automate this process for every video on this folder in one go? The videos names are not in a sequence, totally different from each other.
Also the extracted image files would need to have different names so they dont replace each other when extracting. Would be good the images had the same filenames of the input videos.
Please let me know, thank you!
+ Reply to Thread
Results 1 to 3 of 3
-
-
This is for Windows but you can apply exactly the same principles for any operating system. 'rem' is the Windows comment identifier - nothing on that line is executed.
Code:rem Processes all videos, one at a time rem Bases the output filename on the input filename to ensure uniqueness rem %%i is replaced with the names of the files, one at a time. Substitute *.mp4 as needed. for %%i in (*.mp4) do ffmpeg -ss 20 -i %%i -t 1 -s 590x340 -f image2 %%i.jpg
Francois
Similar Threads
-
Converting image to videos with different time rate using ffmpeg
By radiaku in forum Video ConversionReplies: 2Last Post: 2nd Jan 2013, 12:31 -
FFMPEG: extract frames
By mogadanez in forum Video ConversionReplies: 6Last Post: 4th May 2012, 11:06 -
extract videos from DVD RW
By rocky5454 in forum DVD RippingReplies: 1Last Post: 2nd Jul 2011, 05:28 -
extract music from bin image?
By pensioner in forum Newbie / General discussionsReplies: 3Last Post: 18th Apr 2011, 23:01 -
Batch hard encode multiple language srt to multiple videos
By clonius in forum SubtitleReplies: 4Last Post: 15th Jul 2010, 14:06