Page 1 of 1

minetest.conf remote_media

Posted: Thu Feb 07, 2013 03:10
by BrandonReese
How does this new remote media feature work? I assume I can defer the downloading of textures, sounds and such to a server separate from my game server, but I'm not sure what all that requires.

Posted: Thu Feb 07, 2013 03:54
by RAPHAEL
I've been curious of this new config entry as well. However I don't think it does what I wish.

Posted: Thu Feb 07, 2013 12:12
by xyz

Posted: Thu Feb 07, 2013 20:46
by RAPHAEL
thexyz wrote:iqualfragile: set up some http server, make it accessible from the web, put its url (like http://minetest.ru/data/) in minetest.conf's remote_media
So for clarification, what is put into that webserver? The media folder (cache)? All the mods on the server (including default)? What structure is expected by the server?

If I can figure out how this is used I will attempt to write up some documentation for it (I'm no document writer but I'll try lol).

Posted: Thu Feb 07, 2013 20:50
by PilzAdam
RAPHAEL wrote:
thexyz wrote:iqualfragile: set up some http server, make it accessible from the web, put its url (like http://minetest.ru/data/) in minetest.conf's remote_media
So for clarification, what is put into that webserver? The media folder (cache)? All the mods on the server (including default)? What structure is expected by the server?

If I can figure out how this is used I will attempt to write up some documentation for it (I'm no document writer but I'll try lol).
https://github.com/celeron55/minetest/b ... ample#L242

Posted: Thu Feb 07, 2013 22:57
by RAPHAEL
PilzAdam wrote:
RAPHAEL wrote:
thexyz wrote:iqualfragile: set up some http server, make it accessible from the web, put its url (like http://minetest.ru/data/) in minetest.conf's remote_media
So for clarification, what is put into that webserver? The media folder (cache)? All the mods on the server (including default)? What structure is expected by the server?

If I can figure out how this is used I will attempt to write up some documentation for it (I'm no document writer but I'll try lol).
https://github.com/celeron55/minetest/b ... ample#L242
That still doesn't answer the question I had. WHAT is to be put on the remote server? Mods? Cache? Other? (I presume cache but would like verification).

Posted: Fri Feb 08, 2013 10:49
by rubenwardy
RAPHAEL wrote:
PilzAdam wrote:
RAPHAEL wrote:


So for clarification, what is put into that webserver? The media folder (cache)? All the mods on the server (including default)? What structure is expected by the server?

If I can figure out how this is used I will attempt to write up some documentation for it (I'm no document writer but I'll try lol).
https://github.com/celeron55/minetest/b ... ample#L242
That still doesn't answer the question I had. WHAT is to be put on the remote server? Mods? Cache? Other? (I presume cache but would like verification).
"Media" so cache, i would assume

Posted: Fri Feb 08, 2013 16:22
by PilzAdam
RAPHAEL wrote:
PilzAdam wrote:
RAPHAEL wrote:


So for clarification, what is put into that webserver? The media folder (cache)? All the mods on the server (including default)? What structure is expected by the server?

If I can figure out how this is used I will attempt to write up some documentation for it (I'm no document writer but I'll try lol).
https://github.com/celeron55/minetest/b ... ample#L242
That still doesn't answer the question I had. WHAT is to be put on the remote server? Mods? Cache? Other? (I presume cache but would like verification).
The textures and sound files.

Posted: Fri Feb 08, 2013 17:47
by BrandonReese
Find all of the .png, .x, .xcf, .blend, and .ogg files in your mods folder, as well as your games folder and upload them to a single folder, like this http://www.bremaweb.com/minetest/media

Posted: Fri Feb 08, 2013 18:55
by RAPHAEL
Linux bash script to copy all media files to a single folder:
#!/bin/bash

# Edit to your liking
MODS="/some/path/minetest/mods/minetest"
DEFMODS="/some/path/minetest/games/minetest_game/mods"
DEST="/some/path/minetest/media"

# Uncomment next two lines if you want to clean out media folder first
#rm -Rf "$DEST"
#mkdir "$DEST"

# Copy files over
find "$MODS" -type f -name '*.png' -exec cp {} "$DEST" \;
find "$MODS" -type f -name '*.ogg' -exec cp {} "$DEST" \;
find "$MODS" -type f -name '*.xcf' -exec cp {} "$DEST" \;
find "$MODS" -type f -name '*.blend' -exec cp {} "$DEST" \;
find "$MODS" -type f -name '*.x' -exec cp {} "$DEST" \;

find "$DEFMODS" -type f -name '*.png' -exec cp {} "$DEST" \;
find "$DEFMODS" -type f -name '*.ogg' -exec cp {} "$DEST" \;
find "$DEFMODS" -type f -name '*.xcf' -exec cp {} "$DEST" \;
find "$DEFMODS" -type f -name '*.blend' -exec cp {} "$DEST" \;
find "$DEFMODS" -type f -name '*.x' -exec cp {} "$DEST" \;
EDIT: I still think it would be more useful to have a feature as follows:
* Server owner compresses cache into say tar tar.gz tar.bz2 tar.7z zip file and upload somewhere
* Have in minetest.conf a line of maybe: media_archive = http:/url/media.zip
* On user connect if they need the cache, server sends the url to their client
* Client downloads cache archive and decompresses where needed
* Client fetches any media not in archive from server then connects

Benefits of above is that there are plenty of places to host single archives with hotlinking for free. Almost none that can/will host hundreds or thousands of tiny images with hotlinking for free.

Posted: Sat Feb 09, 2013 00:41
by RabbiBob
That's how the HLDS servers did it with the sv_downloadurl cvar. You'd setup your webserver with matching bzip files and the client decompressed after download. Back in the day when broadband was precious this was a huge help in getting custom maps & files out to clients connecting to your server.

Someone should take a look at the download routine doing the function, it can't be much more to include an unzip module (gz, bz2, etc) and pass the file through it if it matches the file type ending for decompression. Considering a lot of people are running their servers off home connections where upload is usually less than download, this would be a good feature.

Re: minetest.conf remote_media

Posted: Mon Mar 02, 2015 15:54
by afflatus
RAPHAEL check out kaeza's bash script, which appears to do the same thing in about 7 lines.
viewtopic.php?id=5969
However, your script is more comprehensive.

Re: minetest.conf remote_media

Posted: Wed Dec 06, 2017 23:53
by sofar
Easy solution: Try out the new public remote media server I've created:

viewtopic.php?f=10&t=18951