Page 1 of 1

Media delivery over CDN

PostPosted: Mon May 13, 2013 16:45
by CalumMc
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.

PostPosted: Mon May 13, 2013 16:53
by BrandonReese
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.

PostPosted: Mon May 13, 2013 16:56
by PilzAdam
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.

PostPosted: Mon May 13, 2013 18:06
by sfan5
Useful commands:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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

PostPosted: Tue May 28, 2013 12:10
by CalumMc
sfan5 wrote:Useful commands:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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.

PostPosted: Tue May 28, 2013 12:43
by sfan5
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.

PostPosted: Tue May 28, 2013 15:03
by BrandonReese
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.

PostPosted: Wed May 29, 2013 05:08
by aldobr
oth i have a small server i wrote a long time ago that doesnt hangs and looks safe...

if anyone wants, ask me here

PostPosted: Wed May 29, 2013 16:16
by tinoesroho
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!

PostPosted: Wed May 29, 2013 18:27
by aldobr
http://powtils.googlecode.com/svn/dev/tools/lightwebserver/

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.

PostPosted: Wed May 29, 2013 18:32
by tinoesroho
Cool!