I am looking for a command line option.
For example, if I have the video sample-video.mp4
, and I want to generate an image file sample-image.jpg
from the video at time 00:00:26, what command should I give?
Also, it would be very helpful if you can explain in detail what the function of every argument of the command is.
You can use ffmpeg
You can also play around with the options, like control quality of the jpeg output
-q:v <linear integer 1-10>
or resolution-s 480x300
.Some more ideas here
VLC Method
cvlc - because its command-line and we don't want any windows opening. also, this means we can run it without X11.
--start-time=26 - is the exact position of the snapshot in seconds
sample-image.png
with your current screenshot. If you omit this, VLC will start numbering the screenshotsComplete documentation here
You can use
mplayer
(from packagemplayer
, not installed by default):This will create the file
00000001.jpg
so you have to rename it. As far as I know there's no way to specify a filename.-vo jpeg
means you want JPEG output,-ss 00:00:26
seeks to the given position,-frames 1
means to process one frame and then quit.