videoBitrate
(akabitrate
): target average number of bits-by-seconds. The bigger the better for quality, but bigger file size and slower (more cpu). Should be based onsize
andfps
. Recommended:height x width x fps x CONSTANT
desiredWidth
anddesiredHeight
(akasize
): Should be at 4:3 aspect ratio and even numbers. The bigger the better for quality (as far as bitrate allows it), but slower to encode (more cpu). Recommended: more than 800x600 on desktop recording, less for webcam.desiredFrameRate
(akafps
): number of frames per second being encoded. This should not affect frames (pictures) quality, but improves transitions between them. Also makes files bigger and requires proportional CPU, sovideo_file
will start dropping frames when cpu is not enough. Recommended: more than 15 and less than 30.ffmpegOptions
: extra options to passed to function av_dict_set. The more relevant are:deadline
: encoder algorithm, controls cpu/quality rate. Recommended: deadlinecpu-used
: from 0 to 15. the bigger the slower but also more cpu friendly. Recommended: 10 or 15
framesRecorded
: actual video frames saved to the file.framesDiscarded
: number of frames fromvideoQueue
that are being discarded when it can't flushaudioQueue
. You should start lowering bitrate (so size and fps) to avoid itlaggingEncoder
: true whenaudioQueue
is not empty after encoding (probably due to processing overhead). Shouldn't happen except cpu is trashing a lot and not even audio could be encoded.
onPlaybackChanged(string)
: receives the new playbackstate
:stopped
: from recording or paused statesrecording
: only fromstartRec
command or paused statepaused
: only from recording state
onPlaybackTimeChanged(float)
: updates current recording time (only works while onrecording
state)