Skip to content

Instantly share code, notes, and snippets.

Han You sqd

Block or report user

Report or block sqd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sqd
sqd / CCWebcam.py
Created Aug 8, 2018
capture colorado college webcam
View CCWebcam.py
#!/usr/bin/python2
import pafy
import cv2
url = '8XFlf22-46s'
vpafy = pafy.new(url)
play = vpafy.getbest()
cap = cv2.VideoCapture(play.url)
@sqd
sqd / timelapse.md
Created Aug 8, 2018 — forked from alexellis/timelapse.md
ffmpeg time-lapse
View timelapse.md

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

View gist:7362d93a68f7055c4225f412b8284026
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.
-dmenu Start in dmenu mode.
-display [string] X server to contact.
${DISPLAY}
-h,-help This help message.
You can’t perform that action at this time.