Media delivery over CDN

Post Reply
User avatar
CalumMc
Member
Posts: 58
Joined: Mon Dec 12, 2011 16:50
Location: England

Media delivery over CDN

by CalumMc » Post

Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.

User avatar
BrandonReese
Member
Posts: 839
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.
Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

BrandonReese wrote:
CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.
Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.
I dont think any mods use .blend files.
The setting only has to be set in the server.
Clients without cURL support will still download from the Minetest server.

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Useful commands:

Code: Select all

mkdir media
cd media
for f in `find ../games/minetest_game -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
for f in `find ../mods/ -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
python -m SimpleHTTPServer <port>
Warning: SimpleHTTPServer sometimes hangs up
Last edited by sfan5 on Wed May 29, 2013 11:36, edited 1 time in total.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
CalumMc
Member
Posts: 58
Joined: Mon Dec 12, 2011 16:50
Location: England

by CalumMc » Post

sfan5 wrote:Useful commands:

Code: Select all

mkdir media
cd media
for f in `find ../games/common -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
for f in `find ../mods/minetest -name "*.png" -o -name "*.ogg" -o -name "*.x"`; do
  echo "Copying ${f}..."
  cp "$f" .
done
python -m SimpleHTTPServer <port>
Thank you, they were very useful.

User avatar
sfan5
Moderator
Posts: 3944
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

BrandonReese wrote:
CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.
Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.
blend files can not be read by Irrlicht and can therefore not be of any use for something.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
BrandonReese
Member
Posts: 839
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

sfan5 wrote:
BrandonReese wrote:
CalumMc wrote:Hi,

I notice that in the config file there is a line where you can specify a URL for media delivery over HTTP as an alternative to UDP.

Is there any documentation on this feature especially where you find the media and how the directory structure should work. I can see this being very useful to me as I would like to deliver the media to my server clients over a CDN which would significantly reduce load times.

Thanks.
Just throw all of the .png .ogg .x .blend files from the mods on your server into an http accessible folder, then put the appropriate web address to that folder in the remote_media setting in your config file.
blend files can not be read by Irrlicht and can therefore not be of any use for something.
I wasn't aware, I just know some of the mods have .blend files included so I uploaded them. Didn't know the engine couldn't use them.

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

oth i have a small server i wrote a long time ago that doesnt hangs and looks safe...

if anyone wants, ask me here
Last edited by sfan5 on Wed May 29, 2013 05:18, edited 1 time in total.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

aldobr wrote:oth i have a small server i wrote a long time ago that doesnt hangs and looks safe...

if anyone wants, ask me here
Cool! I've been using HFS from rejetto, but I'm always out to test stuff!
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

User avatar
aldobr
Member
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Post

http://powtils.googlecode.com/svn/dev/t ... webserver/

its multithreaded and uses a white list where you add files that can be downloaded one by one to a list. i believe this is safer...

i dont remember if there is a compiled version, if not, i can upload a binary.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

Cool!
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

Post Reply

Who is online

Users browsing this forum: runs and 4 guests