forked from dkm/python-vimeo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupload-doc.html
490 lines (405 loc) · 22.1 KB
/
upload-doc.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
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- _
__ _|_|_ __ ___ ___ ___
\ \ / / | '_ ' _ \ / _ \/ _ \
\ V /| | | | | | | __/ |_| |
\_/ |_|_| |_| |_|\___|\___/
you know, for videos
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Upload API</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7,chrome=1" />
<meta name="description" content="Vimeo is a respectful community of creative people who are passionate about sharing the videos they make. Use Vimeo if you want the best tools and highest quality video in the universe." />
<meta name="keywords" content="video,video sharing,digital cameras,videoblog,vidblog,video blogging,home video,home movie,lip dub" />
<link rel="stylesheet" type="text/css" media="all" href="/assets/css/get/30878/global,lightbox,twocolumns,prettify,api" />
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="http://bitcast.vimeo.com/vimeo/assets/css/ie.css?30878" />
<![endif]-->
<script type="text/javascript" src="/assets/js/get/30878/mootools.v1.11_jsmin,mootools_ext,prettify"></script>
</head>
<body>
<img src="http://bitcast.vimeo.com/vimeo/assets/images/smoke.png" id="lightbox_wrapper" class="lightbox_wrapper transifyme" style="display:none;" alt="" />
<div id="lightbox"></div>
<div id="everything">
<div id="top">
<a href="/"><img src="http://bitcast.vimeo.com/vimeo/assets/images/logo_vimeo.png" alt="Vimeo" id="vimeo_logo" width="192" height="55" /></a>
<div id="newmenudo">
<div id="capright" class="menudo_image"></div>
<ul id="nav" class="grandpappy">
<li class="firstborn search" id="menudo_search_subtier">
<div class="rounded_input">
<div class="contain menudo_image">
<form action="/videos/" method="get" onsubmit="menudo_search(); return false;">
<input name="search" id="menudo_search_field" type="text" onblur="menudo_search_blur()" onclick="menudo_search_click()" value="Search Videos" class="field" autocomplete="off"/>
<input type="submit" value="" onclick="menudo_search(); return false;" class="button" />
</form>
</div>
</div>
<ul class="dotted favoritechild menudo_subtier">
<li id="menudo_search_videos" class="first selected first">
<a href="javascript:void(0)" onclick="menudo_search_change('Videos')">Search Videos</a>
<div class="left_shoulder menudo_image"></div>
<div class="right_shoulder menudo_image"></div>
</li>
<li id="menudo_search_people" class=""><a href="javascript:void(0)" onclick="menudo_search_change('People')">Search People</a></li>
<li id="menudo_search_groups" class=""><a href="javascript:void(0)" onclick="menudo_search_change('Groups')">Search Groups</a></li>
<li id="menudo_search_channels" class=""><a href="javascript:void(0)" onclick="menudo_search_change('Channels')">Search Channels</a></li>
<li id="menudo_search_forums" class="last"><a href="javascript:void(0)" onclick="menudo_search_change('Forums')">Search Forums</a></li>
<li style="margin-top: 0px; background: transparent;">
<div class="cheek_left menudo_image transifyme"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image transifyme"></div>
</li>
</ul>
</li>
<li class="firstborn help">
<a class="label" href="/help">Help</a>
<ul class="dotted favoritechild">
<li class="first">
<div class="left_shoulder menudo_image"></div>
<div class="right_shoulder menudo_image"></div>
<a href="/help">Help Center</a>
</li>
<li><a href="/help/basics">Vimeo Basics</a></li>
<li><a href="/guidelines">Community Guidelines</a></li>
<li><a href="/forums">Community Forums</a></li>
<li class="last"><a href="/api">Developers</a></li>
<li style="margin-top: 0px; background: transparent;">
<div class="cheek_left menudo_image"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image"></div>
</li>
</ul>
</li>
<li class="firstborn explore" id="menudo_explore">
<a href="/explore" class="label">Explore</a>
<ul class="favoritechild dotted">
<li class="first">
<a href="/categories">Categories</a>
<div class="left_shoulder menudo_image"></div>
<div class="right_shoulder menudo_image"></div>
</li>
<li>
<a href="/groups">Groups</a>
</li>
<li>
<a href="/channels">Channels</a>
</li>
<li><a href="/hd">HD Videos</a></li>
<li><a href="/staffpicks">Staff Picks</a></li>
<li><a href="/forum:vimeo_projects">Projects</a></li>
<li class="last"><a href="/toys">Toys</a></li>
<li style="margin-top: 0px; background: transparent;">
<div class="cheek_left menudo_image"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image"></div>
</li>
</ul>
</li>
<li class="firstborn tools" id="menudo_tools">
<a href="javascript:void(0)" class="label">Tools</a>
<ul class="favoritechild dotted seafood">
<li class="first">
For me:
<div class="left_shoulder menudo_image"></div>
<div class="right_shoulder menudo_image"></div>
</li>
<li class="first"><a href="/subscriptions/contacts">Subscription Manager</a></li>
<li><a href="/contacts/invite">Invite Your Friends</a></li>
<li><a href="/contacts/import">Import Contacts</a></li>
<li><a href="/desktopuploader">Desktop Uploader</a></li>
<li class="last"><a href="/widget">Make Widgets</a></li>
<li style="margin-top: 0px; background: transparent;">
<div class="cheek_left menudo_image"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image"></div>
</li>
</ul>
</li>
<li class="firstborn upload" id="menudo_upload">
<a href="/upload/video" class="label">Upload</a>
<ul class="favoritechild dotted">
<li class="first last">
<a href="/upload" style="color: #fff;" title="Upload Your Video">
You have <span class="danger"><strong>500.00MB</strong></span> free for uploading this week.
<div id="menudo_upload_button_blue" class="menudo_image"></div>
</a>
<div class="left_shoulder menudo_image"></div>
<div class="right_shoulder menudo_image"></div>
</li>
<li style="margin-top: 0px; background: transparent;">
<div class="cheek_left menudo_image"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image"></div>
</li>
</ul>
</li>
<li class="firstborn" id="menudo_videos">
<a href="/dkm/videos" class="label">Videos</a>
<ul class="dotted favoritechild">
<li class="first">
<a href="/dkm/videos">My Videos <span class="grey"></span></a>
<div class="left_shoulder menudo_image"></div>
<div class="right_shoulder menudo_image"></div>
</li>
<li><a href="/dkm/albums">My Albums <span class="grey"></span></a></li>
<li><a href="/dkm/groups">My Groups <span class="grey"></span></a></li>
<li><a href="/dkm/channels">My Channels <span class="grey"></span></a></li>
<li><a href="/dkm/likes">My Likes <span class="grey"></span></a></li>
<li class="last"><a href="/inbox/subscriptions">My Subscriptions</a></li>
<li style="margin-top: 0px; background: transparent;">
<div class="cheek_left menudo_image"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image"></div>
</li>
</ul>
</li>
<li class="firstborn me" id="menudo_me">
<ul class="dotted favoritechild">
<li class="first">
<a href="/">My Home Page</a>
<div class="right_shoulder menudo_image"></div>
</li>
<li><a href="/dkm">My Profile</a></li>
<li><a href="/dkm/contacts">My Contacts <span class="grey"></span></a></li>
<li><a href="/messages">My Messages</a></li>
<li><a href="/settings">Settings</a></li>
<li class="last danger"><a href="/log_out">Logout</a></li>
<li style="margin-top: 0px; background: transparent; position: relative;">
<div class="cheek_left menudo_image"></div>
<div class="cheek_fill"></div>
<div class="cheek_right menudo_image"></div>
</li>
</ul>
<a href="/dkm"><img src="http://bitcast.vimeo.com/vimeo/portraits/defaults/d.30.jpg" id="menudo_portrait" width="24" height="24" alt="Marc M" /></a>
<div class="runt">
<a href="/dkm" class="label">Me</a>
</div>
</li>
</ul>
<div id="capleft" class="menudo_image"></div>
</div> </div>
<div id="main" class="main">
<div id="toolbar">
</div>
<div id="header">
<h1><a href="/api">Developers</a> / <a href="/api/docs/advanced-api">Advanced API</a> / Upload API</h1>
</div>
<div class="columns">
<div class="column" id="columnA">
<p class="tip_box">
There are two ways to upload using the Upload API: you can send a file in one part, or break it into smaller parts.
</p>
<h2>Full-file Upload</h2>
<h3 class="step_one">Check the user's quota</h3>
<p>Before you begin, call <a href="/api/docs/methods/vimeo.videos.upload.getQuota"><code>vimeo.videos.upload.getQuota</code></a> to make sure the user has enough space available in their account, and to let them know if their video will be encoded in HD.</p>
<h3 class="step_two">Get an Upload Ticket</h3>
<p>Before you can upload a video, you'll need an upload ticket. You can get one by calling <a href="/api/docs/methods/vimeo.videos.upload.getTicket"><code>vimeo.videos.upload.getTicket</code></a>. You should receive a response like this:</p>
<pre class="prettyprint"><?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
<ticket id="abcdef124567890" endpoint="http://1.2.3.4/upload?ticket_id=abcdef124567890" />
</rsp></pre>
<p>If uploading is currently unavailable, this method will return error <code>105: Service currently unavailable</code>.</p>
<h3 class="step_three">Post the Video</h3>
<p>The next step is to POST the video, along with the <code>ticket_id</code>, to the endpoint returned in the <a href="/api/docs/methods/vimeo.videos.upload.getTicket"><code>vimeo.videos.upload.getTicket</code></a> call. <strong>This call should signed like you would any other API call, but make sure to leave the file data out when generating the signature.</strong></p>
<div class="border">
<dl class="args xxl">
<dt>oauth_consumer_key</dt>
<dd>Your application's consumer key</dd>
<dt>oauth_nonce</dt>
<dd>A randomly-generated string that is unique to this API call.</dd>
<dt>oauth_signature_method</dt>
<dd>The cryptographic method used to sign the call.</dd>
<dt>oauth_signature</dt>
<dd>The generated signature for the call. Do not include the file data.</dd>
<dt>oauth_timestamp</dt>
<dd>UNIX timestamp for when the call was generated.</dd>
<dt>oauth_version</dt>
<dd>You don't <em>need</em> to include this, but if you do, it <em>must</em> be 1.0.</dd>
<dt>ticket_id</dt>
<dd>The ticket id from <a href="/api/docs/methods/vimeo.videos.upload.getTicket"><code>vimeo.videos.upload.getTicket</code></a></dd>
<dt>file_data</dt>
<dd>The binary file data</dd>
</dl>
</div>
<p>You will receive the MD5 hash of the file back from this call, which you can use to make sure the file uploaded properly.</p>
<h3 class="step_four">Confirm the Upload</h3>
<p>The final step is to confirm the upload by calling <a href="/api/docs/methods/vimeo.videos.upload.confirm"><code>vimeo.videos.upload.confirm</code></a>. This will complete the upload process and return the <code>video_id</code>. If you do not call this method, the video will not be processed.</p>
<pre class="prettyprint"><?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
<ticket id="8d2904e33351c3d198bdeb0668b73768" video_id="12345" />
</rsp></pre>
<h2>Segmented Upload</h2>
<h3 class="step_one">Check the user's quota</h3>
<p>Before you begin, call <a href="/api/docs/methods/vimeo.videos.upload.getQuota"><code>vimeo.videos.upload.getQuota</code></a> to make sure the user has enough space available in their account, and to let them know if their video will be encoded in HD.</p>
<h3 class="step_two">Get an Upload Ticket</h3>
<p>Before you can upload a video, you'll need an upload ticket. You can get one by calling <a href="/api/docs/methods/vimeo.videos.upload.getTicket"><code>vimeo.videos.upload.getTicket</code></a>. You should receive a response like this:</p>
<pre class="prettyprint"><?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
<ticket id="abcdef124567890" endpoint="http://1.2.3.4/upload?ticket_id=abcdef124567890" />
</rsp></pre>
<p>If uploading is currently unavailable, this method will return error <code>105: Service currently unavailable</code>.</p>
<h3 class="step_three">Post the Video files</h3>
<p>The next step is to POST the pieces of the video, along with the <code>ticket_id</code>, to the endpoint returned in the <a href="/api/docs/methods/vimeo.videos.upload.getTicket"><code>vimeo.videos.upload.getTicket</code></a> call. <strong>This call should signed like you would any other API call, but make sure to leave the file data out when generating the signature.</strong></p>
<div class="border">
<dl class="args xxl">
<dt>oauth_consumer_key</dt>
<dd>Your application's consumer key</dd>
<dt>oauth_nonce</dt>
<dd>A randomly-generated string that is unique to this API call.</dd>
<dt>oauth_signature_method</dt>
<dd>The cryptographic method used to sign the call.</dd>
<dt>oauth_signature</dt>
<dd>The generated signature for the call. Do not include the file data.</dd>
<dt>oauth_timestamp</dt>
<dd>UNIX timestamp for when the call was generated.</dd>
<dt>oauth_version</dt>
<dd>You don't <em>need</em> to include this, but if you do, it <em>must</em> be 1.0.</dd>
<dt>ticket_id</dt>
<dd>The ticket id from <a href="/api/docs/methods/vimeo.videos.upload.getTicket"><code>vimeo.videos.upload.getTicket</code></a></dd>
<dt>file_data</dt>
<dd>The binary file data</dd>
</dl>
</div>
<p>You will receive the MD5 hash of each file as you POST the pieces. You will need these, in order, for the next call.</p>
<p><strong>Note:</strong> if more than a couple hours have passed since your ticket was generated, make sure to call <a href="/api/docs/methods/vimeo.videos.upload.checkTicket"><code>vimeo.videos.upload.checkTicket</code></a> to make sure that your ticket is still valid.</p>
<h3 class="step_four">Create the Manifest</h3>
<p>You will need to create a manifest of the MD5s of each of the videos you uploaded. The order you put them in will dictate the order that they will be pieced together. This allows you to exclude pieces of the file that were interrupted or incorrectly uploaded. Below is the format of the manifest in XML and JSON:</p>
<pre class="prettyprint"><?xml version="1.0" encoding="utf-8"?>
<files>
<file md5="718a4221052e81534696bc84ef5bc195" />
<file md5="5102c13e6822b630748ffb9d9c212967" />
</files></pre>
<pre class="prettyprint">{
"files": [{
"md5":
"718a4221052e81534696bc84ef5bc195"
},
{
"md5":
"5102c13e6822b630748ffb9d9c212967"
}]
}</pre>
<h3 class="step_five">Verify the Manifest</h3>
<p>POST the manifest to <a href="/api/docs/methods/vimeo.videos.upload.verifyManifest"><code>vimeo.videos.upload.verifyManifest</code></a>. <strong>The manifest should not be included in the signature.</strong></p>
<p>If all the pieces that were uploaded are included in the manifest, this method will return the <code>ticket_id</code> and the MD5 of the combined file. If pieces were uploaded and not included in the manifest, this method will also return a list of the MD5s of those pieces.</p>
<h3 class="step_six">Confirm the Upload</h3>
<p>The final step is to confirm the upload by calling <a href="/api/docs/methods/vimeo.videos.upload.confirm"><code>vimeo.videos.upload.confirm</code></a>. You will need to pass the manifest to this method. This will complete the upload process and return the <code>video_id</code>. If you do not call this method, the video will not be processed.</p>
<pre class="prettyprint"><?xml version="1.0" encoding="utf-8"?>
<rsp stat="ok" generated_in="0.0028">
<ticket id="8d2904e33351c3d198bdeb0668b73768" video_id="12345" />
</rsp></pre>
</div>
<div class="column" id="columnB">
<div class="nippleBox optimusBlue">
<div class="bar">
<h4>Vimeo API</h4>
</div>
<div class="nipple"></div>
<div class="content">
<ul>
<li class="sub">
<a href="/api">API Home</a>
<ul>
<li><a href="/api/docs/best-practices">Best Practices</a></li>
<li><a href="/api/docs/downloads">Downloads & Examples</a></li>
</ul>
</li>
<li><a href="/api/docs/simple-api">Simple API Documentation</a></li>
<li class="sub">
<a href="/api/docs/advanced-api">Advanced API Documentation</a>
<ul>
<li><a href="/api/docs/getting-started">Getting Started</a></li>
<li><a href="/api/docs/authentication">Authentication</a></li>
<li><a href="/api/docs/oauth">OAuth guide</a></li>
<li><a href="/api/docs/response-formats">Response formats</a></li>
<li><a style="color:black" href="/api/docs/upload"><strong>Upload API</strong></a> </li>
<li><a href="/api/docs/methods">Method list</a></li>
<li><a href="/api-docs/advanced-api-docs.html">v1 Method list</a></li>
<li><a href="/api/applications/">Your API applications</a></li>
</ul>
</li>
<li><a href="/api/docs/oembed">oEmbed Documentation</a></li>
<li><a href="/api/docs/moogaloop">Moogaloop Documentation</a></li>
<li><a href="/forum:API">API Forum</a></li>
<li><a href="/groups/api">API Group</a></li>
<li><a href="http://vimeoapi.tumblr.com" target="_blank">API Status Blog</a></li>
</ul> </div>
</div>
<div class="nippleBox manateeCloud">
<div class="bar">
<h4>Vimeo developer highlights</h4>
</div>
<div class="nipple"></div>
<div class="content">
<div class="hubnut">
<object type="application/x-shockwave-flash" width="300" height="225" data="http://vimeo.com/hubnut/?user_id=brad&color=00adef&background=d1eef7&fullscreen=1&slideshow=0&stream=group&id=1585&server=vimeo.com">
<param name="quality" value="best" />
<param name="allowfullscreen" value="true" />
<param name="scale" value="showAll" />
<param name="movie" value="http://vimeo.com/hubnut/?user_id=brad&color=00adef&background=d1eef7&fullscreen=1&slideshow=0&stream=group&id=1585&server=vimeo.com" />
</object>
<div class="powered">
Powered by Vimeo <a href="http://vimeo.com/widget">Hubnut</a>
</div>
</div> </div>
</div> </div>
</div> <!-- /columns -->
<div class="clear"></div>
<div id="bottom">
<ul>
<li>
<span class="category">Vimeo:</span> <a href="/about">About</a> / <a href="/blog">Blog</a> / <a href="/api">Developers</a> / <a href="/jobs">Jobs</a> / <a href="/guidelines">Community Guidelines</a> / <a href="/forums">Community Forums</a> / <a href="/help">Help Center</a> / <a href="/site_map">Site Map</a> / <a href="http://www.bustedtees.com/vimeo" target="_blank">Merchandise</a>
/ <a href="/plus">Get Vimeo <img src="http://bitcast.vimeo.com/vimeo/assets/images/plus_icon.gif" alt="plus" style="margin-bottom: -2px;" /></a>
</li>
<li>
<div class="legal_container">
<span class="category">Legal:</span>
<span class="legal_eagle">TM + ©2009 Vimeo, LLC. All rights reserved.</span> /
<a href="/terms">Terms of Service</a> / <a href="/privacy" rel="nofollow">Privacy Statement</a> /
</div>
<div class="mindspark_logo"><a href="http://www.mindspark.com/main/index.shtml" target="_blank"><img src="http://bitcast.vimeo.com/vimeo/assets/images/logo_mindspark_footer.png" alt="mindspark" class="transifyme" width="59" height="14" /></a></div>
<div class="clear"></div>
</li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
var vimeo_startup = {
app_key: '5',
domain: '.vimeo.com',
vimeo_url: 'vimeo.com'
};
</script>
<script type="text/javascript" src="/assets/30878/js/global.js"></script>
<script type="text/javascript">
window.addEvent(window.webkit ? 'load' : 'domready', function() {
prettyPrint();
});
var cur_search_type = 'Videos';
EventCenter.fire('domready');
</script> <div style="display: none;">
<script type="text/javascript">
_qoptions = {qacct:"p-53jJe1KAP5ehs"};
</script>
<script src="http://edge.quantserve.com/quant.js" type="text/javascript"></script>
<script src="http://www.google-analytics.com/ga.js" type="text/javascript"></script>
<script type="text/javascript">
var tracker = _gat._getTracker('UA-76641-8');
tracker._setLocalRemoteServerMode();
tracker._setDomainName('.vimeo.com');
tracker._setLocalGifPath('http://utmtrk.vimeo.com/__utm.gif');
tracker._initData();
tracker._setVar('logged_in_non_plus');
tracker._trackPageview();
function trigger_pageview(url) {
tracker._trackPageview(url);
}
</script>
</div>
</body>
</html>