Apparently creating video snapshots, thumbnails, whatever you want to call them with VLC 1.0.2 or later has really changed, and everything out there that I found simply didn’t work.
When I tried to use the documentation I found available the lovely error message came up saying:
The command line options couldn’t be loaded, check that they are valid.
Press the RETURN key to continue…
So I’m on a Windows XP virtual machine but this same thing applies to Linux and Mac OS X. So how can you easily from the command line script the creation of a thumbnail, snapshot, image, etc. from a video?
Here you go!
"C:\Program Files\VideoLAN\VLC\vlc.exe" --video-filter scene -V dummy --scene-height=128 --scene-width=128 --scene-format=jpeg --scene-replace --scene-ratio 24 --start-time=6 --stop-time=7 --scene-prefix=thumb --scene-path="C:\thumbs" C:\videos\video_file.mp4 vlc://quit
Now you are probably asking, can you please explain what all those flags and arguments mean? OK.
- –video-filter : This adds post-processing filters to enhance the picture quality, for instance deinterlacing, or distortthe video. In this case we’re using the scene filter for snapshots.
- -V : Specifies a video output module. We don’t want the video to actually play so it’s set to dummy
- –scene-height : The height of the snapshot in pixels
- –scene-width : The width of the snapshot in pixels
- –scene-format : Format of the image. Can be jpeg or png.
- –scene-replace : Replaced the resulting image each time. Remove this flag to have the file named in sequential order.
- –scene-ratio : Ratio of images to record. 3 means that one image out of three is recorded.
- –start-time : Start at this position in seconds
- –stop-time : Stop at this position in seconds
- –scene-prefix : Name the image file with this name. If scene-replace is not specified the file will be named prefixXX.
- –scene-path : Path on file-system to store the snapshots
- C:\video\video_file.mp4 : path to video input file
- vlc://quit : Quit once the process is finished
So, all the best as you try to script the creation of your thumbnail images!
More info: This is working with VLC 1.0.3.