-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add slide segments and extracted text to harvesting and DB, enable pa…
…ella slide previews (#1163) This adds the ocr'd slide texts as well as a list of timestamped frames to the harvesting sync code and stores them in the DB. In order the show the slide previews, `paella-slide-plugins` was added and configured to use the timestamped frames. Needs opencast/opencast#5757 to work. Once that is merged, released and used on our test Opencast, the changes can be tested with fresh uploads. We'll still need some mechanism to apply segmentation and ocr (and speech-to-text as well) to existing videos. (Can be reviewed commit by commit, though note that the migration from the second commit was extended in the third)
- Loading branch information
Showing
22 changed files
with
238 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
backend/src/db/migrations/33-event-slide-text-and-segments.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-- Adds two new fields to `events`: | ||
-- `slide_text` which holds a url pointing to the extracted slide text | ||
-- generated in Opencast, | ||
-- and `segments`, which holds a list of frames with their respective | ||
-- starting time, and is needed for slide previews in paella. | ||
-- Also creates the appropriate type for the segments and adjusts | ||
-- the constraints. Basically an adjusted copy of `14-event-captions`. | ||
|
||
create type event_segment as ( | ||
uri text, | ||
start_time bigint -- in ms | ||
); | ||
|
||
alter table events | ||
add column slide_text text, | ||
add column segments event_segment[] | ||
default '{}' | ||
constraint no_null_segment_items check (array_position(segments, null) is null); | ||
|
||
alter table events | ||
-- The default above was just for all existing records. New records should | ||
-- require this to be set. | ||
alter column segments drop default, | ||
drop constraint ready_event_has_fields, | ||
add constraint ready_event_has_fields check (state <> 'ready' or ( | ||
duration is not null | ||
and tracks is not null and array_length(tracks, 1) > 0 | ||
and captions is not null | ||
and segments is not null | ||
)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.