bigbluebutton / bbb-presentation-video Goto Github PK
View Code? Open in Web Editor NEWScript to render a video of the presentation area from a BBB recording events.xml
License: GNU General Public License v3.0
Script to render a video of the presentation area from a BBB recording events.xml
License: GNU General Public License v3.0
Following bigbluebutton/bigbluebutton#17086
In order to improve readability of the whiteboard, let's reduce the max size of the [canvas] page to
maxImageWidth = 1440; maxImageHeight=1080
The merges need to be synchronized so that they all target the same BBB release.
Tldraw arrow shapes from the live meeting are not replayed in the video yet
An error calculating the perimeter of an ellipse is causing recording processing to fail.
A shape that is triggering this problem:
Tldraw: added shape: XXXX, presentation: XXXX, slide: 0, EllipseShape(style=Style(color=<ColorStyle.BLACK: 'black'>, size=<SizeStyle.SMALL: 'small'>, dash=<DashStyle.DRAW: 'draw'>, isFilled=False, scale=1, font=<FontStyle.SCRIPT: 'script'>, textAlign=<AlignStyle.START: 'start'>), childIndex=1, point=Position(x=257.09, y=742.34), rotation=0, label=None, labelPoint=Position(x=0.5, y=0.5), radius=(18.973415910471772, 2.08882555115963), size=Size(width=37.946831820943544, height=4.17765110231926))
And the resulting crash:
Traceback (most recent call last):
File "/usr/bin/bbb-presentation-video", line 11, in <module>
load_entry_point('bbb-presentation-video==4.0.2', 'console_scripts', 'bbb-presentation-video')()
File "/usr/share/bbb-presentation-video/bbb_presentation_video/__init__.py", line 164, in main
renderer.render()
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/__init__.py", line 299, in render
tldraw_changed = tldraw.finalize_frame(presentation.transform)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/__init__.py", line 236, in finalize_frame
finalize_ellipse(ctx, id, shape)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/ellipse.py", line 163, in finalize_ellipse
draw_ellipse(ctx, id, shape)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/ellipse.py", line 81, in draw_ellipse
stroke_points, perimeter = draw_stroke_points(id, radius, style)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/ellipse.py", line 42, in draw_stroke_points
perimeter = perimeter_of_ellipse(rx, ry)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/utils.py", line 185, in perimeter_of_ellipse
return pi * (rx + ry) * (1 + (3 * h) / (10 + sqrt(4 - 3 * h)))
ValueError: math domain error
The cause appears to be that the randomness applied in
h
inbbb-presentation-video/bbb_presentation_video/renderer/tldraw/utils.py
Lines 184 to 185 in f9f3ae6
sqrt
function to be negative.
It looks like this is possible when one of the ellipse radiuses is smaller than the stroke width.
Given that this code is based directly on tldraw upstream code, the problem might also exist there. (Due to the different random number generation method used, it won't happen on the same shape.)
Hi everyone
once again thank you for developing this amazing software
I was wondering if there was an option to dedicate a part of the output video to the chat (like the options for deskshare and webcam and presentation, we could have a complete all in one solution for sharing the recorded session with out the need to have a host for playback (right now if we want to have chat included we have to use the play back page, which is restricting if we wanted to use some sort of external space)
thanks for your time
They are treated like an arrow shape but without the decoration
After video file downloaded and playback locally it does not display any meeting related information like room name and meeting date.
2.6.1 video recording failed (cairo.Error: invalid value (typically too big))
I, [2023-04-07T10:59:15.010155 #3536697] INFO -- : Presentation: pan: [0.000,0.000] zoom: 0.010x0.010
I, [2023-04-07T10:59:15.010176 #3536697] INFO -- : Presentation: padding: 0.000x90.003
I, [2023-04-07T10:59:15.010194 #3536697] INFO -- : Presentation: slide size: 19.899x11.193, scale: 48.244236, position: [-0.000,-0.000]]
I, [2023-04-07T10:59:15.010214 #3536697] INFO -- : Presentation: slide scaled size: 960.000x539.994
I, [2023-04-07T10:59:15.010232 #3536697] INFO -- : Presentation: shapes size: 2048.000x1152.000, scale: 0.937500
I, [2023-04-07T10:59:15.287457 #3536697] INFO -- : Traceback (most recent call last):
I, [2023-04-07T10:59:15.287535 #3536697] INFO -- : File "/usr/bin/bbb-presentation-video", line 11, in <module>
I, [2023-04-07T10:59:15.287554 #3536697] INFO -- : load_entry_point('bbb-presentation-video==4.0.1', 'console_scripts', 'bbb-presentation-video')()
I, [2023-04-07T10:59:15.287573 #3536697] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/__init__.py", line 164, in main
I, [2023-04-07T10:59:15.287590 #3536697] INFO -- : renderer.render()
I, [2023-04-07T1
[3b0d676c53d544e4437850a1fd74757e053bbca8-1680858052156-events.xml.txt]
0:59:15.287608 #3536697] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/__init__.py", line 297, in render
I, [2023-04-07T10:59:15.287625 #3536697] INFO -- : presentation_changed = presentation.finalize_frame()
I, [2023-04-07T10:59:15.287642 #3536697] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/presentation.py", line 354, in finalize_frame
I, [2023-04-07T10:59:15.287659 #3536697] INFO -- : pdfSurface = cairo.ImageSurface(
I, [2023-04-07T10:59:15.287676 #3536697] INFO -- : cairo.Error: invalid value (typically too big) for the size of the input (surface, pattern, etc.)
I, [2023-04-07T10:59:15.436224 #3536697] INFO -- : Success?: false
I, [2023-04-07T10:59:15.436308 #3536697] INFO -- : Process exited? true
I, [2023-04-07T10:59:15.436329 #3536697] INFO -- : Exit status: 1
events.xml attached, can provide complete raw archive if needed.
(https://github.com/bigbluebutton/bbb-presentation-video/files/11183119/3b0d676c53d544e4437850a1fd74757e053bbca8-1680858052156-events.xml.txt)
bigbluebutton/bigbluebutton#16721 changed BigBlueButton's handling of slide images to scale the slide to fit in a fixed rectangle, and use the scaled size for the size of the tldraw whiteboard. The scaling of shapes in this tool has to be adapted to match.
For reference, the values used in the BBB change can be seen here: https://github.com/bigbluebutton/bigbluebutton/pull/16721/files#diff-526fb6e01c328202327197d3a09f894ccab6fab82f364da75c846a4b358b1814
Hit an error when drawing ellipses in some cases which breaks recording processing:
01520.837000 tldraw.add_shape
Tldraw: added shape: XXX, presentation: XXX, slide: 3, EllipseShape(style=Style(color=<ColorStyle.BLACK: 'black'>, size=<SizeStyle.SMALL: 'small'>, dash=<DashStyle.SOLID: 'solid'>, isFilled=False, scale=1, font=<FontStyle.SCRIPT: 'script'>, textAlign=<AlignStyle.START: 'start'>), childIndex=0, point=Position(x=140.06, y=276.97), rotation=0, label=None, labelPoint=Position(x=0.5, y=0.5), radius=(1.2269886363636573, 2.656534090909105), size=Size(width=2.4539772727273146, height=5.31306818181821))
Tldraw: Rendering 1 shapes.
Tldraw: Finalizing Ellipse: XXX
Traceback (most recent call last):
File "/usr/bin/bbb-presentation-video", line 11, in <module>
load_entry_point('bbb-presentation-video==4.0.2', 'console_scripts', 'bbb-presentation-video')()
File "/usr/share/bbb-presentation-video/bbb_presentation_video/__init__.py", line 164, in main
renderer.render()
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/__init__.py", line 299, in render
tldraw_changed = tldraw.finalize_frame(presentation.transform)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/__init__.py", line 236, in finalize_frame
finalize_ellipse(ctx, id, shape)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/ellipse.py", line 165, in finalize_ellipse
dash_ellipse(ctx, shape)
File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/ellipse.py", line 135, in dash_ellipse
ctx.scale(rx, ry)
cairo.Error: invalid matrix (not invertible)
Probably need to switch the code to draw a bezier approximation to an ellipse instead of using cairo's ellipse function, like was done on the older BBB whiteboard.
Some sort of mistake was made in the tldraw work that prevents the classic BigBlueButton whiteboard from being rendered - a blank white area is shown instead. Need to investigate this issue and fix it; the code to support the classic whiteboard is still present and used to work.
Only the first arrow shape of the page is draw correctly with an Label, the other ones are "invisible" and just the label is shown
Hi all.
Recently I installed bbb-playback-video and cannot obtain an only mp4 file. The video link opens a page with a player which plays back video from webcams and screenshare but not the whiteboard or pdf presentation uploaded nor public chat entries.
The public chat entries are only able to view them with the visor webpage.
Is there any way to obtain just a mp4 file with webcams, audio, whiteboard with annotations or presentation uploaded, and public chat entries?
As reference, something like Daniel Petri's project did on BBB 2.3 to 2.5 versions.
(https://github.com/danielpetri1/bbb-recording-exporter)
Thanks in advance.
JP
fails in processing stage.
I, [2023-03-24T20:32:05.715077 #6515] INFO -- : 00045.015000 tldraw.add_shape
I, [2023-03-24T20:32:05.870626 #6515] INFO -- : Traceback (most recent call last):
I, [2023-03-24T20:32:05.870694 #6515] INFO -- : File "/usr/bin/bbb-presentation-video", line 11, in <module>
I, [2023-03-24T20:32:05.870704 #6515] INFO -- : load_entry_point('bbb-presentation-video==4.0.0rc2', 'console_scripts', 'bbb-presentation-video')()
I, [2023-03-24T20:32:05.870714 #6515] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/__init__.py", line 165, in main
I, [2023-03-24T20:32:05.870722 #6515] INFO -- : renderer.render()
I, [2023-03-24T20:32:05.870731 #6515] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/__init__.py", line 257, in render
I, [2023-03-24T20:32:05.870740 #6515] INFO -- : tldraw.update(event)
I, [2023-03-24T20:32:05.870748 #6515] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/__init__.py", line 190, in update
I, [2023-03-24T20:32:05.870758 #6515] INFO -- : self.add_shape_event(cast(tldraw.AddShapeEvent, event))
I, [2023-03-24T20:32:05.870766 #6515] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/__init__.py", line 145, in add_shape_event
I, [2023-03-24T20:32:05.870774 #6515] INFO -- : shape.update_from_data(data)
I, [2023-03-24T20:32:05.870781 #6515] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/__init__.py", line 231, in update_from_data
I, [2023-03-24T20:32:05.870789 #6515] INFO -- : self.handles.update_from_data(data["handles"])
I, [2023-03-24T20:32:05.870796 #6515] INFO -- : File "/usr/share/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/__init__.py", line 198, in update_from_data
I, [2023-03-24T20:32:05.870805 #6515] INFO -- : self.start = Position(data["start"]["point"])
I, [2023-03-24T20:32:05.870812 #6515] INFO -- : KeyError: 'point'
I, [2023-03-24T20:32:06.023303 #6515] INFO -- : Success?: false
I, [2023-03-24T20:32:06.023370 #6515] INFO -- : Process exited? true
Texts/labels are not respecting the Alignment property anymore, they are always aligned on the left
From what I saw this was introduced with the show_layout_by_lines:
https://github.com/bigbluebutton/bbb-presentation-video/blob/main/bbb_presentation_video/renderer/tldraw/shape/text.py#L95
File "/home/bigbluebutton/dev/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/rectangle.py", line 190, in finalize_rectangle
finalize_label(ctx, shape)
File "/home/bigbluebutton/dev/bbb-presentation-video/bbb_presentation_video/renderer/tldraw/shape/text.py", line 205, in finalize_label
return (label_size, scale_adj)
UnboundLocalError: local variable 'scale_adj' referenced before assignment
Label error: Missing scale_adj variable definition when scale is none (other than arrow shape labels I think)
https://github.com/bigbluebutton/bbb-presentation-video/blob/main/bbb_presentation_video/renderer/tldraw/shape/text.py#L182
Tldraw sticky notes from the live meeting are not replayed in the video yet
When running bbb-presentation-video over a 2.5 recording, triangle shapes aren't parsed correctly. The log contains:
Failed to parse event AddShapeEvent: Unknown shape 'triangle'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.