Skip to content

dailymotion/demo-stream-urls-server

Repository files navigation

Demo: Dailymotion Stream URLs server

Architecture

Requirements

  • GIT
  • (either) Make and Docker
  • (or) A local version of python 3.11 with PDM and a Redis server
  • Private API credentials

Installation

  • Clone the project on your server and, if outside of Docker, run pdm install.

  • Store your private API credentials in .secrets/dailymotion_api_credentials.json with the following format:

      {
          "DAILYMOTION_API_KEY_ID": "<client_id>",
          "DAILYMOTION_API_KEY_SECRET": "<client_secret>"
      }
    

Usage

Start the application

Docker installation

Run make up on the server.

Local installation

Note: you need a Redis server. You can start one by launching make up-redis but it requires Make and Docker.

Launch bin/refresh-access-token-cache.sh in a seperate terminal, or as a daemon.

Then run bin/start-api.sh.

Fetch stream URLs

From your client browse to http://<your-server-ip>:8000/stream-urls?video_id=<video_id>&video_formats=<format1<,format2>>

Note About End-User IP

The Stream URLs Server gets the end-user IP address from the HTTP request made by the latter.

It can also read the IP address as an additional query string parameter: &client_ip=<client_ip>.

Note About HLS

HLS stream urls may not work locally due to CORS

Workflow

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •