Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

frame by frame video library [closed]

I am writing an Android application in which I'll have to create a video frame by frame using pictures from the phone. Looking around for some time, I haven't come across any suitable library for what I need. My requirements are that it should be written in Java or in C and that it will be open source because I am pretty sure that modifications regarding the memory foot print will be required. I thank you all in advance, George.

like image 269
Stamoulohta Avatar asked Dec 07 '25 12:12

Stamoulohta


1 Answers

You should try OpenCV library, Reading and Writing Images and Video.

CreateVideoWriter

CreateVideoWriter(filename, fourcc, fps, frame_size, is_color) → CvVideoWriter Creates the video file writer.

Parameters: filename (str) – Name of the output video file. fourcc (int) – 4-character code of codec used to compress the frames. For example, CV_FOURCC('P','I','M,'1') is a MPEG-1 codec, CV_FOURCC('M','J','P','G') is a motion-jpeg codec etc. Under Win32 it is possible to pass -1 in order to choose compression method and additional compression parameters from dialog. Under Win32 if 0 is passed while using an avi filename it will create a video writer that creates an uncompressed avi file. fps (float) – Framerate of the created video stream. frame_size (CvSize) – Size of the video frames. is_color (int) – If it is not zero, the encoder will expect and encode color frames, otherwise it will work with grayscale frames (the flag is currently supported on Windows only). The function cvCreateVideoWriter creates the video writer structure.

WriteFrame

WriteFrame(writer, image) → int Writes a frame to a video file.

Parameters: writer (CvVideoWriter) – Video writer structure image (IplImage) – The written frame The function cvWriteFrame writes/appends one frame to a video file.

here is another link.

like image 132
lowselfesteemsucks Avatar answered Dec 09 '25 00:12

lowselfesteemsucks



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!