-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate Thumbnail via the ffmpeg scripts (Windows Powershell and Bas…
…h Scripts available)
- Loading branch information
Showing
3 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$files = Get-ChildItem -File | ||
|
||
foreach ($file in $files) { | ||
# Construct the filename for the thumbnail | ||
$baseName = [System.IO.Path]::GetFileNameWithoutExtension($file.Name) | ||
$thumb = "thumb/$baseName.jpg" | ||
|
||
# Use ffmpeg to create the thumbnail | ||
& ffmpeg -n -i $file.FullName -vframes 1 -vf "scale=256:-2" -q:v 7 $thumb | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
for file in *; do | ||
if [ -f "$file" ]; then | ||
# Construct the filename for the thumbnail | ||
thumb="thumb/${file%.*}.jpg" | ||
|
||
# Use ffmpeg to create the thumbnail | ||
ffmpeg -n -i "$file" -vframes 1 -vf "scale=256:-2" -q:v 7 "$thumb" | ||
fi | ||
done |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.