指定順の fv の取得¶
指定順の fv を取得します。
この API で表示対象になるタイルは、メディアの有効化API でアクティベートされたメディアが対象になります。
GET /api/1/videos/fv
ノート
Parameters¶
key [必須]
- クライアント認証キー
 
output_type
- Response 形式
- x : XML 形式で出力
 - 指定無し : JSON 形式で出力
 
 
- Response 形式
 duration
- 生成する fv の時間(1〜900秒)整数で指定。[詳細]
 
loop
- fv の長さを決定するパラメータ [詳細]
 
row [必須]
- 生成する fv の行数
 
col [必須]
- 生成する fv の列数
 
media_ids
- fv を構成するメディアID
 
levels
- media_ids で指定した各メディアID の level を指定。
 
level
- media_ids で指定した各メディアID の level を一括指定。
 
map_data
- JSON 形式のマップデータ
 
sound_ids
- fv に埋め込む音声をメディアID で指定。[詳細]
 
tile_type
- タイル種別hd 16:9 / sd 4:3 / r 3:2 / s 1:1本パラメータが指定されない場合で、かつ指定するmedia_idの中に異なるタイルタイプを持つタイルが存在する場合はエラーが返ります。※ tile_type は、map_data 指定での fv 生成時で、すべて search 指定かつ default でのメディアID指定がない場合必要になります。
 
tile_quality
- タイル品質1 高 / 2 中 / 3 低
 - 本パラメータが指定されない場合には、指定するmedia_idの中で最初に指定されるmedia_idの品質が適用され、そのタイル品質で生成されていないタイルは、黒色のタイルで埋められます。※ tile_quality は、map_data 指定での fv 生成時で、すべて search 指定かつ default でのメディアID指定がない場合必要になります。
 
start_time
- media_ids で指定した各メディアの開始時間を指定 [詳細]
 
media_duration
- media_ids で指定した各メディアの時間を指定 [詳細]
 
Response¶
status
- 処理結果success : 成功それ以外 : 失敗
 
cached_data
- fvのmp4ファイルが既に作成されているかどうかを示すフラグ。既に作成されているならば”1”が入り、本リクエストをで作成されたmp4ファイルならば”0”が返る。
 
black_edge
- 生成されたfvのmp4ファイルの周り(上と左右)に16pixの黒色の帯が入っている場合には、”1”が返り、16pixの黒色の帯が入っていないならば、”0”が入る。黒帯を入れるか否かはfvLIBRARY環境作成時にのみ決定可能であり、途中からの変更は出来ないので、留意して下さい。(詳細はお問い合わせ下さい。)本パラメータは基本的にバージョン互換性を持たせるためのパラメータであり、基本的にはblack_edgeパラメータには”0”が入る。
 
video_url
- 生成された fv のURL
 
thumbnail_url
- 生成された fv のサムネイルのURL
 
map_data
- マップデータ
 
Request Example¶
media_ids と levels で指定¶
GET
http://example.com/api/1/videos/fv?
key=xxxx&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/videos/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¶
- Basic認証を使用した方法(media_idsとlevelsで指定)
 
curl --basic -u {your account}:{your password} "https://example.com/api/1/videos/fv?duration=10&row=2&col=2&tile_type=hd&tile_quality=2&media_ids=472,473,474,475&levels=1,1,1,1"
- AccessToken認証を使用した方法(media_idsとlevelsで指定)
 
curl "https://example.com/api/1/videos/fv?duration=10&row=2&col=2&tile_type=hd&tile_quality=2&media_ids=472,473,474,475&level=1" \
-H "Authorization: Bearer {your access_token}"
Response Example - JSON¶
{
  "status":"success",
  "video_url":"http:\/\/example.com\/fv\/gnzo-xxxxxxxxxxxxx.mp4",
  "thumbnail_url":"http:\/\/example.com\/fvt\/gnzo-xxxxxxxxxx.png",
  "cached_data":"1",
  "black_edge":"0",
  "map_data":[
    [
       {
       "id":"59",
       "lev":"1",
       "all-lev":[
         "1",
         "2"
       ],
       "audio":"1",
       "rx":"0",
       "ry":"0",
       "caption":"caption test",
       "description":"Description test"
     },
     {
       "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>
<has_next>1</has_next>
<video_url>http://example.com/fv/gnzo-xxxxxxxxxx.mp4</video_url>
<thumbnail_url>http://example.com/fvt/gnzo-xxxxxxxxxxxxxx.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>
    <rx>0</rx>
    <ry>0</ry>
    <caption />
    <description />
  </entry>
  </entry>
<entry>
  <entry>
    <id>57</id>
    <lev>1</lev>
    <rx>0</rx>
    <ry>0</ry>
    <caption />
    <description />
  </entry>
  <entry>
    <id>52</id>
    <lev>1</lev>
    <rx>0</rx>
    <ry>0</ry>
    <caption />
    <description />
  </entry>
</entry>
</map_data>
</response>