Custom Server Music

Discuss anything to do with Nexuiz here.

Moderators: Nexuiz Moderators, Moderators

Fri Nov 09, 2007 4:43 am

  • Is it possible to push custom .ogg files out to clients from the server while playing?

    Instead of relying on the ogg music embedded in maps, it'd be nice to be able to stream it to players. Combining a shoutcas-like tech with it, I suppose.

    Anything like this exist?

    I guess it'd be just as easy to have folks tune into a shout/icecast server at the same time - but I'd rather it be seemless for the user.
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Fri Nov 09, 2007 7:09 am

  • It would probably eat too much in-game bandwidth. The less utilized your line is, the faster packets get through (as they then don't need to get queued), and the better you can play.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Nov 09, 2007 7:16 am

  • How about streaming 24kb/s AAC from another line?
    Image
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Fri Nov 09, 2007 8:10 am

  • No, it is client bandwidth that gets utilized too much. Just try it - receive a low-bandwidth audio stream while playing. It already worsens the experience on many lines, even if the sum of the game and stream bandwidth is way below your total downstream bandwidth.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Fri Nov 09, 2007 2:03 pm

  • either additional TeamSpeak or ShoutCast server, depending on your priorities.
    alternatively, you could create custom map packs with your own soundtracks.
    4m [PB] (amoebios)

    This is Your world.
    The mysterious Mr. 4m
    Forum addon
     
    Posts: 1402
    Joined: Wed Mar 01, 2006 6:03 pm
    Location: germany

Fri Nov 09, 2007 8:11 pm

Fri Nov 09, 2007 9:20 pm

  • 4m wrote:either additional TeamSpeak or ShoutCast server, depending on your priorities.
    alternatively, you could create custom map packs with your own soundtracks.


    Custom map packs - no, instead:

    make a pk3 of the following layout:

    YOURMUSICPACK-1.0.txt
    sound/cdtracks/yourtrack.ogg
    maps/basement.cfg
    maps/skyway.cfg
    maps/downer.cfg
    maps/foobar.cfg

    where the .cfg files all contain "cd loop youtrack". Set sv_curl_serverpackages YOURMUSICPACK-1.0.txt and each client will play the right music on your server.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Sat Nov 10, 2007 12:15 am

  • That's perfect, divV! Thanks!
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Sat Nov 10, 2007 1:02 am

  • for the record, 95% of the time I play, I play while listening to internet radio, it's not that big of a difference.
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida

Sat Nov 10, 2007 11:31 am

  • Perfect Div! Thanks.
    User avatar
    pavlvs327
    Advanced member
     
    Posts: 86
    Joined: Mon Aug 27, 2007 9:05 pm

Mon Nov 12, 2007 8:48 am

  • I don't notice that much difference either, even with my crappy connection and location (256kb up/dn, Finland, middle of nowhere :>) while listening to a 24kb/s AAC stream. Sure my ping goes from like 60 to 80 but it's still pretty playable. I'd never listen to music while playing a 1on1 match though, only DM and CTF :). (No need to know where the enemy is by hearing, they are everywhere around you!) ^^.
    Image
    User avatar
    FruitieX
    Keyboard killer
     
    Posts: 588
    Joined: Mon Nov 13, 2006 4:47 pm
    Location: Finland

Wed Nov 14, 2007 4:33 am

  • I can't seem to get that format working, div. Can I get a little pointer?

    Here's the layout

    Code: Select all
    ls -R
    .:
    GulchMusic-1.0.txt  maps  sound

    ./maps:
    brokenworld_r2.cfg    evilspacectf.cfg  map-ctf_facing_worlds_nex2.cfg  succer_socks_r3.cfg
    capturecity-v2r1.cfg  map-cbctf1.cfg    mentalrespaced.cfg              vitamea-v2.cfg

    ./sound:
    cdtracks

    ./sound/cdtracks:
    07-warm.ogg  bi-wedding.ogg  ck-nugget.ogg  dm-world.ogg  elyuc.ogg  jq-digital.ogg  jr-kansas.ogg  ts-howsoon.ogg

    I have all that zipped up into GulchMusic-1.0.pk3 and:

    sv_curl_serverpackages GulchMusic-1.0
    (have tried .txt and .pk3 as well for curl url)

    What's going on and what am I missing...

    Thanks
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Wed Nov 14, 2007 6:36 am

  • To clarify, the server never even triggers a download of the pk3. If I load a map that I've added a .cfg file for, it still tries to load its default ogg. Such as 'cd loop "8"' instead of whatever custom ogg i have listed.

    If I download the pk3 manually and put it in .nexuiz/data/, I'm able to specify via console 'cd loop myogg' and it works.
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Wed Nov 14, 2007 9:01 am

  • sv_curl_serverpackages GulchMusic-1.0.txt has to work. Note that changing this cvar needs a map reload to become active.
    1. Open Notepad
    2. Paste: ÿþMSMSMS
    3. Save
    4. Open the file in Notepad again

    You can vary the number of "MS", so you can clearly see it's MS which is causing it.
    User avatar
    divVerent
    Site admin and keyboard killer
     
    Posts: 3809
    Joined: Thu Mar 02, 2006 4:46 pm
    Location: BRLOGENSHFEGLE

Wed Nov 14, 2007 5:03 pm

  • Well, it's not :)

    I've done fs_rescan, restarted the server, nothing seems to make it download the pk3.

    Maybe I don't understand what you mean by a 'map reload'. I assume restarting the server would accomplish the same?
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Wed Nov 14, 2007 6:20 pm

  • did you really use "sv_curl_serverpackages GulchMusic-1.0.txt" as divVerent suggested? (note: sv_curl_serverpackages lists files the clients needs to play, not pk3 names!)
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Wed Nov 14, 2007 6:25 pm

  • Kadaver, yes, I have tried three variations -

    sv_curl_serverpackages GulchMusic-1.0.txt
    sv_curl_serverpackages GulchMusic-1.0.pk3
    sv_curl_serverpackages GulchMusic-1.0

    I now know the .pk3 and blank extensions wouldn't have worked anyway - but what else could I be missing? I also have sv_curl_defaulturl set to the correct location as well.

    the client side shows no errors, no 404 or failed curl download.

    This is going to be a face-palm, I'm sure. :)

    What should the contents of the .txt file be?
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Wed Nov 14, 2007 7:03 pm

  • John Galt wrote:What should the contents of the .txt file be?

    Doesn't matter, it just needs to be there, but credits & a copyright notice would be a good idea.

    Last idea what your problem might be: is the pk3 in your server's data/ dir?
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Wed Nov 14, 2007 7:19 pm

  • Yes it is.
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Wed Nov 14, 2007 10:36 pm

  • I changed the name of the package per pavlvs' instructions on IRC. Starting up the server, I definitely see it adding the packfile:
    Code: Select all
    Added packfile data/zzgulchmusic-1.0.pk3 (18 files)


    I have tried these sv_curl_serverpackages lines:
    Code: Select all
    //sv_curl_serverpackages zzgulchmusic-1.0.txt
    sv_curl_serverpackages zzgulchmusic-1.0


    And the new layout of the actual package:

    Code: Select all
    ls -R
    .:
    maps  sound  zzgulchmusic-1.0.txt

    ./maps:
    basement.cfg        capturecity_v2r1.cfg  evil(space)ctf.cfg      mentalrespaced.cfg   vitamea-v2.cfg
    brokenworld_r2.cfg  cbctf1.cfg            facing_worlds_nex2.cfg  succer_socks_r3.cfg

    ./sound:
    cdtracks

    ./sound/cdtracks:
    07-warm.ogg  bi-wedding.ogg  ck-nugget.ogg  dm-world.ogg  elyuc.ogg  jq-digital.ogg  jr-kansas.ogg  ts-howsoon.ogg


    I'm racking my brain trying to figure what's wrong...

    pk3 in /data on server - check
    pk3 available on webserver for curl - check
    server adds packfile on start - check
    sv_curl_serverpackages set correctly - check
    sv_curl_defaulturl set correctly - check

    I nkow this is going to be something dumb. arrgghh

    Any other ideas?
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Thu Nov 15, 2007 12:58 am

  • Doing some further testing, it appears that sv_curl_serverpackages doesn't affect anything.

    Removing the waypointsprites-0.6 from my data dir and reconnection also does not cause download to begin.

    That's with this config:
    Code: Select all
    sv_curl_serverpackages
    "sv_curl_serverpackages" is "waypointsprites-0.6 zzzgulchmusic-1.0.txt" [""]


    What would keep serverpackages from functioning?
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Thu Nov 15, 2007 1:06 am

  • John Galt wrote:Doing some further testing, it appears that sv_curl_serverpackages doesn't affect anything.

    Removing the waypointsprites-0.6 from my data dir and reconnection also does not cause download to begin.

    That's with this config:
    Code: Select all
    sv_curl_serverpackages
    "sv_curl_serverpackages" is "waypointsprites-0.6 zzzgulchmusic-1.0.txt" [""]


    What would keep serverpackages from functioning?


    Have you tried moving your dlcache out of the way to see if perhaps it's the fact that the client already has the map that causes the server to skip over telling the client it needs to curl something else? And maybe make sure the maps in question aren't also in your data dir, could have the same effect. Just guessing wildly.
    User avatar
    nexbender
    Alien
     
    Posts: 138
    Joined: Tue Jun 26, 2007 12:35 am
    Location: Kal E Forn Ya

Thu Nov 15, 2007 1:35 am

  • It will continue to download new maps, but never the serverpackages :\
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Thu Nov 15, 2007 3:11 am

  • whew I got the download to work. You need to save as zip first, then rename to pk3 - rather than save directly as pk3. How obscure is that? Ugh. Thanks to bender and pavlvs.

    There's another issue, though.

    The first map after you join will play the song, and other maps without their own .cfg specifying a track will work as well. But if you chmap to another that has its own, it overrides my custom mapname.cfg and plays the old music.

    Is there anything that can be done about this?
    cat /dev/urandom > /dev/mem
    John Galt
    Alien
     
    Posts: 166
    Joined: Thu Jul 19, 2007 9:20 pm
    Location: Washington, DC

Thu Nov 15, 2007 1:58 pm

  • John Galt wrote:whew I got the download to work. You need to save as zip first, then rename to pk3 - rather than save directly as pk3. How obscure is that? Ugh. Thanks to bender and pavlvs.


    Glad to see you got this working :).
    User avatar
    [-z-]
    Site Admin and Nexuiz Ninja
     
    Posts: 1794
    Joined: Mon Nov 13, 2006 12:20 am
    Location: Florida



Return to Nexuiz - General Discussion




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest