Created
February 1, 2022 07:49
-
-
Save cathandnya/08dd616eb910378dc25ecf58d4a9eaa8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/zsh | |
# anaconda | |
source ~/opt/anaconda3/etc/profile.d/conda.sh | |
conda activate tecog | |
pip3 install -r requirements.txt | |
FFMPEG="/usr/local/bin/ffmpeg" | |
PYTHON="/usr/local/bin/python3" | |
INPUT=$1 | |
OUTPUT=$2 | |
TMPDIR="LR/calendar" | |
dirstr='./results/' | |
testpre='calendar' | |
rm -rf $TMPDIR | |
mkdir $TMPDIR | |
rm -rf "results/calendar" | |
# get fps | |
FPS=`$FFMPEG -i $INPUT 2>&1 | sed -n "s/.*, \(.*\) fp.*/\1/p"` | |
echo "fps: $FPS" | |
# to images | |
$FFMPEG -r $FPS -i $INPUT -vcodec png "${TMPDIR}/%08d.png" < /dev/null | |
# upscale | |
$PYTHON runGan.py 1 | |
# make movie | |
$FFMPEG -y -r $FPS -i "results/calendar/output_%08d.png" -vcodec libx264 -pix_fmt yuv420p $OUTPUT < /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment