Resurgence (PY2022)
Codebase for the Husky Robotics 2021-2022 rover Resurgence
|
This class encodes OpenCV frames into encoded H264 data that can be sent to an H264 decoder, like JMuxer. More...
#include <H264Encoder.h>
Public Member Functions | |
H264Encoder (int fps, int rf) | |
Uses the h264encoder library to encode webcam frames into encoded video data. | |
std::vector< std::basic_string< uint8_t > > | encode_frame (const cv::Mat &frame) |
First frame will set the resolution and subsequent frames must match the resolution. | |
This class encodes OpenCV frames into encoded H264 data that can be sent to an H264 decoder, like JMuxer.
video::H264Encoder::H264Encoder | ( | int | fps, |
int | rf ) |
Uses the h264encoder library to encode webcam frames into encoded video data.
fps | The framerate of the input video/frames to be encoded. |
rf | The RF factor for the encoder. Max 51, Min 1. Higher values mean more compression and smaller encoded frame sizes, but they also lead to lower quality. This value shouldn't be below 21 as values below this have essentially the same quality while having much larger encoded frame sizes. |
std::vector< std::basic_string< uint8_t > > video::H264Encoder::encode_frame | ( | const cv::Mat & | frame | ) |
First frame will set the resolution and subsequent frames must match the resolution.
frame | A reference to an OpenCV 2D Matrix representing the frame to be encoded. |