Some old recordings might have invalid or legacy encoding stuff
in the text files. To allow processing to continue, just re-encode int
UTF-8 with the invalid option set to replace, to remove the invalid
characters.
In BBB 2.0, the cursor positions are given relative to the page
size (like annotation positions). Since the recording cursors
aren't actually drawn in the page like annotations, it's more
convenient to have them relative to the visible area (viewbox),
so do that conversion.
While I'm in here - since we switched to new incompatible scripts
for BBB 2.0 anyways - remove an extra factor in the cursor positions
in cursor.xml, and just use a simple ratio of width/height instead.
This is just a bundle of a few things I've been fixing up in the past
while.
= Workaround for BBB 1.1 beta deskshare timestamp bug
This is unlikely to be used, but I have the code for it, might as
well merge it in.
= Rework video tiling code for ffmpeg
Render video using the 'hstack' and 'vstack' filters rather than the
'overlay' filter. This is somewhat faster, particularly with lots of
videos.
= Etc.
- Remove usage of the streamio-ffmpeg gem.
The video rendering code has some stuff to directly read 'ffprobe'
output, so re-use that instead of this gem (which is kind of old and
has issues with newer ffmpeg versions).
- Don't hardcode the deskshare video area size, pull it from the
properties file
- Remove some code that worked around missing video end events.
In some cases this could cause flickering or strange video issues.
It's no longer strictly needed, the new tiling code doesn't break if
the seekpoint is after the end of the video.
The new shapes code, required for handling smooth shape updates & multi-user
whiteboard in the 2.0 BigBlueButton, hits a bug in old recordings where
the pencil tool incorrectly used "line" in its shape names, meaning that
there could be both a pencil mark and a line with the same shape name.
The old recording code didn't rely on the shape name to match shapes, since
there was no chance of concurrent shapes. As this is an incompatible playback
change, we need to make a new playback directory for the updated files.
The old code was very difficult to follow, and I couldn't figure out
a good way to retrofit the BigBlueButton 2.0 undo by shape id and clear
by user id into it - so I rewrote the entire thing instead.
It now generates the shapes.svg, panzooms.xml and cursor.xml all at the
same time during a single pass through the event.xml file. The result
is compatible with the existing recording javascript (at least once a few
minor issues in writing.js were fixed by earlier commits).
The previous code would cause shapes to "blink" during updating if
the updates weren't continuous - in a gap between updates, the shape
would disappear.
Rework the logic for looking up "current" shapes to return the
nearest previous update rather than only exact matching timestamps,
and simplify the logic that decides whether to make a shape visible
or hidden.
We were getting the duration with a Popcorn temporary instance. This was causing a slowly increase on the cpu usage, which could compromise the performance of long recordings.
- Created function "seySync( )" which sets the sync logic. Basically, we sync all medias when pausing the master video. We pause the master video when any video receives a waiting event, or when the master video is seeked. If necessary, we resume playing after the sync.
- Refactored when 'media-ready' event is fired. We fire this event only when the medias receive a 'canplayall' event.
- Popcorn "onFrame" method runs around 6 times per second. That was unnecessary , causing the CPU work to significantly increase, and preventing the two videos (deskshare and webcam) to run together smoothly
- We only synchronize the medias if one of them fires a "waiting" event. If the user pauses the playback, we synchronize them as well.