SimpleFastOpenAtomicVisualiser
Loading...
Searching...
No Matches
Public Member Functions | List of all members
FFmpegRecord Class Reference

An FFmpeg based Record. More...

#include <ffmpegRecord.h>

Inheritance diagram for FFmpegRecord:
Inheritance graph
[legend]
Collaboration diagram for FFmpegRecord:
Collaboration graph
[legend]

Public Member Functions

 FFmpegRecord (std::filesystem::path file, glm::ivec2 resolution, uint8_t fps, std::string preset="slow", std::string profile="high", uint8_t crf=0, uint8_t cq=0, uint8_t qp=0, std::string codecName="libx264", uint32_t max_b_frames=0, uint32_t gop_size=1, uint32_t bitrate=2000000)
 Construct a new FFmpeg based Record from a file path, resolution and fps.
 
 ~FFmpegRecord ()
 
void open ()
 Open the video file.
 
void close ()
 Close the video file.
 
- Public Member Functions inherited from Record
 Record (std::filesystem::path file, glm::ivec2 resolution, uint8_t fps)
 Construct a new Record from a file path, resolution and fps.
 
virtual ~Record ()
 
void queueFrame (std::vector< uint8_t > pixels)
 Enqueue a frame to be written.
 
uint8_t queueSize ()
 Number of frames yet to be sent for writing.
 
uint64_t framesLeft ()
 Number of frame left to be written in total.
 
void writeFrames ()
 Send the frames in the buffer for writing.
 
bool isWriting () const
 If the video is being written to in the background.
 
bool isOpen () const
 If the file is open.
 
bool finalise ()
 Check if finalised.
 

Additional Inherited Members

- Protected Member Functions inherited from Record
void writeBuffer ()
 
- Protected Attributes inherited from Record
std::filesystem::path file
 
glm::ivec2 resolution
 
uint8_t fps
 
bool fileOpen = false
 
bool writing = false
 
std::vector< std::vector< uint8_t > > inBuffer
 
std::vector< std::vector< uint8_t > > outBuffer
 

Detailed Description

An FFmpeg based Record.

Remarks
Records to H265 with format determined from file extension
Generally higher quality than jo_mpeg.

Constructor & Destructor Documentation

◆ FFmpegRecord()

FFmpegRecord::FFmpegRecord ( std::filesystem::path  file,
glm::ivec2  resolution,
uint8_t  fps,
std::string  preset = "slow",
std::string  profile = "high",
uint8_t  crf = 0,
uint8_t  cq = 0,
uint8_t  qp = 0,
std::string  codecName = "libx264",
uint32_t  max_b_frames = 0,
uint32_t  gop_size = 1,
uint32_t  bitrate = 2000000 
)
inline

Construct a new FFmpeg based Record from a file path, resolution and fps.

Parameters
filethe video file path.
resolutionthe resolution.
fpsthe frames per second.

◆ ~FFmpegRecord()

FFmpegRecord::~FFmpegRecord ( )
inline

Member Function Documentation

◆ close()

void FFmpegRecord::close ( )
inlinevirtual

Close the video file.

Remarks
including trailer writing etc.

Implements Record.

◆ open()

void FFmpegRecord::open ( )
inlinevirtual

Open the video file.

Remarks
including header writing etc.

Implements Record.


The documentation for this class was generated from the following file: