minetest.conf remote_media

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

minetest.conf remote_media

by BrandonReese » Thu Feb 07, 2013 03:10

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 » Thu Feb 07, 2013 03:54

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
 

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

by RAPHAEL » Thu Feb 07, 2013 20:46



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
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Thu Feb 07, 2013 20:50

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/blob/master/minetest.conf.example#L242
 

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

by RAPHAEL » Thu Feb 07, 2013 22:57

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/blob/master/minetest.conf.example#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: 5862
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Feb 08, 2013 10:49

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/blob/master/minetest.conf.example#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
 

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

by PilzAdam » Fri Feb 08, 2013 16:22

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/blob/master/minetest.conf.example#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
Location: USA
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Fri Feb 08, 2013 17:47

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 » Fri Feb 08, 2013 18:55

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

by RabbiBob » Sat Feb 09, 2013 00:41

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: 319
Joined: Tue Apr 01, 2014 19:47
Location: Avalonia
GitHub: 0-afflatus
IRC: afflatus
In-game: afflatus

Re: minetest.conf remote_media

by afflatus » Mon Mar 02, 2015 15:54

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 dreaming ...
 

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

Re: minetest.conf remote_media

by sofar » Wed Dec 06, 2017 23:53

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

viewtopic.php?f=10&t=18951
 


Return to General Discussion



Who is online

Users browsing this forum: No registered users and 3 guests