Intended to work in conjunction with RekordBoxSongExporter
This script attempts to sync the playback rate and frame-rate of a video playing in VLC to the master_bpm in Rekordbox.
Check out BPM to FPS calculator for a more detailed explanation of the math used.
- This script monitors a folder for file updates created by the exporter
- On file update, extracts the metadata out of the GDI text template
- Interfaces with VLC http control interface to query for current status, playback rate, and video codec frame-rate
- Computes a value for a framerate that would be a better fit into the current bpm
- If new rate is significantly different, updates the rate in VLC
- Logs to
./logs, saves last 3 sessions - Runs 2 threads, file monitor and vlc interface, as daemons
- End execution with SIGTERM (cntl+C) and similar
Configure the following variables
WATCH_FOLDERPath to the folder to monitor set in the Exporter default: "./gdi_files"VLC_HOSThttp interface to VLC, needs to be turned on in Preferances default: "http://localhost:8080"VLC_PASSWORDset in VLC > Preferences > All > Interface > Main interfaces > Lua > PasswordTEMPLATE_MAPkey value pairs with filename as key and the template as value, set in Exporter. The default includes all the variables current version of Exporter can grab