Coder Social home page Coder Social logo

ywu75 / ad-insertion-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from openvisualcloud/ad-insertion-sample

0.0 0.0 0.0 14.71 MB

The intelligent ad-insertion reference pipeline shows how to integrate various media building blocks, with analytics powered by the OpenVINO™ Toolkit, to accelerate your converged media pipeline. This is a server-side ad insertion sample (not a finished product) that can be referenced by developers to ease application development challenges. It enables real time analytics of media content that powers intelligent selection of advertisements, resulting in personalized and higher affinity targeted ad placements.

License: BSD 3-Clause "New" or "Revised" License

CMake 1.18% Dockerfile 6.05% Python 59.35% Shell 8.23% Roff 13.64% CSS 6.29% HTML 0.39% JavaScript 4.87%

ad-insertion-sample's Introduction

Travis Build Status License Contributions

The E2E sample implements a server-side AD insertion system, which features on-demand video transcoding and streaming, and AD insertion based on video content analysis.

The Content Provider service serves original content, with on-demand transcoding, through the DASH or HLS streaming protocol. The AD Insertion service analyzes video content on the fly and inserts AD, with transcoding if needed, into the video stream at each AD break slot.

The client player is based on dash.js and hls.js.

See additional information on each service:

Install docker engine:

(1) Install docker engine.
(2) Install docker compose, if you plan to deploy through docker compose. Version 1.20+ is required.
(3) Setup docker swarm, if you plan to deploy through docker swarm. See docker swarm setup for additional setup details.

Setup docker proxy:

(4) sudo mkdir -p /etc/systemd/system/docker.service.d       
(5) printf "[Service]\nEnvironment=\"HTTPS_PROXY=$https_proxy\" \"NO_PROXY=$no_proxy\"\n" | sudo tee /etc/systemd/system/docker.service.d/proxy.conf       
(6) sudo systemctl daemon-reload          
(7) sudo systemctl restart docker     

Build docker images:

(1) mkdir build    
(2) cd build     
(3) cmake ..    
(4) make     

Generate DASH/HLS segments

By default, DASH/HLS segments are generated on the fly during playback, which requires a powerful server platform to keep up with the load. If unsure, it is recommended that you use the following commands to pre-generate DASH/HLS segments:

(5) make dash    # take a coffee break?        
(6) make hls     # take a walk?!      

Start/stop services:

Use the following commands to start/stop services via docker swarm:

(1) make start_docker_swarm      
(2) make stop_docker_swarm      

Use the following commands to start/stop services via docker-compose:

(1) make start_docker_compose      
(2) make stop_docker_compose      

Launch browser:

Launch your browser and point to https://localhost to play the streams and see ADs got inserted during playback. Note that if you see a browser warning of self-signed certificate, please accept it to proceed to the sample UI.

Customize videos:

Customize the video playlist by adding videos under volume/video/archive or in the build script content-provider/archive/build.sh.
Rerun make and restart the service after making any changes.

ad-insertion-sample's People

Contributors

ywu75 avatar xwu2git avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.