Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Playback a video through Jevois?

0 votes

I was hoping to record a series of videos using the JeVois and then play them back through the JeVois in order to improve the CV algorithms in a highly controlled way. Is this possible?

If not, then I guess my alternative is to record the videos on the JeVois but then play them back on a dev environment on the PC using Python and Open CV.  Is there any reason that this would not produce identical results?

Thanks in advance.

Dave

asked Sep 12, 2019 in Programmer Questions by DaveA (290 points)

1 Answer

+1 vote
 
Best answer

Yes, this is supported, exactly for the purposes you mention (optimizing an algo).

When we implemented this, we assumed people would want to use this with jevois-daemon running on the host computer. Parameter cameradev selects the device for the camera, but that could also be a movie file:

 --cameradev (string) default=[/dev/video0]
    Camera device name (if starting with /dev/v...), or movie file name (e.g., movie.mpg) or image sequence (e.g., im%02d.jpg, to read frames im00.jpg, im01.jpg, etc).
from http://jevois.org/doc/UserCli.html

If running jevois-daemon on host (this requires that you install the jevois deb packages on an ubuntu computer), you would start it as follows:

jevois-daemon --cameradev=movie.mpg --videomapping=23 # select the mapping that corresponds to your module; use listmappings in the console to know that number.

If you are using JeVois Inventor and want to run the movie in your camera instead, put your movie in the JEVOIS partition of the SD card, and then, add this to JEVOIS:/config/params.cfg

cameradev=/jevois/movie.mpg

(note: this config file is for experts only and thus is not available in JeVois inventor. It is the system-global params.cfg as opposed to being each module's params.cfg, which is exposed in JeVois inventor. So you need to connect the SD card to your computer, or export it from a running jevois camera it using the button under the System tab of jevois inventor).

If you copy a file movie.mpg into the root of the JEVOIS partition, that is seen by the software running in the camera as  /jevois/movie.mpg

Note: when we read a movie file, we automatically rescale it to whatever input resolution your module expects.

Note2: When the movie ends, we try to rewind it, but for some video formats this is not possible. In such case, your module may stall at the end of the movie with an error that it cannot read the next video frame.

answered Sep 12, 2019 by JeVois (46,580 points)
selected Sep 15, 2019 by DaveA
I forgot, to save the video, there is a module SaveVideo that you can use: http://jevois.org/moddoc/SaveVideo/modinfo.html
Many thanks!  I saw that in the documentation but at the time it did not make sense. Now it does.
...