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
// A simple Unity example script that makes a UI component track position of world space object rendered with | |
// specific world space camera. Canvas needs to be in Screen Space Camera mode. | |
[ExecuteInEditMode] | |
public class UIFollow : MonoBehaviour | |
{ | |
[Tooltip("World space object to follow")] | |
public GameObject target; | |
[Tooltip("World space camera that renders the target")] | |
public Camera worldCamera; | |
[Tooltip("Canvas set in Screen Space Camera mode")] |
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
''' | |
Taken from: | |
http://stackoverflow.com/users/1074592/fakerainbrigand | |
http://stackoverflow.com/questions/15401815/python-simplehttpserver | |
''' | |
import SimpleHTTPServer, SocketServer | |
import urlparse, os | |
PORT = 3000 |
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
#!/usr/bin/python | |
''' | |
A Simple mjpg stream http server for the Raspberry Pi Camera | |
inspired by https://gist.github.com/n3wtron/4624820 | |
''' | |
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer | |
import io | |
import time | |
import picamera |
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
# Timecode burn with ffmpeg | |
# ffmpeg must be configured with --enable-libfreetype | |
# box=1 - tells ffmpeg to draw a box around the text | |
# boxcolor - format is 0xRRGGBB[AA] | |
ffmpeg -i video.mov -vcodec libx264 -cmp 22 -vf "drawtext=fontfile=DroidSansMono.ttf: timecode='09\:57\:00\:00': r=23.976: x=(w-tw)/2: y=h-(2*lh): fontcolor=white: box=1: boxcolor=0x00000099" -y output.mov |