From 05a20fc63a3e16f258c095d9885f77aa1b1f1bd2 Mon Sep 17 00:00:00 2001 From: Nuno Freire Date: Thu, 15 May 2025 13:42:30 +0100 Subject: [PATCH 1/4] v3 + v4 versions --- .../0074-multiple-language-captions/index.md | 64 +++++--------- .../0074-multiple-language-captions/recipe.md | 53 ++++++++++++ .../Per_voi_signore_Modelli_francesi_en.vtt | 73 ++++++++++++++++ .../Per_voi_signore_Modelli_francesi_it.vtt | 67 +++++++++++++++ .../v4/manifest.json | 84 +++++++++++++++++++ .../v4/recipe.md | 49 +++++++++++ 6 files changed, 348 insertions(+), 42 deletions(-) create mode 100644 recipe/0074-multiple-language-captions/recipe.md create mode 100644 recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_en.vtt create mode 100644 recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_it.vtt create mode 100644 recipe/0074-multiple-language-captions/v4/manifest.json create mode 100644 recipe/0074-multiple-language-captions/v4/recipe.md diff --git a/recipe/0074-multiple-language-captions/index.md b/recipe/0074-multiple-language-captions/index.md index c5668299a..1044c1747 100644 --- a/recipe/0074-multiple-language-captions/index.md +++ b/recipe/0074-multiple-language-captions/index.md @@ -4,50 +4,30 @@ id: 74 layout: recipe tags: [video, caption, subtitle, presentation] summary: "Representing the relationship between a video file and its caption or subtitle files for multiple languages." -topic: AV viewers: -- Ramp -- Theseus + - Ramp + - Theseus +v4-viewers: + - Mirador +topic: + - AV +code: + - iiif-prezi3 +top_tabs: + - label: Version 3 + content: "{% capture my_include %}{%- include_relative recipe.md version='3' -%}{% endcapture %}{{ my_include | markdownify }}" + - label: Version 4 + content: "{% capture my_include %}{%- include_relative v4/recipe.md version='4' -%}{% endcapture %}{{ my_include | markdownify }}" --- +{{ theme.block-center-start }} -## Use Case +{% include blocks/tabs.html tabs=page.top_tabs %} -Captions and subtitles may be available in multiple languages for video content and the IIIF Manifest representing the video can give access to representations of all the available languages. Because users will likely want to see captions/subtitles in their preferred language, the available languages should be presented as options from which one should be chosen. - -## Implementation notes - -This recipe builds on the pattern for [Using Caption and Subtitle Files with Video Content][0219], extending it to represent the availability of captions and subtitles in multiple languages. - -Similarly to offering a single caption/subtitle file, the multiple subtitle/caption files are provided as a `supplementing` Annotation on the Canvas that contains the video file. In the case of multiple captions/subtitles, however, the Annotation provides all the available languages as choices. IIIF viewers are then able to offer to end-users the choice for displaying subtitles/captions in one of the available languages during the video playback. - -In addition to this implementation, one might consider to provide the captions/subtitles also as multiple timed annotations. Although redundant, providing both implementations will enable more IIIF viewers to display the captions/subtitles, since they may use whichever implementation they support. See [Using Annotations for Timed Text][0079]. - -## Restrictions - -Formats other than WebVTT (Web Video Text Tracks) are supported by the [Presentation API 3.0](https://iiif.io/api/presentation/3.0/), but current IIIF viewers do not support the display of captions/subtitles. Nevertheless, WebVTT is the format most likely to be implemented. - -When using segmented WebVTT with HLS (HTTP Live Streaming), see [Serving HLS Files][0257]. - -## Example - -In this example we represent a video with subtitles in two languages: English and Italian. -For expressing the availability of the subtitles in the two languages, we use an Annotation with a Choice body that contains two items, one for each language. The language of each subtitle file is expressed with a `language` property containing a [BCP 47](https://tools.ietf.org/html/bcp47) language code as specified by the [Presentation API 3.0](https://iiif.io/api/presentation/3.0/#language-of-property-values). - -In this example we use subtitle files in the WebVTT format. Other format options include SRT (SubRip Text) or TTML (Timed Text Markup Language), but these are less likely to be supported in IIIF viewers. - -{% include manifest_links.html viewers="Ramp, Theseus" manifest="manifest.json" %} - -{% include jsonviewer.html src="manifest.json" config='data-line="60-92"'%} - -# Related recipes - -- [Simplest Manifest - Video][0003] -- [Using Caption and Subtitle Files with Video Content][0219] -- [Transcripts, Captions, and Subtitles - General Considerations][0231] -- [Using Annotations for Timed Text][0079] -- [Providing Access to Transcript Files of A/V Content][0017] - - -{% include acronyms.md %} -{% include links.md %} +{{ theme.block-end }} + \ No newline at end of file diff --git a/recipe/0074-multiple-language-captions/recipe.md b/recipe/0074-multiple-language-captions/recipe.md new file mode 100644 index 000000000..c5668299a --- /dev/null +++ b/recipe/0074-multiple-language-captions/recipe.md @@ -0,0 +1,53 @@ +--- +title: Using Caption and Subtitle Files in Multiple Languages with Video Content +id: 74 +layout: recipe +tags: [video, caption, subtitle, presentation] +summary: "Representing the relationship between a video file and its caption or subtitle files for multiple languages." +topic: AV +viewers: +- Ramp +- Theseus +--- + + +## Use Case + +Captions and subtitles may be available in multiple languages for video content and the IIIF Manifest representing the video can give access to representations of all the available languages. Because users will likely want to see captions/subtitles in their preferred language, the available languages should be presented as options from which one should be chosen. + +## Implementation notes + +This recipe builds on the pattern for [Using Caption and Subtitle Files with Video Content][0219], extending it to represent the availability of captions and subtitles in multiple languages. + +Similarly to offering a single caption/subtitle file, the multiple subtitle/caption files are provided as a `supplementing` Annotation on the Canvas that contains the video file. In the case of multiple captions/subtitles, however, the Annotation provides all the available languages as choices. IIIF viewers are then able to offer to end-users the choice for displaying subtitles/captions in one of the available languages during the video playback. + +In addition to this implementation, one might consider to provide the captions/subtitles also as multiple timed annotations. Although redundant, providing both implementations will enable more IIIF viewers to display the captions/subtitles, since they may use whichever implementation they support. See [Using Annotations for Timed Text][0079]. + +## Restrictions + +Formats other than WebVTT (Web Video Text Tracks) are supported by the [Presentation API 3.0](https://iiif.io/api/presentation/3.0/), but current IIIF viewers do not support the display of captions/subtitles. Nevertheless, WebVTT is the format most likely to be implemented. + +When using segmented WebVTT with HLS (HTTP Live Streaming), see [Serving HLS Files][0257]. + +## Example + +In this example we represent a video with subtitles in two languages: English and Italian. +For expressing the availability of the subtitles in the two languages, we use an Annotation with a Choice body that contains two items, one for each language. The language of each subtitle file is expressed with a `language` property containing a [BCP 47](https://tools.ietf.org/html/bcp47) language code as specified by the [Presentation API 3.0](https://iiif.io/api/presentation/3.0/#language-of-property-values). + +In this example we use subtitle files in the WebVTT format. Other format options include SRT (SubRip Text) or TTML (Timed Text Markup Language), but these are less likely to be supported in IIIF viewers. + +{% include manifest_links.html viewers="Ramp, Theseus" manifest="manifest.json" %} + +{% include jsonviewer.html src="manifest.json" config='data-line="60-92"'%} + +# Related recipes + +- [Simplest Manifest - Video][0003] +- [Using Caption and Subtitle Files with Video Content][0219] +- [Transcripts, Captions, and Subtitles - General Considerations][0231] +- [Using Annotations for Timed Text][0079] +- [Providing Access to Transcript Files of A/V Content][0017] + + +{% include acronyms.md %} +{% include links.md %} diff --git a/recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_en.vtt b/recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_en.vtt new file mode 100644 index 000000000..8576f1347 --- /dev/null +++ b/recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_en.vtt @@ -0,0 +1,73 @@ +WEBVTT + +00:00:08.987 --> 00:00:10.749 +At the fashionable game Canasta. + +00:00:10.793 --> 00:00:14.172 +Jacques Fath names this model in blue +velvet "flight of a dove" + +00:00:14.207 --> 00:00:15.363 +with green reflections. + +00:00:15.396 --> 00:00:17.792 +A braid of the same fabric holds the robe. + +00:00:18.309 --> 00:00:20.091 +Necklace under the diamond collar. + +00:00:22.408 --> 00:00:24.815 +Light shades scale in this autumn collection. + +00:00:24.847 --> 00:00:26.219 +White sequence. + +00:00:26.389 --> 00:00:27.662 +Satin dress and cloak. + +00:00:28.271 --> 00:00:30.470 +At the ball, it is the most imaginative as a line + +00:00:30.491 --> 00:00:33.069 +as it narrows to an hourglass on the knee. + +00:00:33.619 --> 00:00:34.536 +After the ball. + +00:00:34.566 --> 00:00:38.052 +Satin of a tender light blue, +Burgundy red velvet cloak. + +00:00:40.029 --> 00:00:42.418 +Salome, again satin and again white + +00:00:42.444 --> 00:00:46.039 +the fabric and the colour inspire the +Parisian tailor's imagination this time. + +00:00:46.248 --> 00:00:47.360 +Giselle, + +00:00:47.467 --> 00:00:49.978 +novel heroine for young girls, +white tulle. + +00:00:50.172 --> 00:00:53.136 +The torso and the head emerge +as from a rippled cloud. + +00:00:54.620 --> 00:00:57.146 +The 7/8 cloak insists on these models. + +00:00:57.183 --> 00:00:59.353 +Evening dresses stretched to the ground. + +00:00:59.591 --> 00:01:02.668 +But the newer line is what Fath calls "column." + +00:01:02.853 --> 00:01:04.858 +We see it in tight-fitting clothes + +00:01:04.892 --> 00:01:08.058 +with at the end a brief +commemoration of the trail. diff --git a/recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_it.vtt b/recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_it.vtt new file mode 100644 index 000000000..234aeb8ec --- /dev/null +++ b/recipe/0074-multiple-language-captions/v4/Per_voi_signore_Modelli_francesi_it.vtt @@ -0,0 +1,67 @@ +WEBVTT + +00:00:08.987 --> 00:00:10.749 +Al gioco di moda la canasta. + +00:00:10.793 --> 00:00:14.172 +Jacques Fath intitola questo modello in velluto blu volo di colomba + +00:00:14.207 --> 00:00:15.363 +con riflessi verdi. + +00:00:15.396 --> 00:00:17.792 +Una treccia dello stesso tessuto regge la veste. + +00:00:18.309 --> 00:00:20.091 +Collana sotto il collare di diamanti. + +00:00:22.408 --> 00:00:24.815 +Scala di toni chiari in questa collezione d'autunno. + +00:00:24.847 --> 00:00:26.219 +Sequenza in bianco. + +00:00:26.389 --> 00:00:27.662 +Veste e mantello di satin. + +00:00:28.271 --> 00:00:30.470 +Al ballo è il più fantasioso come linea + +00:00:30.491 --> 00:00:33.069 +col suo restringersi a clessidra sul ginocchio. + +00:00:33.619 --> 00:00:34.536 +Dopo il ballo. + +00:00:34.566 --> 00:00:38.052 +Satin di un tenero celeste, mantello di velluto rosso Borgogna. + +00:00:40.029 --> 00:00:42.418 +Salomè, ancora satin e ancora bianco + +00:00:42.444 --> 00:00:46.039 +sono il tessuto e il colore che ispirano stavolta la fantasia del sarto parigino. + +00:00:46.248 --> 00:00:47.360 +Giselle, + +00:00:47.467 --> 00:00:49.978 +eroina di romanzi per giovanette, tulle bianco. + +00:00:50.172 --> 00:00:53.136 +Il busto e la testa emergono come da una nuvola increspata. + +00:00:54.620 --> 00:00:57.146 +Insiste in questi modelli il mantello 7/8. + +00:00:57.183 --> 00:00:59.353 +Gli abiti da sera si sono allungati fino a terra. + +00:00:59.591 --> 00:01:02.668 +Ma linea più nuova è quella che Fath chiama "a colonna". + +00:01:02.853 --> 00:01:04.858 +La vediamo nei vestiti fascianti + +00:01:04.892 --> 00:01:08.058 +con in fondo una breve commemorazione dello strascico. diff --git a/recipe/0074-multiple-language-captions/v4/manifest.json b/recipe/0074-multiple-language-captions/v4/manifest.json new file mode 100644 index 000000000..04be849a7 --- /dev/null +++ b/recipe/0074-multiple-language-captions/v4/manifest.json @@ -0,0 +1,84 @@ +{ + "@context": "http://iiif.io/api/presentation/4/context.json", + "id": "{{ id.url }}", + "type": "Manifest", + "label": { + "it": ["Per voi signore. Modelli francesi"], + "en": ["For ladies. French models"] + }, + "rights": "http://rightsstatements.org/vocab/InC/1.0/", + "requiredStatement": { + "label": { + "en": ["Rights"] + }, + "value": { + "en": ["All rights reserved Cinecittà Luce spa"] + } + }, + "items": [{ + "id": "{{ id.path }}/canvas", + "type": "Canvas", + "height": 384, + "width": 288, + "duration": 65.0, + "items": [{ + "id": "{{ id.path }}/canvas/page", + "type": "AnnotationPage", + "items": [{ + "id": "{{ id.path }}/canvas/page/annotation", + "type": "Annotation", + "motivation": "painting", + "body": { + "id": "https://fixtures.iiif.io/video/europeana/Per_voi_signore_Modelli_francesi.mp4", + "type": "Video", + "height": 384, + "width": 288, + "duration": 65.0, + "format": "video/mp4" + }, + "target": "{{ id.path }}/canvas" + } + ] + } + ], + "annotations": [{ + "id": "{{ id.url }}/anno/page/1", + "type": "AnnotationPage", + "items": [{ + "id": "{{ id.url }}/subtitles_captions-files-vtt-en", + "type": "Annotation", + "motivation": "supplementing", + "provides": [ "subtitles" ], + "body": { + "id": "{{ id.path }}/Per_voi_signore_Modelli_francesi_en.vtt", + "type": "Text", + "format": "text/vtt", + "label": { + "en": ["English subtitles in WebVTT format"] + }, + "language": "en" + }, + "target": "{{ id.path }}/canvas" + }, + { + "id": "{{ id.url }}/subtitles_captions-files-vtt-it", + "type": "Annotation", + "motivation": "supplementing", + "provides": [ "closedCaptions" ], + "body": { + "id": "{{ id.path }}/Per_voi_signore_Modelli_francesi_it.vtt", + "type": "Text", + "format": "text/vtt", + "label": { + "en": ["Italian captions in WebVTT format"] + }, + "language": "it" + }, + "target": "{{ id.path }}/canvas" + } + ] + } + ] + } + ] +} diff --git a/recipe/0074-multiple-language-captions/v4/recipe.md b/recipe/0074-multiple-language-captions/v4/recipe.md new file mode 100644 index 000000000..857138d95 --- /dev/null +++ b/recipe/0074-multiple-language-captions/v4/recipe.md @@ -0,0 +1,49 @@ +--- +title: Using Caption and Subtitle Files in Multiple Languages with Video Content +id: 74 +layout: recipe +tags: [video, caption, subtitle, presentation] +summary: "Representing the relationship between a video file and its caption or subtitle files for multiple languages." +topic: AV +viewers: +- Ramp +- Theseus +--- + + +## Use Case + +Captions and subtitles may be available in multiple languages for video content and the IIIF Manifest representing the video can give access to representations of all the available languages. Because users will likely want to see captions/subtitles in their preferred language, the available languages should be presented as options from which one should be chosen. + +## Implementation notes + +This recipe builds on the pattern for [Using Caption Files with Video Content][0219], extending it to represent the availability of captions and subtitles in multiple languages. + +Similarly to offering a single caption file, the multiple subtitle/caption files are provided as `supplementing` Annotations on the Canvas that contains the video file, which also contain the `provides` property with the value `subtitles` or `closedCaptions`. One Annotation is used for each of the available captions/subtitles and languages. IIIF viewers are then able to identify which annotations contain captions/subtitles by checking the value of the `provides` property, and offer to end-users the choice for displaying subtitles/captions in one of the available languages during the video playback. + +## Restrictions + +Formats other than WebVTT (Web Video Text Tracks) are supported by the Presentation API 4.0, but WebVTT is the format most likely to be implemented in current IIIF viewers. + +## Example + +In this example we represent a video with captions in Italian and subtitles in English. +For expressing the availability of captions and subtitles in the two languages, we use two Annotations, one for each language. The language of each caption/subtitle file is expressed with a `language` property containing a [BCP 47](https://tools.ietf.org/html/bcp47) language code as specified by the Presentation API 4.0. + +In this example we use files in the WebVTT format. Other format options include SRT (SubRip Text) or TTML (Timed Text Markup Language), but these are less likely to be supported in IIIF viewers. + +{% include manifest_links.html viewers="Ramp, Theseus" manifest="manifest.json" %} + +{% include jsonviewer.html src="manifest.json" config='data-line="60-95"'%} + +# Related recipes + +- [Simplest Manifest - Video][0003] +- [Using Caption Files with Video Content][0219] +- [Transcripts, Captions, and Subtitles - General Considerations][0231] +- [Using Annotations for Timed Text][0079] +- [Providing Access to Transcript Files of A/V Content][0017] + + +{% include acronyms.md %} +{% include links.md %} From 052d3039d37113891e7b2879576a2a71f10a44fa Mon Sep 17 00:00:00 2001 From: Nuno Freire Date: Tue, 17 Jun 2025 16:49:41 +0100 Subject: [PATCH 2/4] linkfix --- recipe/0074-multiple-language-captions/v4/recipe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/0074-multiple-language-captions/v4/recipe.md b/recipe/0074-multiple-language-captions/v4/recipe.md index 857138d95..114e28827 100644 --- a/recipe/0074-multiple-language-captions/v4/recipe.md +++ b/recipe/0074-multiple-language-captions/v4/recipe.md @@ -32,7 +32,7 @@ For expressing the availability of captions and subtitles in the two languages, In this example we use files in the WebVTT format. Other format options include SRT (SubRip Text) or TTML (Timed Text Markup Language), but these are less likely to be supported in IIIF viewers. -{% include manifest_links.html viewers="Ramp, Theseus" manifest="manifest.json" %} +{% include manifest_links.html viewers="Ramp, Theseus" manifest="v4/manifest.json" %} {% include jsonviewer.html src="manifest.json" config='data-line="60-95"'%} From 84809579bc57387e0dabe6e7c2a3e2d6e7812d40 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Tue, 22 Jul 2025 16:31:50 +0100 Subject: [PATCH 3/4] Updating link to the manifest --- recipe/0074-multiple-language-captions/v4/recipe.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe/0074-multiple-language-captions/v4/recipe.md b/recipe/0074-multiple-language-captions/v4/recipe.md index 114e28827..33abd8b07 100644 --- a/recipe/0074-multiple-language-captions/v4/recipe.md +++ b/recipe/0074-multiple-language-captions/v4/recipe.md @@ -34,7 +34,7 @@ In this example we use files in the WebVTT format. Other format options include {% include manifest_links.html viewers="Ramp, Theseus" manifest="v4/manifest.json" %} -{% include jsonviewer.html src="manifest.json" config='data-line="60-95"'%} +{% include jsonviewer.html src="v4/manifest.json" config='data-line="60-95"'%} # Related recipes From e3218a73d87bd2e2eb3344b47f4758c920163015 Mon Sep 17 00:00:00 2001 From: Glen Robson Date: Tue, 22 Jul 2025 16:35:58 +0100 Subject: [PATCH 4/4] Removing duplicate headers from recipe file --- recipe/0074-multiple-language-captions/recipe.md | 12 ------------ recipe/0074-multiple-language-captions/v4/recipe.md | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/recipe/0074-multiple-language-captions/recipe.md b/recipe/0074-multiple-language-captions/recipe.md index c5668299a..1ae01ca26 100644 --- a/recipe/0074-multiple-language-captions/recipe.md +++ b/recipe/0074-multiple-language-captions/recipe.md @@ -1,15 +1,3 @@ ---- -title: Using Caption and Subtitle Files in Multiple Languages with Video Content -id: 74 -layout: recipe -tags: [video, caption, subtitle, presentation] -summary: "Representing the relationship between a video file and its caption or subtitle files for multiple languages." -topic: AV -viewers: -- Ramp -- Theseus ---- - ## Use Case diff --git a/recipe/0074-multiple-language-captions/v4/recipe.md b/recipe/0074-multiple-language-captions/v4/recipe.md index 33abd8b07..22808ddbd 100644 --- a/recipe/0074-multiple-language-captions/v4/recipe.md +++ b/recipe/0074-multiple-language-captions/v4/recipe.md @@ -1,16 +1,3 @@ ---- -title: Using Caption and Subtitle Files in Multiple Languages with Video Content -id: 74 -layout: recipe -tags: [video, caption, subtitle, presentation] -summary: "Representing the relationship between a video file and its caption or subtitle files for multiple languages." -topic: AV -viewers: -- Ramp -- Theseus ---- - - ## Use Case Captions and subtitles may be available in multiple languages for video content and the IIIF Manifest representing the video can give access to representations of all the available languages. Because users will likely want to see captions/subtitles in their preferred language, the available languages should be presented as options from which one should be chosen.