#include <mjpeg_utils.hpp>
◆ save_avi_frames()
void mjpeg_utils::save_avi_frames |
( |
const string * |
avi, |
|
|
const string * |
source_file |
|
) |
| |
|
static |
Splits an AVI|MJPEG file into JPEG images and tests the magic number in each to see if it has a MIME type of image/jpeg. It saves those that do and discards the rest.
- Parameters
-
avi | input AVI|MJPEG file |
source_file | the full path and name of the source file. Used to construct output file names. |
◆ trim_zero_pad()
void mjpeg_utils::trim_zero_pad |
( |
string & |
s | ) |
|
|
static |
Remove the extra zeros (0x00) sometimes left after conversion from Base64.
If the Base64 encoded string ends with equal sign(s) it will have such a pad when decoded. This version is specific to JPEG files which must end with the sequence 0xFF 0xD9. OpenCV complains of an "overread 8" error if the pad is not removed before conversion from avi to mp4 video.
This function also has the effect of removing partial frames from the end of the file; a sort of repair.
- Parameters
-
The documentation for this class was generated from the following files: