Code Repository: https://github.com/duckinahat/pyjector.git
Control projection playback in real time synchronized to a live performance.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Code Repository: https://github.com/duckinahat/pyjector.git
application.jpgExample setupJPEG Image - 683.99 kB - 05/29/2016 at 22:22 |
|
|
This project is now licensed under the GPL v3, see LICENSE in github repo
Threw together a quick script for testing functionality
#! /usr/bin/env python3
"""
This converts keyboard input to basic OSC commands for controlling video playback
"""
import argparse
import sys
import tty
import termios
from pythonosc import osc_message_builder
from pythonosc import udp_client
def getch():
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(fd)
ch = sys.stdin.read(1)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
return ch
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--ip", default="127.0.0.1",
help="The ip of the OSC server")
parser.add_argument("--port", type=int, default=12345,
help="The port the OSC server is listening on")
args = parser.parse_args()
client = udp_client.UDPClient(args.ip, args.port)
keymap = {
'p' : "/play",
'n' : "/next",
'b' : "/previous",
'f' : "/faster",
's' : "/slower"
}
ch = ''
while ch != 'q':
ch = getch()
if ch in keymap:
msg = osc_message_builder.OscMessageBuilder(address = "/video"+keymap[ch])
msg = msg.build()
client.send(msg)
OSC addresses
/video/load ,i
/video/play ,i
/video/reverse ,i
/video/speed ,i
Create a human interface device capable of sending OSC commands:
- Functions: Play/Pause, Forward/Reverse, Tap Tempo, Next/Prev, CUE#, etc...
- Output through ethernet, wifi, or usb.
- Could be a python script to capture keystrokes, or a smartphone app, or raspberry pi/arduino/esp8266
Create a server application:
- Functions: Load video files, output RTP
- Possibly Python wrapper for gstreamer
- Stream 640x480 mp4 with sub 50ms latency
- Switch video cues and change playback speed on the fly
Everything could be running on a single computer or distributed across a LAN. For optimal streaming latency probably will need dedicated network, either router or loopback interface.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates