Compare commits
No commits in common. "9dc258297c819e66572570d0f5b908599cad4139" and "7ad7c5483158b2109df11258f3ec65fa1439f2fd" have entirely different histories.
9dc258297c
...
7ad7c54831
|
@ -1,6 +1,4 @@
|
|||
videos
|
||||
output
|
||||
frames
|
||||
node/node_modules
|
||||
*.pth
|
||||
videos.txt
|
||||
*.pth
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#####################################################
|
||||
#
|
||||
# This script will concatenate two videos in order
|
||||
# and output the new video as ProRes file.
|
||||
#
|
||||
# Usage: bash ffmpeg/basic/concat.sh <input video 1> <input video 2> <output video>
|
||||
#
|
||||
#####################################################
|
||||
|
||||
INPUT_1=`realpath "${1}"`
|
||||
INPUT_2=`realpath "${2}"`
|
||||
OUTPUT="${3}"
|
||||
|
||||
# Check if output file extension is .mov
|
||||
if [[ "${OUTPUT}" != *".mov" ]]; then
|
||||
echo "Please use an .mov extension on your output file argument"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "file '${INPUT_1}'" > videos.txt
|
||||
echo "file '${INPUT_2}'" >> videos.txt
|
||||
|
||||
ffmpeg -f concat \
|
||||
-safe 0 \
|
||||
-i videos.txt \
|
||||
-c:v prores_ks \
|
||||
-profile:v 3 \
|
||||
-c:a aac \
|
||||
"${OUTPUT}"
|
||||
|
||||
# cleanup file list
|
||||
rm -f videos.txt
|
Binary file not shown.
Before Width: | Height: | Size: 94 KiB |
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
#https://github.com/processing/processing/wiki/Command-Line
|
||||
|
||||
# processing-java requires the full path of the sketch
|
||||
SKETCH=`realpath ./processing/example-sketch`
|
||||
|
||||
# pass all arguments on bash script example-sketch.pde sketch
|
||||
processing-java --sketch="${SKETCH}" --run \
|
||||
"${@}"
|
|
@ -1,46 +0,0 @@
|
|||
|
||||
//Input should be .jpg or .png
|
||||
String input = "";
|
||||
String output = "";
|
||||
|
||||
PImage inputImage;
|
||||
PGraphics canvas;
|
||||
|
||||
void setup() {
|
||||
if (args != null) {
|
||||
if (args.length > 0 && args[0] != null) {
|
||||
input = args[0];
|
||||
} else {
|
||||
println("No input argument provided");
|
||||
exit();
|
||||
}
|
||||
if (args.length > 1 && args[1] != null) {
|
||||
output = args[1];
|
||||
} else {
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
println("No arguments provided");
|
||||
exit();
|
||||
}
|
||||
|
||||
//don't show the processing window
|
||||
surface.setVisible(false);
|
||||
//only draw script once
|
||||
noLoop();
|
||||
//use psuedo-random generator
|
||||
randomSeed(50);
|
||||
}
|
||||
|
||||
void draw () {
|
||||
inputImage = loadImage(input);
|
||||
canvas = createGraphics(inputImage.width, inputImage.height);
|
||||
canvas.image(inputImage, 0, 0);
|
||||
|
||||
/************************
|
||||
* Do cool things here!!!
|
||||
************************/
|
||||
|
||||
canvas.save(output);
|
||||
exit();
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#####################################################
|
||||
#
|
||||
# This script will take all of the frames rendered
|
||||
# by a processing sketch using the "saveFrame()"
|
||||
# function and sticth them together into a video.
|
||||
# By default frames save as
|
||||
#
|
||||
# Usage: bash processing/movie-maker.sh <input dir> <output video>
|
||||
#
|
||||
#####################################################
|
||||
|
||||
INPUT_DIR="${1}"
|
||||
OUTPUT="${2}"
|
||||
|
||||
FRAMERATE=24
|
||||
|
||||
ffmpeg \
|
||||
-f image2 \
|
||||
-i "${INPUT_DIR}/screen-%04d.tif" \
|
||||
-r ${FRAMERATE} \
|
||||
-c:v prores_ks \
|
||||
-profile:v 3 \
|
||||
"${OUTPUT}"
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#####################################################
|
||||
#
|
||||
# This script will export all frames of a video and
|
||||
# then loop over them by running a processing sketch
|
||||
# on each one. The example provided "example-sketch"
|
||||
# will output the same image provided as input in its
|
||||
# current state.
|
||||
#
|
||||
# Usage: bash processing/processing.sh <input video> <output video>
|
||||
#
|
||||
#####################################################
|
||||
|
||||
INPUT="${1}"
|
||||
OUTPUT="${2}"
|
||||
|
||||
# Check if output file extension is .mov
|
||||
if [[ "${OUTPUT}" != *".mov" ]]; then
|
||||
echo "Please use an .mov extension on your output file argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p frames
|
||||
mkdir -p processing-frames
|
||||
|
||||
ffmpeg -i "${INPUT}" frames/frame-%06d.png
|
||||
|
||||
FRAMES=frames/*.png
|
||||
|
||||
for frame in ${FRAMES}; do
|
||||
echo "Processing $frame with example-sketch..."
|
||||
|
||||
# Run the processing sketch on every frame
|
||||
bash processing/example-sketch.sh "${frame}" "processing-${frame}"
|
||||
|
||||
done
|
||||
|
||||
ffmpeg -f image2 -i processing-frames/frame-%06d.png -c:v prores_ks -profile:v 3 "${OUTPUT}"
|
||||
|
||||
# clean up frames folder
|
||||
rm -rf frames
|
||||
rm -rf processing-frames
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash -e
|
||||
|
||||
#https://github.com/ProGamerGov/neural-style-pt
|
||||
|
||||
python3 -m pip install neural-style
|
||||
neural-style -download_models ./
|
|
@ -1,25 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
INPUT="${1}"
|
||||
STYLE="${2}"
|
||||
OUTPUT="${3}"
|
||||
|
||||
mkdir -p frames
|
||||
mkdir -p neural-frames
|
||||
|
||||
ffmpeg -i "${INPUT}" frames/frame-%06d.png
|
||||
|
||||
FRAMES=frames/*.png
|
||||
|
||||
for frame in ${FRAMES}; do
|
||||
echo "Running style transfer $frame -> neural-$frame ..."
|
||||
bash python/style_transfer.sh "${frame}" "${STYLE}" "neural-${frame}"
|
||||
done
|
||||
|
||||
sleep 10
|
||||
|
||||
ffmpeg -f image2 -i frames/neural-frame-%06d.png -c:v prores_ks -profile:v 3 "${OUTPUT}"
|
||||
|
||||
# cleanup frames directories when done
|
||||
rm -rf frames
|
||||
#rm -rf neural-frames
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
INPUT="${1}"
|
||||
STYLE="${2}"
|
||||
OUTPUT="${3}"
|
||||
|
||||
# https://github.com/ProGamerGov/neural-style-pt
|
||||
|
||||
neural-style \
|
||||
-style_image "${STYLE}" \
|
||||
-content_image "${INPUT}" \
|
||||
-output_image "${OUTPUT}" \
|
||||
-model_file python/nin_imagenet.pth \
|
||||
-gpu c \
|
||||
-backend nn \
|
||||
-num_iterations 500 \
|
||||
-seed 123 \
|
||||
-content_layers relu0,relu3,relu7,relu12 \
|
||||
-style_layers relu0,relu3,relu7,relu12 \
|
||||
-content_weight 10 \
|
||||
-style_weight 500 \
|
||||
-save_iter 0 \
|
||||
-image_size 720 \
|
||||
-optimizer adam
|
Loading…
Reference in New Issue