Currently it is not possible and it gives an error " 0x0x0 : not a picture".
Would be nice if batch convert could extract the first frame from an mp4 video for example into any image format, at least png or jpg.
[Feature request] Extract first frame of a video using "Batch convert"
Moderators: helmut, XnTriq, xnview
-
- Posts: 15
- Joined: Tue Jul 26, 2022 3:08 pm
-
- XnThusiast
- Posts: 4352
- Joined: Sun Apr 29, 2012 9:45 am
- Location: Cheltenham, U.K.
Re: [Feature request] Extract first frame of a video using "Batch convert"
Extract first frame from (normally) multiple videos?user123 wrote: Thu Feb 08, 2024 8:40 pm Would be nice if batch convert could extract the first frame from an mp4 video for example into any image format, at least png or jpg.
-
- Posts: 15
- Joined: Tue Jul 26, 2022 3:08 pm
Re: [Feature request] Extract first frame of a video using "Batch convert"
Yes, there are some videos that are just a static picture and there is no purpose for a video file for that.
But I already used this ffmpeg script in a bat file (extracts frame at 1 second):
But I already used this ffmpeg script in a bat file (extracts frame at 1 second):
Code: Select all
@echo off
set /p dir="Directory of mp4 files: "
mkdir "%dir%\VideoToImage"
for %%a in ("%dir%\*.mp4") do (
ffmpeg -i "%%a" -vf "select=eq(n\,30)" -vframes 1 "%dir%\VideoToImage\%%~na.png"
)
echo Done!
pause