|
|
# Principle
|
|
|
|
|
|
Mplayer will be launched in slave mode and will listen to commands sent via a Unix socket. The purpose of Pedalbear will of course be to send events to this socket and control mplayer. This setup is typically useful for transcription needs.
|
|
|
|
|
|
# Pedalbear configuration
|
|
|
|
|
|
First, create the socket :
|
|
|
|
|
|
`mkfifo /tmp/pedalbear-socket`
|
|
|
|
|
|
Then, configure Pedalbear using this configuration file:
|
|
|
|
|
|
```
|
|
|
[Pedalbear]
|
|
|
Device=/dev/infinity-in-usb-2
|
|
|
|
|
|
[LeftDown]
|
|
|
File=/tmp/pedalbear-socket
|
|
|
Message=pausing_keep seek -2 0\n
|
|
|
Repeat=1
|
|
|
|
|
|
[RightDown]
|
|
|
File=/tmp/pedalbear-socket
|
|
|
Message=pausing_keep seek +2 0\n
|
|
|
|
|
|
Repeat=1
|
|
|
|
|
|
[CenterDown]
|
|
|
File=/tmp/pedalbear-socket
|
|
|
Message=pause\n
|
|
|
|
|
|
[CenterUp]
|
|
|
File=/tmp/pedalbear-socket
|
|
|
Message=pause\n
|
|
|
```
|
|
|
|
|
|
This way, left and right pedals will be used to handle back and forward seeks in the movie/audio file and center pedal will handle the pause/resume mechanism. That way, you will be able to use the center pedal as a brake. Oh joy!
|
|
|
|
|
|
|
|
|
|
|
|
# Mplayer configuration
|
|
|
|
|
|
Then, start mplayer in slave mode:
|
|
|
|
|
|
`mplayer -slave -input file=/tmp/pedalbear-socket input.ogg`
|
|
|
|
|
|
See http://www.mplayerhq.hu/DOCS/tech/slave.txt for more information on slave mode and more commands. |
|
|
\ No newline at end of file |