Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 22 additions & 42 deletions recipe/0074-multiple-language-captions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
<script>
if (!window.location.hash) {
let el = document.getElementById("version-3-heading");
el.className += " is-active";
}
</script>
41 changes: 41 additions & 0 deletions recipe/0074-multiple-language-captions/recipe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

## 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 %}
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
84 changes: 84 additions & 0 deletions recipe/0074-multiple-language-captions/v4/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
}
]
}
]
}
36 changes: 36 additions & 0 deletions recipe/0074-multiple-language-captions/v4/recipe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## 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="v4/manifest.json" %}

{% include jsonviewer.html src="v4/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 %}
Loading