SimpleMapper is a C++ application developed using openFrameworks, tailored for media playback and simple 4-point interactive video mapping. It uses ofxOMXPlayer
for efficient video playback, making it ideal for platforms like Raspberry Pi. The application provides functionalities for video playback control, interactive adjustment of video mapping points, and system shutdown.
A compiled and ready-to-use version of SimpleMapper is available for download. This release is convenient for users who prefer not to build the application from source. Check the releases section for the latest downloadable version.
- openFrameworks setup and configured.
ofxOMXPlayer
addon installed.
- Clone or download the SimpleMapper application source code.
- Place the code in your openFrameworks
apps
directory. - Ensure
ofxOMXPlayer
is installed in your openFrameworks environment. - Compile and build the application using the openFrameworks project generator or your preferred IDE.
- The application reads the video file path from a text file named
video
. - Place the
video
text file in thedata
folder within the application directory. - The
video
file should contain the path to the video file, relative to thedata
folder. - For example, if your video file is named example.mp4 and located in the data folder, the video file should contain the text example.mp4.
-
Starting the Application: Run the compiled executable to start video playback if a video file is specified and available.
-
Interactive Control:
- Use keys
1
to4
for selecting corner points of the video mapping area. - Use arrow keys to adjust the position of the selected corner point.
- Press
s
to save the current points configuration. - Press
p
to pause or resume video playback. - Press
r
to reset the points to default positions. - Press
d
to toggle the drawing of the video.
- Use keys
-
Close Application:
- Press
Esc
or 'Ctrl+C'.
- Press
-
Shutdown:
- Long press
q
to initiate system shutdown.
- Long press
To automatically start the SimpleMapper application when you open a terminal session on Raspberry Pi, add the following line to the .bashrc
file:
- Open the
.bashrc
file in a text editor:nano ~/.bashrc
- Add the following line at the end of the file:
/path/to/SimpleMapper/SimpleMapper
Replace /path/to/SimpleMapper/SimpleMapper with the actual path to the SimpleMapper executable.
Save and exit the editor. (In nano, press CTRL+X, then Y to confirm, and Enter to save.)
Now, when you open a terminal session on your Raspberry Pi, the SimpleMapper application will start automatically.
SimpleMapper utilizes ofxOMXPlayer
for optimized video playback performance, especially on Raspberry Pi hardware. For more details and performance considerations, please refer to the ofxOMXPlayer GitHub repository.