how to setup mpeg dash server using apache?

老子叫甜甜 提交于 2019-12-23 12:28:29

问题


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


回答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




回答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.



来源:https://stackoverflow.com/questions/17171529/how-to-setup-mpeg-dash-server-using-apache

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!