I want to program a application, when I push the start button, it runs a ffmpeg command to record a online stream, when I push the stop button, I want to send a "q" key to stop the recording. how should I do?
Printable View
I want to program a application, when I push the start button, it runs a ffmpeg command to record a online stream, when I push the stop button, I want to send a "q" key to stop the recording. how should I do?
you have to add an actionListener to your button like this:
yourButtonName.addActionListener(new actionListener(){.....});
actionListener is an interface so you have to over write the method actionperformed and add what you want to do with your application (depending on which button user pressed)
Hello mt888.
There is a code snippet for actionListener here:
http://www.javaprogrammingforums.com...ava-swing.html
There is also a tutorial for the robot class here:
http://www.javaprogrammingforums.com...bot-class.html
I hope this helps!
I don't thnk Robot willl come into it, isn't ffmpeg a command line app?
@OP: Recommended reading (go through ALL parts)
When Runtime.exec() won't - JavaWorld
db