Close
0%
0%

Open Source Live Projection Control

Control projection playback in real time synchronized to a live performance.

Similar projects worth following
Professional video control systems can be quite expensive. This project aims to make a simple system capable of playing back SD video for live performances. This tool could help musicians and other artists make responsive projections for live or installation pieces.

The system will consist of a control server, human interface device (HID), and a playback server. The control server will accept Open Sound Control (OSC) commands and output video via Real-time Transmission Protocol (RTP). The HID will output OSC commands, and the playback server can be anything that can decode an RTP stream (eg. VLC).

The components can be distributed across a network or local to one machine. In the example diagram, the video files are on the server which is running the pyjector software. OSC commands are sent through the network. The client machine is running VLC and is set to decode the RTP stream from the server. This could be achieved on one machine using the loopback interface as well.

Code Repository: https://github.com/duckinahat/pyjector.git

application.jpg

Example setup

JPEG Image - 683.99 kB - 05/29/2016 at 22:22

Preview
Download

  • GPLv3

    Nicola Leonardi05/29/2016 at 23:31 0 comments

    This project is now licensed under the GPL v3, see LICENSE in github repo

  • Created simple python script for keystroke to OSC

    Nicola Leonardi05/29/2016 at 23:15 0 comments

    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)
    

  • Added ideas for basic functionality via OSC

    Nicola Leonardi05/29/2016 at 22:38 0 comments

    OSC addresses

    /video/load ,i

    /video/play ,i

    /video/reverse ,i

    /video/speed ,i

  • Project Goals

    Nicola Leonardi05/29/2016 at 21:15 0 comments

    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.

View all 4 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates