forked from ShinNoNoir/likelines-smila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.txt
102 lines (87 loc) · 2.75 KB
/
README.txt
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
LikeLines pipelet for SMILA 1.1.
Computes the top <n> most interesting keyframes of the video denoted by the
parameter <input_field> using the LikeLines server <server> and stores the
time-codes of the keyframes as a sequence in the attribute <output_field>.
============
Configuring
============
In order to have the SMILA pipelet invoke content analysis on videos,
the LLIndexer component needs to be configured. Please see
configuration/README.txt
for more information.
============
Testing
============
To test the pipelet, copy the BPEL file (LikeLinesPipeline.bpel) to your
BPEL container folder of SMILA.Application and add the following lines to
the deploy.xml file:
<process name="proc:LikeLinesPipeline">
<in-memory>true</in-memory>
<provide partnerLink="Pipeline">
<service name="proc:LikeLinesPipeline" port="ProcessorPort" />
</provide>
</process>
Then, open the Run or Debug Configurations window in Eclipse and check the bundle.
Run SMILA. When it is ready, use a REST client to interact with SMILA:
URL: http://localhost:8080/smila/pipeline/LikeLinesPipeline/process
METHOD: POST
REQUEST BODY:
{
"Text": "Some record",
"youtube_id": "YouTube:wPTilA0XxYE"
}
RESULT (example):
{
"Text": "Some record",
"youtube_id": "YouTube:wPTilA0XxYE",
"_recordid": "LikeLinesPipeline-800097b9-62e4-4a7b-aab4-fba8d0df06c7",
"topkeyframes":
[
63
],
"topkeyframes_jpg":
[
"...base64 encoded jpg..."
]
}
Note that the field "topkeyframes_jpg" is only available if the video has been
indexed and is still in the cache. Also, if frame extraction fails for one of
the frames, the corresponding entry will be an empty string.
Alternatively, if you're running SMILA 1.2, you can also test the pipelet
in isolation using the following REST request:
URL: http://localhost:8080/smila/pipelets/cubrikproject.tud.likelines.pipelets.LikeLines/process
METHOD: POST
REQUEST BODY:
{
"_configuration": {
"server": "http://likelines-shinnonoir.dotcloud.com",
"input_field": "youtube_id",
"n": 3,
"output_field": "topkeyframes",
"output_frames_field": "topkeyframes_jpg"
},
"Text": "Some record",
"youtube_id": "YouTube:wPTilA0XxYE"
}
RESULT (example):
{
"_configuration": {
"server": "http://likelines-shinnonoir.dotcloud.com",
"input_field": "youtube_id",
"n": 3,
"output_field": "topkeyframes"
},
"Text": "Some record",
"youtube_id": "YouTube:wPTilA0XxYE",
"_recordid": "cubrikproject.tud.likelines.pipelets.LikeLines-9e816aa0-3ca9-40de-aaa0-aed857e26291"
"topkeyframes": [
63,
2,
37
],
"topkeyframes_jpg": [
"...base64 encoded jpg...",
"...base64 encoded jpg...",
"...base64 encoded jpg..."
]
}