Acquisition of specified order based fv for admin¶
This API generate a fv in specified order.
This API is for administrators and the target media are included inactive media unlike API: Acquisition of specified order based fv.
Before media activation, you can check the registered media data.
GET /api/1/admin/fv
Note
There are two ways to specify the order of media that make up the fv. Required parameters change as follows according to each way. It is not possible to mix medias which have different tile type and different tile quality.
1. The way to create a fv with comma-separated media ID and level [Appendix]
Required parameters: media_ids and (levels or level)
2. The way to create a fv with a map of JSON format [Appendix]
Required parameters: map_data
Parameters¶
output_type
- Response type
- x: Output in XML format
- blank: Output in JSON format
- Response type
duration
- Time of fv to generate (1〜900seconds)An integer [Appendix]
loop
- parameter for determining the length of fv [Appendix]
row [required]
- Number of rows of fv to generate
col [required]
- Number of columns of fv to generate
media_ids
- media ID that constitutes the fv
levels
- Specifies the level of each media ID specified in media_ids
level
- Specifies a level collectively for each media ID specified in media_ids
map_data
- map data in JSON format
sound_ids
- The media ID to add the sound of media ID to the fv. [Appendix]
tile_type
- Tile typehd 16:9 / sd 4:3 / r 3:2 / s 1:1For fv creation with map_data, if media ID is not specified in the map_data, tile_type can be retrieved. Thus tile_type is required in this case.
tile_quality
- Tile Quality1 :High / 2 :Middle / 3 :LowFor fv creation with map_data, if media ID is not specified in the map_data, tile_quality is needed. Thus tile_quality is required in this case.
start_time
- specifies the start time of each media that is specified in the media_ids. [Appendix]
media_duration
- specifies the time of each media that is specified in the media_ids. [Appendix]
Response¶
status
- result of processsuccess: successother: failure
video_url
- fv URL
thumbnail_url
- fv thumbnail URL
cahched_data
- This is the flag whether fabric video’s mp4 file already have been genearted or not. If fabric video’s mp4 file alread have been generated, this flag should specify “1”, if generating process is running, this flag should specify “0”.
black_edge
- 生成されたfvのmp4ファイルの周り(上と左右)に16pixの黒色の帯が入っている場合には、”1”が返り、16pixの黒色の帯が入っていないならば、”0”が入る。黒帯を入れるか否かはfvLIBRARY環境作成時にのみ決定可能であり、途中からの変更は出来ないので、留意して下さい。(詳細はお問い合わせ下さい。)本パラメータは基本的にバージョン互換性を持たせるためのパラメータであり、基本的にはblack_edgeパラメータには”0”が入る。
map_data
- map data
Request Example¶
media_ids and levels¶
GET
https://example.com/api/1/admin/fv?
output_type=x&duration=60&row=1&col=2&
media_ids=59,58&levels=1,1&sound_ids=87
MAP¶
GET
http://example.com/api/1/admin/fv?
key=xxxx&output_type=x&duration=60&row=1&col=2&
map_data=[[ { "id":"59", "lev":"1", "rx":"0", "ry":"0" },
{ "id":"58", "lev":"1", "rx":"0", "ry":"0" } ]]&sound_ids=87
Sample Curl Command¶
curl --basic -u {your account}:{your password} "https://example.com/api/1/admin/fv?duration=60&row=1&col=2&tile_quality=2&media_ids=58,59&level=1"
Response Example - JSON¶
{
"status":"success",
"video_url":"http:\/\/example.com\/fv\/gnzo-xxxxxxxxxxx.mp4",
"thumbnail_url":"http:\/\/example.com\/fvt\/gnzo-xxxxxxxxxxxxxx.png",
"cached_data":"1",
"black_edge":"0",
"map_data":[
[
{
"id":"59",
"lev":"1",
"all-lev":[
"1",
"2"
],
"audio":"1",
"rx":"0",
"ry":"0",
"caption":"test caption",
"description":"test description"
},
{
"id":"58",
"lev":"1",
"all-lev":[
"1",
"2"
],
"audio":"1",
"rx":"0",
"ry":"0",
"caption":"",
"description":""
}
]
]
}
Response Example - XML¶
<?xml version="1.0" encoding="UTF-8"?>
<response>
<status>success</status>
<video_url>http://example.com/fv/gnzo-xxxxxxxxxxxxx.mp4</video_url>
<thumbnail_url>http://example.com/fvt/gnzo-xxxxxxxxxxxxxxxx.png</thumbnail_url>
<cached_data>1</cached_data>
<black_edge>0</bloack_edge>
<map_data>
<entry>
<entry>
<id>59</id>
<lev>1</lev>
<all-leve>
<entry>1</entry>
<entry>2</entry>
</all-leve>
<audio>1</audio>
<rx>0</rx>
<ry>0</ry>
<caption>test caption</caption>
<description>test description</description>
</entry>
<entry>
<id>58</id>
<lev>1</lev>
<all-leve>
<entry>1</entry>
<entry>2</entry>
</all-leve>
<audio>1</audio>
<rx>0</rx>
<ry>0</ry>
<caption />
<description />
</entry>
</entry>
</map_data>
</response>