Skip to content

Commit 0269d81

Browse files
committed
Merge pull request #2 from SuborbitalPigeon/master
looks good :)
2 parents 8395fb0 + c5f4387 commit 0269d81

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

ffmpeg/youtube.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ if [ -z "$1" ]; then
1010
echo "Needs a file to convert" >&2
1111
exit 1
1212
else
13-
# Ratefactor can be varied according to taste
14-
ffmpeg -i "$INPUT" -c:a libopus -b:a 128k -c:v libx264 -crf 25 -sn $OUTPUT.mkv
13+
# See https://support.google.com/youtube/answer/1722171?hl=en
14+
# Summary:
15+
# ffmpeg native AAC encoder, set for stereo recommended bitrate
16+
# -preset slow -> Set to the slowest preset that you can be bothered with
17+
# -crf 25 -> Somewhat arbitrary, see document above for bitrate guidance, CRF mode should be better quality than 1 pass VBR
18+
# -g 12 -> GOP size of 12, should be half of framerate
19+
# -bf 2 -> Number of consecutive b frames
20+
# -flags +cgop -> closed GOP
21+
# -pix_fmt yuv420p -> YUV 4:2:0 subsampling
22+
# -tune film -> For live action videos, feel free to choose another tune parameter
23+
ffmpeg -i "$INPUT" -c:a aac -strict -2 -b:a 384k -c:v libx264 -preset slow -crf 25 -g 12 -bf 2 -flags +cgop -pix_fmt yuv420p -tune film $OUTPUT.mp4
1524
fi

opencv/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Setting up OpenCV 3.1
2+
=====================
3+
4+
```bash
5+
wget https://github.com/Itseez/opencv/archive/3.1.0.tar.gz -O opencv-3.1.0.tar.gz
6+
wget https://github.com/Itseez/opencv\_contrib/archive/3.1.0.tar.gz -O opencv_contrib-3.1.0.tar.gz
7+
tar -xf opencv-3.1.0.tar.gz
8+
tar -xf opencv_contrib-3.1.0.tar.gz
9+
cd opencv-3.1.0
10+
wget -O - https://github.com/Itseez/opencv/pull/6009.diff | patch -p1
11+
mkdir release
12+
cd release
13+
cmake -DOPENCV\_EXTRA\_MODULES\_PATH=../../opencv_contrib-3.1.0/modules ../
14+
make -j4
15+
sudo make install
16+
```

opencv/orb-kps.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python3
2+
3+
import cv2
4+
from matplotlib import pyplot as plt
5+
6+
img = cv2.imread("<image_name>")
7+
orb = cv2.ORB_create()
8+
kps = orb.detect(img)
9+
10+
kpimg = cv2.drawKeypoints(img, kps, None, None, cv2.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS)
11+
plt.imshow(kpimg)
12+
plt.show()

0 commit comments

Comments
 (0)