Skip to content

Commit 0d8d140

Browse files
committed
feat: User-defined podcast fps
Currently, the podcast recording is set to a fixed 10 fps. While there exists a setting to allow for customisation, it remains unused. This change takes the user setting into account. The actual fps are determined by the activity on the board, so it represents a maximum fps. This value is further refined depending on the selected podcast preset: - Full: Use the value directly - Medium: The max. fps are halved - Small: The max. fps are divided by 4 The default has been bumped up to 100 fps. This value is never actually reached - the resulting fps hover mostly around 40-70. During testing on my rather powerful machine (with values exceeding 250 fps), the observed frame rate never got appreciably higher than 100 fps (maximum was 127 fps for short periods at 1000). Thus, the Full preset in its default configuration captures all activity. Choosing a lower preset decreases the fps accordingly, with 25 fps at the lower end of what is perceived as fluid motion, though actual framerate can be around 12-18. Further tuning is possible via the "Podcast->FramesPerSecond" setting.
1 parent 310eabe commit 0d8d140

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

resources/etc/OpenBoard.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ UsePDFMerger=true
131131

132132
[Podcast]
133133
AudioRecordingDevice=Default
134-
FramesPerSecond=10
134+
FramesPerSecond=100
135135
PublishToYouTube=false
136136
QuickTimeQuality=High
137137
VideoSize=Medium

src/core/UBSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ void UBSettings::init()
425425
exportBackgroundGrid = new UBSetting(this, "PDF", "ExportBackgroundGrid", false);
426426
exportBackgroundColor = new UBSetting(this, "PDF", "ExportBackgroundColor", false);
427427

428-
podcastFramesPerSecond = new UBSetting(this, "Podcast", "FramesPerSecond", 10);
428+
podcastFramesPerSecond = new UBSetting(this, "Podcast", "FramesPerSecond", 100);
429429
podcastVideoSize = new UBSetting(this, "Podcast", "VideoSize", "Medium");
430430
podcastAudioRecordingDevice = new UBSetting(this, "Podcast", "AudioRecordingDevice", "Default");
431431

src/podcast/UBPodcastController.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,21 +276,25 @@ void UBPodcastController::start()
276276
QSize recommendedSize(1024, 768);
277277

278278
int fullBitRate = UBSettings::settings()->podcastWindowsMediaBitsPerSecond->get().toInt();
279+
int maxFramesPerSecond = UBSettings::settings()->podcastFramesPerSecond->get().toInt();
279280

280281
if (mSmallVideoSizeAction && mSmallVideoSizeAction->isChecked())
281282
{
282283
recommendedSize = QSize(640, 480);
283284
mVideoBitsPerSecondAtStart = fullBitRate / 4;
285+
mVideoFramesPerSecondAtStart = maxFramesPerSecond / 4;
284286
}
285287
else if (mMediumVideoSizeAction && mMediumVideoSizeAction->isChecked())
286288
{
287289
recommendedSize = QSize(1024, 768);
288290
mVideoBitsPerSecondAtStart = fullBitRate / 2;
291+
mVideoFramesPerSecondAtStart = maxFramesPerSecond / 2;
289292
}
290293
else if (mFullVideoSizeAction && mFullVideoSizeAction->isChecked())
291294
{
292295
recommendedSize = UBApplication::boardController->controlView()->size();
293296
mVideoBitsPerSecondAtStart = fullBitRate;
297+
mVideoFramesPerSecondAtStart = maxFramesPerSecond;
294298
}
295299

296300
QSize scaledboardSize = UBApplication::boardController->controlView()->size();

0 commit comments

Comments
 (0)