[Feature request] Extract first frame of a video using "Batch convert"

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

user123
Posts: 15
Joined: Tue Jul 26, 2022 3:08 pm

[Feature request] Extract first frame of a video using "Batch convert"

Post by user123 »

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.
cday
XnThusiast
Posts: 4004
Joined: Sun Apr 29, 2012 9:45 am
Location: Cheltenham, U.K.

Re: [Feature request] Extract first frame of a video using "Batch convert"

Post by cday »

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.
Extract first frame from (normally) multiple videos?
user123
Posts: 15
Joined: Tue Jul 26, 2022 3:08 pm

Re: [Feature request] Extract first frame of a video using "Batch convert"

Post by user123 »

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):

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