Python API
The modules of bbbdl can be used in other Python software by adding bbbdl to their dependencies and importing them at the start of the file.
Note
The following sections are autogenerated from bbbdl’s Python code.
bbbdl.composer
- bbbdl.composer.compose_screensharing(meeting: Meeting, width: int, height: int) Tracks
Create a stream composed by:
the webcam video
the deskshare video overlayed on the webcam video
the webcam audio
All video streams will be scaled so they all have the same size.
- Parameters:
meeting – The meeting to create the stream from.
width – The width of the video file.
height – The height of the video file.
- Returns:
A
Tracksobject containing the video and audio tracks.
- bbbdl.composer.compose_lesson(meeting: Meeting, width: int, height: int) Tracks
Create a stream composed by:
the webcam video
the deskshare video overlayed on the webcam video
the slides images overlayed on the deskshare video when they are enabled
the webcam audio
All video streams will be scaled so they all have the same size.
- Parameters:
meeting – The meeting to create the stream from.
width – The width of the video file.
height – The height of the video file.
- Returns:
A
Tracksobject containing the video and audio tracks.
bbbdl.resources
- class bbbdl.resources.Source(location: str)
A handler for the splitting of a single video source in multiple input nodes.
It can be created by specifying an url pointing to a local or remote video.
It is necessary because the same input source cannot be passed twice to ffmpeg.
- classmethod create_from_url(href: str) Source | None
Check if a resource exists at an url, and create a
Sourcefrom it if it does.- Returns:
The created source.
- Raises:
SourceNotFoundError – If the request returned a non-2XX status code.
- get_audio() FilterableStream
Get an input audio stream.
- Returns:
The created audio stream.
- get_video() FilterableStream
Get an input video stream.
- Returns:
The created video stream.
- class bbbdl.resources.Enable(start: float, end: float)
An object containing two timestamps relative to the start of a meeting.
They represent the moments when a slide should be displayed and hidden from the screen.
- class bbbdl.resources.Slide(resource: Source, enables: List[Tuple[float, float]])
An object representing a single slide from BigBlueButton.
It contains the
Sourcewhere the slide can be accessed, and alistofEnable, representing the moments when that slide is displayed on screen.
- class bbbdl.resources.Meeting(deskshare: Source, webcams: Source, shapes: List[Slide])
An object representing all resources from a BigBlueButton meeting.
The
Sourcefor the desktop-sharing stream.
- classmethod from_base_url(base_url: str, meeting_id: str) Meeting
Create a new
Meetingfrom a BigBlueButton base url and a meeting id.- Parameters:
base_url – The base url of the BigBlueButton instance.
meeting_id – The id of the meeting to get the resources from.
- Returns:
The created meeting.
- Raises:
MetadataNotFoundError – If the metadata request returned a non-2XX status code.
bbbdl.tracks
bbbdl.urlhandler
- bbbdl.urlhandler.playback_regex = re.compile('^(https?://.+)/playback/presentation/2\\.0/playback\\.html\\?meetingId=([0-9a-f-]+)$')
The regex used to parse BigBlueButton playback urls.
- bbbdl.urlhandler.playback_to_data(url: str) Sequence[str]
Autodetect the base url and the meeting id from a BigBlueButton playback url.
- Returns:
The match groups of
playback_regex.- Raises:
ValueError – If the regex doesn’t match.
bbbdl.exc
- exception bbbdl.exc.MetadataNotFoundError
The metadata (
{base_url}/presentation/{meeting_id}/metadata.xml) of the specified meeting could not be retrieved.
- exception bbbdl.exc.SourceNotFoundError
The specified url didn’t return a successful HTTP status code (200 <= x < 300).