Mark
/
celeste-ai
Archived
1
0
Fork 0
master
Mark 2023-02-18 21:09:53 -08:00
parent c418666a52
commit 6668614bbd
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 14 additions and 11 deletions

View File

@ -1,10 +1,9 @@
#!/bin/bash #!/bin/bash
# Where screenshots are saved # Where screenshots are saved
SC_ROOT="model_data/screenshots" SC_ROOT="model_data/tau_small/screenshots"
# WILL BE DELETED # WILL BE DELETED
mkdir out
OUTPUT_DIR="out/video_output" OUTPUT_DIR="out/video_output"
render_dir () { render_dir () {
@ -18,7 +17,11 @@ render_dir () {
$OUTPUT_DIR/${1##*/}.mp4 $OUTPUT_DIR/${1##*/}.mp4
} }
mkdir $OUTPUT_DIR
# Todo: error out if exists
mkdir -p $OUTPUT_DIR
echo "Making episode files..." echo "Making episode files..."
for D in $SC_ROOT/*; do for D in $SC_ROOT/*; do
@ -32,25 +35,25 @@ echo "Done."
# Generate video for each run # Generate video for each run
for f in $OUTPUT_DIR/*.mp4; do for f in $OUTPUT_DIR/*.mp4; do
echo file \'$f\' >> $OUTPUT_DIR/merge_list; echo file \'$f\' >> video_merge_list
done done
# Merge videos # Merge videos
ffmpeg \ ffmpeg \
-loglevel quiet -stats -y \ -loglevel error -stats -y \
-f concat \ -f concat \
-safe 0 \ -safe 0 \
-i merge_list \ -i video_merge_list \
-c copy \ -c copy \
$OUTPUT_DIR/00-all.mp4 $OUTPUT_DIR/00-all.mp4
rm $OUTPUT_DIR/merge_list rm video_merge_list
# Make accelerated video # Make accelerated video
ffmpeg \ ffmpeg \
-loglevel quiet -stats -y \ -loglevel error -stats -y \
-i $OUTPUT_DIR/00-all.mp4 -y \ -i $OUTPUT_DIR/00-all.mp4 \
-r 60 \ -framerate 60 \
-filter:v "setpts=0.125*PTS" \ -filter:v "setpts=0.125*PTS" \
8x.mp4 8x.mp4