Everything here expects a Unix type environment, as found on Linux or macOS X.
Using FFMPEG:
ffmpeg -i input.mp4 -ss 00:00:01.000 -vframes 1 output.png
Using Image Magick (more info):
mkdir thumbs
magick mogrify -format gif -path thumbs -thumbnail 512x512 *.jpg
Using Ghostscript,
To JPG:
gs -dNOPAUSE -dBATCH -sDEVICE=jpeg -sOutputFile=output.jpg -dLastPage=1 "input.pdf"
To PNG:
gs -dNOPAUSE -dBATCH -sDEVICE=png16m -sOutputFile=output.png -dLastPage=1 "input.pdf"
Then scale with Image Magick, as described in the "image" section
Using unoconv and Libreoffice (more info), though ruan into a few issues:
unoconv --export Quality=100 filename.pptx filename.pdf
Using Libreoffice, Ghostscript and Image Magick:
input_file=inputfile.pptx
noext_filepath="${input_file%.*}"
soffice --headless --convert-to pdf "${input_file}"
gs -dNOPAUSE -dBATCH -sDEVICE=png16m -sOutputFile="${noext_filepath}.png" -dLastPage=1 "${noext_filepath}.pdf"
magick mogrify -format jpg -write "${noext_filepath}_thumb.png" -thumbnail 512x512 "${noext_filepath}.png"
Notes:
- on macOS X using soffice as
/Applications/LibreOffice.app/Contents/MacOS/soffice
- support for MS Office docs: pptx, docx, xlsx, per testing
- support for Apple Office docs, though with some limitations: key, numbers, pages
- it was hit and miss, with many outputted PDFs being blank