From 62b05fc0488a6461200ee460b344d03cca16bf36 Mon Sep 17 00:00:00 2001 From: Dananji Date: Fri, 30 Apr 2021 16:04:15 -0400 Subject: [PATCH 1/4] Creating draft of recipe for dicsussion --- _includes/links.md | 1 + index.md | 1 + recipe/0079-webvtt-to-annotations/index.md | 14 ++--- .../0079-webvtt-to-annotations/manifest.json | 61 +++++++++++++++++++ 4 files changed, 68 insertions(+), 9 deletions(-) create mode 100644 recipe/0079-webvtt-to-annotations/manifest.json diff --git a/_includes/links.md b/_includes/links.md index 0a6f0cad1..be43207d3 100644 --- a/_includes/links.md +++ b/_includes/links.md @@ -29,6 +29,7 @@ [0024]: {{site.baseurl}}/recipe/0024-book-4-toc/ "Book with Table of contents (ranges)" [0068]: {{site.baseurl}}/recipe/0068-newspaper/ "A newspaper" +[0079]: {{site.baseurl}}/recipe/0079-webvtt-to-annotations/ "Using Annotations for Transcripts" [0117]: {{site.baseurl}}/recipe/0117-add-image-thumbnail/ "Manifest Thumbnail" [0118]: {{site.baseurl}}/recipe/0118_multivalue/ "Displaying Multiple Values with Language Maps" [0219]: {{site.baseurl}}/recipe/0219-using-caption-file/ "Using Captions and Subtitles with Video Content" diff --git a/index.md b/index.md index 31dc3c9be..55667a475 100644 --- a/index.md +++ b/index.md @@ -49,6 +49,7 @@ _The corresponding 2.1 test fixture(s) is given like this, where appropriate: .. * Transcription of image-based content - various examples gathered (43,44,45,46,47,48) * Transcription of audio and video +* [Using Annotations for Transcripts][0079] * [Using Caption and Subtitles with Video Content][0219] * Transcription of content into XML, with XPaths to select a segment * [Providing Alternative Representations][0046] diff --git a/recipe/0079-webvtt-to-annotations/index.md b/recipe/0079-webvtt-to-annotations/index.md index f2cbf0e8a..6c79f3066 100644 --- a/recipe/0079-webvtt-to-annotations/index.md +++ b/recipe/0079-webvtt-to-annotations/index.md @@ -1,12 +1,11 @@ --- -title: Transformation - WebVTT or OHMS XML to Annotations +title: Using Annotations for Transcripts id: 79 layout: recipe tags: [tbc] -summary: "tbc" +summary: 'tbc' --- - ## Use Case Why is this pattern is important? @@ -21,17 +20,14 @@ When is this pattern is usable / not usable? Is it deprecated? If it uses multip ## Example -Describe in prose and provide examples, e.g.: +Describe in prose and provide examples, e.g.: -{: .line-numbers data-src="manifest.json" } -```json -``` +{% include manifest_links.html viewers="Mirador" manifest="manifest.json" %} +{% include jsonviewer.html src="manifest.json" %} # Related recipes Provide a bulleted list of related recipes and why they are relevant. - {% include acronyms.md %} {% include links.md %} - diff --git a/recipe/0079-webvtt-to-annotations/manifest.json b/recipe/0079-webvtt-to-annotations/manifest.json new file mode 100644 index 000000000..a7eb6d2b6 --- /dev/null +++ b/recipe/0079-webvtt-to-annotations/manifest.json @@ -0,0 +1,61 @@ +{ + "@context": "http://iiif.io/api/presentation/3/context.json", + "id": "{{ id.url }}", + "type": "Manifest", + "label": { "en": ["Lunchroom Manners"] }, + "items": [ + { + "id": "{{ id.path }}/canvas/1", + "type": "Canvas", + "height": 360, + "width": 480, + "duration": 572.034, + "items": [ + { + "id": "{{ id.path }}/canvas/1/page", + "type": "AnnotationPage", + "items": [ + { + "id": "{{ id.path }}/canvas/1/page/annotation", + "type": "Annotation", + "motivation": "painting", + "body": [ + { + "id": "https://fixtures.iiif.io/video/indiana/lunchroom_manners/high/lunchroom_manners_1024kb.mp4", + "type": "Video", + "height": 360, + "width": 480, + "duration": 572.034, + "format": "video/mp4" + } + ], + "target": "{{ id.path }}/canvas/1" + } + ] + } + ], + "annotations": [ + { + "id": "{{ id.path }}/canvas/1/page/annotation", + "type": "AnnotationPage", + "label": { + "en": ["English"] + }, + "items": [ + { + "id": "{{ id.path }}/canvas/1/page/annotation/1", + "type": "Annotation", + "motivation": ["supplementing"], + "body": { + "type": "TextualBody", + "value": "Just before lunch one day, a puppet show was put on at school.", + "format": "text/plain" + }, + "target": "{{ id.path }}/canvas/1#t=22.2,26.6" + } + ] + } + ] + } + ] +} From 0fc6ca158c2f4e997697ec019eff74f63e37f330 Mon Sep 17 00:00:00 2001 From: Dananji Date: Fri, 30 Apr 2021 16:15:03 -0400 Subject: [PATCH 2/4] Remove invalid prop label in annotations --- recipe/0079-webvtt-to-annotations/manifest.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/recipe/0079-webvtt-to-annotations/manifest.json b/recipe/0079-webvtt-to-annotations/manifest.json index a7eb6d2b6..1bd1637d1 100644 --- a/recipe/0079-webvtt-to-annotations/manifest.json +++ b/recipe/0079-webvtt-to-annotations/manifest.json @@ -38,9 +38,6 @@ { "id": "{{ id.path }}/canvas/1/page/annotation", "type": "AnnotationPage", - "label": { - "en": ["English"] - }, "items": [ { "id": "{{ id.path }}/canvas/1/page/annotation/1", @@ -49,7 +46,8 @@ "body": { "type": "TextualBody", "value": "Just before lunch one day, a puppet show was put on at school.", - "format": "text/plain" + "format": "text/plain", + "language": [ "en" ] }, "target": "{{ id.path }}/canvas/1#t=22.2,26.6" } From 2f88dd9a13012c5c0ae0a9f31caece3ffb44b654 Mon Sep 17 00:00:00 2001 From: Dananji Date: Fri, 30 Apr 2021 16:19:08 -0400 Subject: [PATCH 3/4] Remove language from annotations --- recipe/0079-webvtt-to-annotations/manifest.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipe/0079-webvtt-to-annotations/manifest.json b/recipe/0079-webvtt-to-annotations/manifest.json index 1bd1637d1..9c38e0fb8 100644 --- a/recipe/0079-webvtt-to-annotations/manifest.json +++ b/recipe/0079-webvtt-to-annotations/manifest.json @@ -46,8 +46,7 @@ "body": { "type": "TextualBody", "value": "Just before lunch one day, a puppet show was put on at school.", - "format": "text/plain", - "language": [ "en" ] + "format": "text/plain" }, "target": "{{ id.path }}/canvas/1#t=22.2,26.6" } From 8fcd4e8a3f0ff93ad51c53dd9d225214f8614d0b Mon Sep 17 00:00:00 2001 From: Dananji Date: Tue, 3 Aug 2021 16:48:24 -0400 Subject: [PATCH 4/4] Add usecase and recipe name change --- recipe/0079-webvtt-to-annotations/index.md | 6 ++---- recipe/0079-webvtt-to-annotations/manifest.json | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/recipe/0079-webvtt-to-annotations/index.md b/recipe/0079-webvtt-to-annotations/index.md index 6c79f3066..20d610339 100644 --- a/recipe/0079-webvtt-to-annotations/index.md +++ b/recipe/0079-webvtt-to-annotations/index.md @@ -1,5 +1,5 @@ --- -title: Using Annotations for Transcripts +title: Using Annotations for Timed Text id: 79 layout: recipe tags: [tbc] @@ -8,12 +8,10 @@ summary: 'tbc' ## Use Case -Why is this pattern is important? +When timed-text (trancscript, caption, OHMS XML files) is available for A/V content, synchronizing the display of the text and the media playback can be accomplished by transforming the timed information into annotations. ## Implementation notes -How does one implement the pattern? - ## Restrictions When is this pattern is usable / not usable? Is it deprecated? If it uses multiple specifications, which versions are needed, etc.? (Not present if not needed.) diff --git a/recipe/0079-webvtt-to-annotations/manifest.json b/recipe/0079-webvtt-to-annotations/manifest.json index 9c38e0fb8..eba120776 100644 --- a/recipe/0079-webvtt-to-annotations/manifest.json +++ b/recipe/0079-webvtt-to-annotations/manifest.json @@ -42,7 +42,7 @@ { "id": "{{ id.path }}/canvas/1/page/annotation/1", "type": "Annotation", - "motivation": ["supplementing"], + "motivation": "supplementing", "body": { "type": "TextualBody", "value": "Just before lunch one day, a puppet show was put on at school.",