-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fc61e7f
Showing
24 changed files
with
1,954 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,47 @@ | ||
DIR_SRC = ./src | ||
DIR_OBJ = ./obj | ||
DIR_BIN = ./bin | ||
|
||
SRC = $(wildcard ${DIR_SRC}/*.c) | ||
OBJ = $(patsubst %.c,${DIR_OBJ}/%.o,$(notdir ${SRC})) | ||
|
||
CC = clang | ||
CFLAGS = -g -pipe -O2 -Wall -Wextra -std=c99 -Wcomment -I${DIR_SRC} | ||
|
||
TARGET = v2w | ||
|
||
BIN_TARGET = ${DIR_BIN}/${TARGET} | ||
|
||
${BIN_TARGET}:${OBJ} | ||
$(CC) $(CFLAGS) $(OBJ) -o $@ -lprofiler | ||
|
||
${DIR_OBJ}/%.o:${DIR_SRC}/%.c ${DIR_OBJ} | ||
$(CC) $(CFLAGS) -c $< -o $@ | ||
|
||
${DIR_OBJ}: | ||
@mkdir -p $@ | ||
|
||
${DIR_BIN}: | ||
@mkdir -p $@ | ||
|
||
prof.txt: | ||
@pprof --text ./bin/v2w ./test.prof > ./prof.txt | ||
|
||
out.mp4: | ||
@echo "Compose Video." | ||
@ffmpeg -loglevel 0 -stats -r 24 -i ./tmp/frames_proc/v-%05d.bmp -c:v libx264 -vf fps=24 -pix_fmt yuv420p ./out_tmp.mp4 | ||
@echo "Integrate Audio." | ||
@ffmpeg -loglevel 0 -stats -i ./out_tmp.mp4 -i ./tmp/Sample.aac -acodec copy -vcodec copy out.mp4 | ||
rm out_tmp.mp4 | ||
|
||
.PHONY:clean run | ||
|
||
clean: | ||
rm -f ${DIR_OBJ}/*.o | ||
rm -rf ./tmp | ||
rm -f out.mp4 | ||
rm -f ./tmp/Sample.aac | ||
rm -f ${DIR_BIN}/${TARGET} | ||
|
||
run: | ||
@time ${BIN_TARGET} |
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,14 @@ | ||
# Arch | ||
|
||
0. Getting fps and length by calling the ffmpeg program | ||
1. Transform video to BMP frame files by calling the ffmpeg program | ||
2. Read one BMP file to image struct | ||
3. Thresholding | ||
4. Edge Detection by convolution and transform to absolute value | ||
5. Thresholding | ||
6. Select starting point (random for the first, and nearest for privies frame) | ||
7. Get Route Array by doing graph traversal using depth first search | ||
8. Adjust Route Array to fixed length using cubic Hermite interpolator | ||
9. Loop from 2 to 8 to generate all Route Arrays for every frame | ||
10. Merge Route Arrays to one Array | ||
11. transform Route Array to wav file |
Oops, something went wrong.