mv1005/dragonframe-bg-switcher
Switches the image on a screen in sync with Dragonframe events. The screen can be used as dynamic background during stop-motion recordings.
Dragonframe Background Switcher
Switches the image on a screen in sync with Dragonframe events. The
screen can be used as dynamic background during stop-motion recordings.
Table of Contents
Status
This project is still under initial development.
Installation
Recommended installation method is using pipx. This will automatically
install the application inside an isolated virtualenv and populate the
provided executables via your PATH.
pipx install git+https://github.com/mv1005/dragonframe-bg-switcher.gitWhen installing manually with pip, using a virtualenv is recommened as
well.
pip install git+https://github.com/mv1005/dragonframe-bg-switcher.gitUsage
Run the application
Run the program and specify an image directory:
dragonframe-bg-switcher /my/image/dir/Connect with Dragonframe
Connect your Dragonframe instance to the server on port 8888 using the
so called "Simple Interface". See Dragonframe documentation for details.
The program waits for events of type "Position Frame (Move to
Frame)" received from Dragonframe, which according to the docs looks
like:
PF [FRAME] [EXPOSURE] [EXPOSURE NAME] [STEREO INDEX][\r\n]
The third argument named EXPOSURE NAME will be used as base name for
the image file (without extension) looked up in the directory you
specified when starting dragonframe-bg-switcher. That image will be
loaded and served via a dynamic web page.
Because Dragonframe does not allow dots in EXPOSURE NAME you cannot
specify an image file with extension explicitly. Instead, the first file
found in the image directory with any extension and a matching basename
will be loaded.
If no image can be found matching the supplied name, the displayed image
is not changed.
Display dynamic image in browser
To display that page, open a browser and connect to the webserver on port
5000 on the machine running dragonframe-bg-switcher.
The URL looks like http://<IP or HOST>:5000.
Once opened in your browser, subsequent PF-events will trigger an
automatic update of the image shown on your screen without further
action of the user.
To use this display as background for shooting stop motion frames,
switch your browser to full screen mode.
Play around without Dragonframe
You can emulate the behaviour of Dragonframe with any program that is
capable of sending text via a TCP socket.
The following shows an example using nc (netcat), assuming that
dragonframe-bg-switcher is running on the same host.
nc localhost 8888In netcat prompt, type any Dragaonframe event you like, e.g.
PF 1 1 test_image
This should trigger the loading of an image file named test_image
(which must be present in the image directory) and show it in your
browser.
Roadmap
Currently, the following features are planned for upcoming releases:
- Fix short delay when image is show for the first time
- Support for indiviual backgound images per frame
License
Dragonframe Background Switcher is distributed under the terms of the
MIT license.