-
Notifications
You must be signed in to change notification settings - Fork 1
/
warc-video.html
289 lines (253 loc) · 11 KB
/
warc-video.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>IIPC - WARC Video 2019</title>
<meta name="description" content="IIPC - WARC Video 2019">
<meta name="author" content="Ilya Kreymer">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/white_styled.css" id="theme">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<!-- Code syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- CUSTOM STYLE -->
<link rel="stylesheet" href="css/theme/white_styled.css" id="theme">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
<style>
ul {
text-align: left !important;
display: block !important;
}
.clear-both {
clear: both;
}
.footer-links {
display: inline-block;
margin-left: 20px;
vertical-align: middle;
line-height: 1.5em;
font-family: sans-serif;
font-weight: bold;
}
.reveal pre {
line-height: 0.9em;
box-shadow: none;
}
.redh {
/*text-transform: uppercase;*/
text-align: left;
color: crimson !important;
}
.left {
text-align: left;
font-size: 80% !important;
}
.url {
font-family: courier, monospace !important;
font-size: 90%;
}
.pad-top {
margin-top: 60px !important;
}
.footer-text {
font-size: 28px;
margin-left: 50px;
font-family: sans-serif;
display: inline;
}
pre {
font-size: 16px !important;
}
</style>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h3>WARC Video Metadata Proposal</h3>
<h4>IIPC WARC Workshop, 2019</h4>
<p>Ilya Kreymer, Webrecorder Lead Developer</p>
</section>
<section>
<h3>Video Replay Requirements</h3>
<ul>
<li>Need mapping from the page replayed to one ore more videos</li>
<li>Mapping can be looked up as part of standard CDX lookup</li>
<li>Store as metadata record</li>
</ul>
</section>
<section>
<h3>Video Replay Requirements</h3>
<p>Example mapping:</p>
<pre>
WARC/1.0
WARC-Type: metadata
...
WARC-Target-URI: <b>urn:transclusions:http://example.com/</b>
...
{
"formats": [
{
"mime": "video/webm",
"url": <b>"http://example.com/media/video_file.flv.webm"</b>
},
{
"ext": "mp4",
"url": <b>"http://example.com/media/video_file.flv.mp4"</b>
}
"webpage_timestamp": "20190606",
"webpage_url": "http://www.example.com/watch_video.html"
]
}
</pre>
</section>
<section>
<h3>Lookup videos during replay</h3>
<p class="fragment">AJAX request to <b>/webarchive/20190606/urn:transclusions:http://example.com/watch_video.html</b>
<p class="fragment">Using mapping JSON:</p>
<pre class="fragment">
"formats": [
{
"mime": "video/webm",
"url": <b>"http://example.com/media/video_file.flv.webm"</b>
},
{
"ext": "mp4",
"url": <b>"http://example.com/media/video_file.flv.mp4"</b>
}
"webpage_timestamp": "20190606",
"webpage_url": "http://www.example.com/watch_video.html"
]
</pre>
</p>
<p class="fragment">Generate video tag:</p>
<pre class="fragment">
<video>
<source src="<b>http://example.com/media/video_file.webm</b>" type="video/webm"/>
<source src="<b>http://example.com/media/video_file.flv.mp4</b>" type="video/mp4"/>
</video>
</pre>
</section>
<section>
<h3>Where to place the video on the page?</h3>
<p class="fragment">Default is to attempt to replace object and embed tags</p>
<p class="fragment">Can add CSS selector to metadata, assuming default:</p>
<p class="fragment"><b>"selector": "object, embed"</b></p>
<p class="fragment">How to generate this metadata?</p>
<p class="fragment">What about multiple videos?</p>
</section>
<section>
<h4>If using youtube-dl...</h4>
<ul>
<li class="fragment">... it provides a JSON format automatically when downloading videos in multiple formats.</li>
<li class="fragment">Not really standardized</li>
<li class="fragment">No CSS selectors, support for multiple videos</li>
<li class="fragment">pywb supports lookup of youtube-dl JSON metadata records, using <b>metadata://example.com/watch_page.html</b></li>
<li class="fragment">Not standradized either</li>
<li class="fragment">Need standard/best practice around this format beyond youtube-dl</li>
</ul>
</section>
<section>
<h4>For videos captured in other ways...</h4>
<ul>
<li class="fragment"><a href="https://github.com/webrecorder/warcit">warcit</a> provides a way to generate the JSON metadata</li>
<li class="fragment">warcit also provides a way to convert videos to web formats</li>
<li class="fragment">Generates WARC conversion records</li>
<li class="fragment"><a href="https://github.com/webrecorder/warcit/blob/video-conversion/conversions-and-transclusions.md">More Info</a></li>
</ul>
</section>
<section>
<h4>warcit conversion + transclusion metadata inputs</h4>
<p class="fragment">Need to provide list of containing pages to video mapping:</p>
<pre class="fragment">
transclusions:
http://example.com/watch_video.html:
- url: http://example.com/media/video_file.flv
timestamp: 20190607
selector: object, embed <-- default if ommitted
http://example.com/another_watch_video.html:
- url: http://example.com/media/video_file_2.flv
timestamp: 20190607
selector: div.video-container
...
</pre>
<p class="fragment">And <a href="https://github.com/webrecorder/warcit/blob/video-conversion/warcit/default-conversion-rules.yaml">conversion rules</a></p>
<p class="fragment">Sample conversion record produced:</p>
<pre class="fragment">
WARC/1.0
WARC-Type: conversion
WARC-Source-URI: file:///path/to/video_file.flv
WARC-Refers-To-Target-Date: 2019-02-06T00:29:48Z
WARC-Creation-Date: 2019-03-04T22:44:03Z
WARC-Refers-To-Target-URI: http://example.com/media/video_file.flv
WARC-JSON-Metadata: {"command": "ffmpeg -y -i {input} -c:v vp9 -c:a libopus -speed 4 {output}", "mime": "video/webm", "ext": "webm", "name": "webm"}
WARC-Target-URI: http://example.com/media/video_file.flv.webm
...
</pre>
</section>
<section>
<h4>(WIP) How to handle multiple videos per page?</h4>
<ul>
<li class="fragment">Does youtube-dl support?</li>
<li class="fragment">How to replay in correct location in page? (CSS selectors required)</li>
<li class="fragment">Extending metadata format:</li>
<pre class="fragment">
{
"transclusions":
{"http://example.com/media/video_file.flv": {..., "formats": {...}},
{"http://example.com/media/another_video_file.flv": {..., "formats": {...}},
"webpage_timestamp": "20160102",
"webpage_url": "http://www.example.com/watch_video.html",
"creation_timestamp": "20190301",
}
</pre>
<li class="fragment"><a href="https://github.com/webrecorder/warcit/blob/video-conversion/conversions-and-transclusions.md#proposal-multiple-transcluded-objects-per-page">(More suggestions in doc on github)</a></li>
</ul>
</section>
</div>
</div>
<!-- Footer -->
<div style="position:absolute; bottom:1%; left:2%; width:100%; vertical-align: middle">
<a href="https://webrecorder.io/"><img style="vertical-align: middle; width: auto; height: 90px" src="img/webrecorder-logo-vector.svg"></a>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// Full list of configuration options available at:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
margin: 0.05,
transition: 'slide', // none/fade/slide/convex/concave/zoom
// Optional reveal.js plugins
dependencies: [
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'plugin/zoom-js/zoom.js', async: true },
{ src: 'plugin/notes/notes.js', async: true }
]
});
</script>
</body>
</html>
g