Created
March 16, 2015 09:08
-
-
Save vincent-zurczak/7647e60f63dd134d2172 to your computer and use it in GitHub Desktop.
Create video snapshots with VLC in batch mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ROOT=/data/test | |
for f in $ROOT/my_dir/*.mkv | |
do | |
# Display progress information | |
echo "Processing $f..." | |
date | |
# Remove the file extension (here, .mkv) | |
DIR="$(basename -s .mkv $f)" | |
# Create the target directory | |
echo "Creating $DIR..." | |
mkdir -p ./previews/$DIR | |
# Create the previews | |
# (cvlc is the command-line interface of VLC) | |
cvlc $f --video-filter=scene --vout=dummy --scene-ratio=10 --scene-prefix=$DIR --scene-path=$ROOT/previews/$DIR/ vlc://quit | |
# Line break for readability | |
echo "" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment