XXXdhelic
Posts: 1
Joined: Wed Aug 06, 2014 7:24 pm

code for playing and recording video

Wed Aug 06, 2014 7:35 pm

Hi everyone!
My first post here :geek: . I have this project and I need to code a simple program that will play a video and after a external button is triggered the video playing stops and start a recording (with PI camera) and the feedback of the recorded imagem is shown on the HDMI output. When the user trigger the button again the video record stops, save the data on the SD while the first video start to play again.

I'm not a programmer :roll: but I find my way very easily. So I come here to ask for hints and maybe some sketch code you guys may have, where I can start from.

very glad for any help. :D :D :D

Thanks a lot!

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: code for playing and recording video

Fri Aug 08, 2014 10:39 am

Try whatever mechanism Java uses to launch external
commands (something like exec()) and start omxplayer with
the video file.

To check the GPIO for button input , use http://pi4j.com/

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

gkreidl
Posts: 6335
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: code for playing and recording video

Fri Aug 08, 2014 11:00 am

If you need to learn programming anyway, start with Python.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Java”