how to setup mpeg dash server using apache?

14,468

Solution 1

Just put the MPD and the dash segments into the apache htdocs folder. If you MPD has a BaseURL, modify it to the public domain/directury, that's all.

You can see the structure at this Dataset (FTP and HTTP access): http://www-itec.uni-klu.ac.at/dash/?page_id=207

Solution 2

Further to putting the MPD file and DASH video segments in your web folder, you may also have to enable the Cross-Origin Resource Sharing (CORS) mechanism on your web server. This is because the DASH player will request the MPD file and video segments using XMLHTTPRequests which follows the same-origin policy. This means that if your DASH player is requesting files from a different vanilla web-server, you may get errors like

XMLHttpRequest cannot load http://remoteserver.com/resource. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localsite.dev' is therefore not allowed access. 

For apache2, the following configuration settings in my confs-available folder enabled CORS and did the job:

Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
Header set Access-Control-Max-Age "1000"
Header set Access-Control-Expose-Headers: "Server,range,Content-Length,Content-Range"
Header set Access-Control-Allow-Headers "range,x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

Note that not all these flags may be necessary for DASH serving. I re-used code from this blog page to start but haven't yet investigated the minimal flags required.

Share:
14,468
MSH
Author by

MSH

Updated on August 21, 2022

Comments

  • MSH
    MSH almost 2 years

    I want to setup a local mpeg dash server on ubuntu 10.04. so what should I do after installing apache and mpeg dash encoder separately?

    thanks

  • MSH
    MSH about 11 years
    Ok,thanks and what do I do in client side? I installed VLC player but it couldn't stream MPD files.
  • Stefan Lederer
    Stefan Lederer over 9 years
    You can either use the dash.js, which is HTML5/JS only, or you go for the bitdash player which is HTML5/JS as well as Flash.