minetest.conf remote_media

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

minetest.conf remote_media

by BrandonReese » Post

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.

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

I've been curious of this new config entry as well. However I don't think it does what I wish.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

User avatar
xyz
Member
Posts: 450
Joined: Thu Nov 10, 2011 14:25

by xyz » Post


User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

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).
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

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

by PilzAdam » Post

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

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

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).
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

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
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

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

by PilzAdam » Post

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.
Last edited by PilzAdam on Fri Feb 08, 2013 16:22, edited 1 time in total.

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

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

User avatar
RAPHAEL
Member
Posts: 627
Joined: Tue Nov 01, 2011 09:09
Location: Earth

by RAPHAEL » Post

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.
Last edited by RAPHAEL on Fri Feb 08, 2013 20:40, edited 1 time in total.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)

User avatar
RabbiBob
Member
Posts: 335
Joined: Sat Jan 28, 2012 22:40
Location: /teleport 54,47,28
Contact:

by RabbiBob » Post

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.

User avatar
afflatus
Member
Posts: 362
Joined: Tue Apr 01, 2014 19:47
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus
Location: Avalonia
Contact:

Re: minetest.conf remote_media

by afflatus » Post

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.
Grailtest is stirring ...

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: minetest.conf remote_media

by sofar » Post

Easy solution: Try out the new public remote media server I've created:

viewtopic.php?f=10&t=18951

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests