Frame Recording

I am writing an Android application in which I will have to create frame by frame using pictures from my phone. Looking around for some time, I did not come across any suitable library for what I needed. My requirements are that it must be written in Java or C, and that it will be open source, because I am sure that changes will be required in relation to printing in memory. I thank you all in advance, George.

+4
source share
1 answer

You should try the OpenCV library, reading and writing images and videos .

CreateVideoWriter

CreateVideoWriter (filename, fourcc, fps, frame_size, is_color) -> CvVideoWriter Creates a record of video files.

Parameters: filename (str) - name of the output video file. fourcc (int) - The 4-character codec code used to compress frames. For example, CV_FOURCC ('P', 'I', 'M,' 1 ') is the MPEG-1 codec, CV_FOURCC (' M ',' J ',' P ',' G ') is the motion-jpeg codec, and so on. .d. In Win32, you can pass -1 to select a compression method and additional compression options from the dialog. In Win32, if 0 is used when using the avi name, it will create a video recorder that creates an uncompressed AVI file. fps (float) - Barometer of the created video stream. frame_size (CvSize) - The size of the video frames. is_color (int). If it is not equal to zero, the encoder expects and encodes color frames, otherwise it will work with frames in grayscale (the flag is currently only supported on Windows). The cvCreateVideoWriter function creates a video recording structure.

Writeframe

WriteFrame (author, image) -> int Writes a frame to a video file.

Parameters: writer (CvVideoWriter) - video recording structure image (IplImage) - recorded frame The cvWriteFrame function writes / adds one frame to a video file.

here is another link.

+2
source

Source: https://habr.com/ru/post/1392311/


All Articles