ExVideoFactory v0.3.14 ExVideoFactory View Source

Elixir wrapper for FranceTélévisions Video Factory API.

Link to this section Summary

Functions

Get the list of channels.

Get the list of files information based on Video identifier.

Get the list of files on FTP server based on Video diffusion identifier.

Get the list of files on FTP server based on Video identifier.

Get the list of HTTP URLs for TTML contents based on Video identifier.

Get the list of regions.

Get the list of types.

Get the list of videos.

Link to this section Functions

Get the list of channels.

Response example

%{
  "channels": [
    %{
      "id": "saint-pierre-et-miquelon-1ere",
      "label": "Saint-Pierre et Miquelon 1ère",
      "region": %{
          "id": "saint-pierre-et-miquelon",
          "label": "Saint-Pierre et Miquelon"
          "code": "SPM",
          "time_zone": "America/Miquelon"
      },
      "tags": ["outremer"]
    },
    ...
  ],
  "size": 10,
  "total": 30
}
Link to this function

get_files_for_video_id(id)

View Source

Get the list of files information based on Video identifier.

Response example

[
  {
    "created_at": "2018-05-03T18:29:57+02:00",
    "updated_at": "2018-05-03T18:29:57+02:00",
    "id": "c465b024-75a1-479d-9195-effe90da9cbd",
    "format": {
      "id": "video-mp4",
      "label": "video/mp4",
      "type": "video",
      "mime_type": "video/mp4"
    },
    "storage": "akamai-replay-prod",
    "path": "/streaming-adaptatif_france-dom-tom/2018/S18/J4/",
    "filename": "176668575-5aeb383753763-standard5.mp4",
    "md5_checksum": null,
    "filesize_bytes": 82099370,
    "external_ids": {
      "video_id": "32a2748d-9aa3-430b-9287-fc840f55b012",
      "legacy_id": "176668575",
      "group_id": null,
      "job_id": "2695577",
      "remote_id": null
    },
    "tags": [],
    "created_via": "factory",
    "version": "1525364791000000",
    "bitrate_kbps": 1471,
    "video_tracks": [
    {
      "codec_rfc6381": "avc1.4d001f",
      "bitrate_kbps": 1390,
      "width": 1024,
      "height": 576,
      "frame_rate_fps": 25
    }
    ],
    "audio_tracks": [
    {
      "codec_rfc6381": "mp4a.40.2",
      "bitrate_kbps": 81,
      "sample_rate_hz": 48000,
      "lang": "fra"
    }
    ],
    "text_tracks": [],
    "url": "https://replayftv-vh.akamaihd.net/z/streaming-adaptatif_france-dom-tom/2018/S18/J4/176668575-5aeb383753763-standard5.mp4"
  },
  ...
]
Link to this function

get_ftp_paths_for_id_diffusion(id_diffusion)

View Source

Get the list of files on FTP server based on Video diffusion identifier.

Response example

[
  %{
    format: "hds_akamai",
    urls: []
  },
  %{
    format: "m3u8-download",
    urls: [
      "/ftp/file/path/quality_1.mp4",
      "/ftp/file/path/quality_2.mp4",
      "/ftp/file/path/quality_3.mp4",
      "/ftp/file/path/quality_4.mp4"
    ]
  },
  %{
    format: "hls_v5_os",
    urls: [
      "/ftp/file/path/quality_1.mp4",
      "/ftp/file/path/quality_2.mp4",
      "/ftp/file/path/quality_3.mp4",
      "/ftp/file/path/quality_4.mp4",
      "/ftp/file/path/quality_5.mp4"
    ]
  }
]
Link to this function

get_ftp_paths_for_video_id(id)

View Source

Get the list of files on FTP server based on Video identifier.

Response example

[
  "/ftp/file/path/quality_1.mp4",
  "/ftp/file/path/quality_2.mp4",
  "/ftp/file/path/quality_3.mp4",
  "/ftp/file/path/quality_4.mp4",
  "/ftp/file/path/quality_5.mp4",
]
Link to this function

get_http_url_for_ttml(id)

View Source

Get the list of HTTP URLs for TTML contents based on Video identifier.

Response example

[
  "https://sample-server.com/some/path/caption.ttml",
]

Get the list of regions.

Response example

%{
  regions: [
    %{
      "id": "saint-pierre-et-miquelon",
      "label": "Saint-Pierre et Miquelon",
      "code": "SPM",
      "time_zone": "America/Miquelon"
    },
    ...
  ],
  size: 10,
  total: 12
}

Get the list of types.

Response example

%{
  types: [
    %{
      "id": "bande-annonce",
      "label": "Bande-Annonce"
    },
    ...
  ],
  size: 10,
  total: 24
}

Get the list of videos.

Options

  • query: Map of parameters to filter the query

    • q: query string in title, additional_title, original_title (case insensitive)
    • qid: filter with the video identifier
    • page: page index
    • per_page: number of items per page
    • etc.

Response example

%{
  videos: [
    %{
      "id": "978f7146-41e3-11e6-8153-000d3a23d482",
      "created_at": "2015-09-16T10:55:12.200+02:00",
      "updated_at": "2015-09-16T10:55:12.200+02:00",
      "created_by": nil,
      "created_via": "import-plurimedia-epg",

      "title": "Amour, gloire et beauté",
      "additional_title": "La vengeance de Samantha",
      "category": %{
        "id": "series-fictions",
        "label": "séries & fictions"
      },
      ...

      "images": [%{image}, %{image}, ...],

      "licensing": "svod",
      "embeddable": true,
      ...
      "platforms": %{
        "ftv": %{ ... },
        "bouygues": %{ ... },
        "orange": %{ ... },
        ...
      }

      "groups": [
        %{
          "id": "ea2bed61-47e0-4116-bf8c-33c375fd9030",
          "label": "Amour, gloire et beauté - Saison 13",
          ...
          "images": [%{image}, %{image}, ...],
        },
        ...
      ]
    },
    ...
  ],
  size: 10,
  offset: 0,
  total: 16238
}