Compare commits
2 Commits
de54500865
...
0375cc9461
Author | SHA1 | Date | |
---|---|---|---|
0375cc9461 | |||
65ba58b635 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -2,6 +2,10 @@
|
||||
*
|
||||
|
||||
# Exception
|
||||
!/default/
|
||||
!/docs/
|
||||
!/render/
|
||||
|
||||
!/default/*
|
||||
!/docs/*
|
||||
!/render/*
|
||||
|
31
render/render_happy_sugar_life.sh
Executable file
31
render/render_happy_sugar_life.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
# Mirai Nikki Bot, a video frame posting bot for Pleroma
|
||||
# Copyright (C) 2022 Anon <yanderefedi@proton.me>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# Requiered args supplied by the bot
|
||||
INPUT_PATH="$1"
|
||||
OUTPUT_PATH="$2"
|
||||
PICKED_FRAME="$3"
|
||||
|
||||
# INPUT_PATH_SUBTITLE="$(echo "$INPUT_PATH" | sed 's|\ |\\\ |g ; s|\[|\\[|g ; s|\]|\\]|g')"
|
||||
# [ Brackes ] fuck up ffmpeg subtitles parameter
|
||||
INPUT_PATH_SUBTITLE="$(echo "$INPUT_PATH" | sed 's|\[|\\[|g ; s|\]|\\]|g')"
|
||||
|
||||
mkdir -p "$(dirname "$OUTPUT_PATH")"
|
||||
|
||||
# -q:v on a scale of 1-31 with 1 being the best image quality
|
||||
ffmpeg -ss "$PICKED_FRAME" -copyts -i "$INPUT_PATH" -frames:v 1 -q:v 1 -vf subtitles="${INPUT_PATH_SUBTITLE}" "$OUTPUT_PATH"
|
Reference in New Issue
Block a user