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
Showing
4 changed files
with
57 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,2 @@ | ||
/tmp | ||
.DS_Store |
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,44 @@ | ||
= video2flipbook | ||
|
||
Downloads a video, then makes a flip book out of it. | ||
|
||
You need to print it out, cut the individual frames, and paste them together, of course. | ||
|
||
== Installation | ||
|
||
You will need to install the `youtube-dl`, `ffmpeg`, and `imagemagick` command line utilities. | ||
|
||
Mac: | ||
|
||
``` | ||
brew install youtube-dl | ||
brew install ffmpeg | ||
brew install imagemagick | ||
``` | ||
|
||
== Usage | ||
|
||
``` | ||
./video2flipbook.sh https://www.youtube.com/watch?v=OawrlVoQqSs por-que-no-los-dos | ||
``` | ||
|
||
Results in: | ||
|
||
``` | ||
$ ls por-que-no-los-dos/ | ||
por-que-no-los-dos-page000000.png por-que-no-los-dos-page000003.png por-que-no-los-dos-page000006.png por-que-no-los-dos-page000009.png por-que-no-los-dos-page000012.png | ||
por-que-no-los-dos-page000001.png por-que-no-los-dos-page000004.png por-que-no-los-dos-page000007.png por-que-no-los-dos-page000010.png | ||
por-que-no-los-dos-page000002.png por-que-no-los-dos-page000005.png por-que-no-los-dos-page000008.png por-que-no-los-dos-page000011.png | ||
``` | ||
|
||
One of the images: | ||
|
||
image:images/por-que-no-los-dos-page000009.png[Por que no los dos?!] | ||
|
||
== Author | ||
|
||
http://bguiz.com[Brendan Graetz] | ||
|
||
== Licence | ||
|
||
GPLv3 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,11 @@ | ||
#!/bin/bash | ||
# downloads a video, then makes a flipbook out of it | ||
|
||
VIDEO_URL=${1} | ||
FLIPBOOK_NAME=${2} | ||
mkdir -p ${FLIPBOOK_NAME} | ||
youtube-dl ${VIDEO_URL} -f 18 --output ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}.mp4 | ||
ffmpeg -i ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}.mp4 ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}-frame%06d.png | ||
montage ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}-frame*.png -tile 2x4 -geometry +200+1 ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}-page%06d.png | ||
rm ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}.mp4 ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}-frame*.png | ||
echo "$( ls ${FLIPBOOK_NAME}/${FLIPBOOK_NAME}-page*.png | wc -l ) pages generated in ${FLIPBOOK_NAME}/" |