I am making a photo booth type application using the java swing framework and the raspberry pi camera module. I want to have a preview from raspivid visible to the user so they can preview the picture before taking it embedded into a java application.
I have been struggling to try and find a good method to have the java panel display the feed from raspivid. I keep finding bits and pieces of what to do but i see no clear way to do this in an efficient and quick manner.
From what I understand, I think have to do the following
-Exec raspivid (With possible the -o param)
-Use a media framework, such as jvlc
I am just struggling putting the pieces together. I know raspvid can stream to stdout (using the -o arg), but i'm not sure how to use jvlc to see that stream (if it is at all possible).
I know that jvlc can play media files in a panel, but i'm not sure if it can do it while the file is being written or if you can play it from a stream.
I am just unsure on how to go about this issue in a neat efficient way for the pi. I'm just wondering if anyone has done anything similar and has any pointers/suggestions on how I would go about doing this.