Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » snda and mp3
snda and mp3 [message #254407] Tue, 17 April 2007 12:34 Go to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
How come that some custom mp3s always get cut of at a specific point in the middle of playback? Are there any restrictions on how mp3 files should be encoded for renegade? Any help appreciated.
Re: snda and mp3 [message #254415 is a reply to message #254407] Tue, 17 April 2007 13:38 Go to previous messageGo to next message
danpaul88 is currently offline  danpaul88
Messages: 5795
Registered: June 2004
Location: England
Karma: 0
General (5 Stars)
I assume you have a custom mp3 file on your client. The reason is *possibly* that the server is using the length of it's own mp3 file to decide when to tell your client to stop playing the file.. in other words, you need to make the custom mp3 the same length as the original one...

http://steamsignature.com/card/1/76561197975867233.png
Re: snda and mp3 [message #254418 is a reply to message #254407] Tue, 17 April 2007 14:14 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
It's part of a mod. It will be both host and client sided, and the file is unrelated to renegade's existing content.

[Updated on: Tue, 17 April 2007 14:16]

Report message to a moderator

Re: snda and mp3 [message #254432 is a reply to message #254407] Tue, 17 April 2007 16:02 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Maybe it's the bit rate or sample rate? Try 16 bits and 44,100Hz. If not take a current file and check that.
Re: snda and mp3 [message #254530 is a reply to message #254432] Wed, 18 April 2007 07:35 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Are you talking about how some times a .mp3 file will not repeat when it reaches the end. I usually just re-save the .mp3 (to .wav and then back to .mp3 same bit rate) and it will start working right.

Re: snda and mp3 [message #254539 is a reply to message #254407] Wed, 18 April 2007 08:27 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
I'm talking about how some mp3 files wont reach their end. For example a 2 minute file would stop at around 40 seconds.
Re: snda and mp3 [message #254553 is a reply to message #254407] Wed, 18 April 2007 09:45 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Depending on the sound some sounds have a range around a cirtain area. I know this from my radio mods. Stand still ingame and see if it still occures. If not maybe you can add them in the map? (check the looping box if you want it to loop).
Re: snda and mp3 [message #254562 is a reply to message #254407] Wed, 18 April 2007 10:49 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
For what I have in mind snda is just what i need.

To check if the mp3(s) is fucked up, i added it as a looping sound preset, but this time it worked just fine, so it's not.

I thought that maybe it has something to do with priorities, but this does not really make sense, since no other sound was playing around me, and the cutoff is always at a set location.

meh
Re: snda and mp3 [message #254577 is a reply to message #254407] Wed, 18 April 2007 13:19 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
The console command, "snda" was designed for .wav file types only. Very few custom .mp3 files work.

The console command, "music(a/p)" and "nomusic(a/p)" was designed for .mp3 file types only. Very few custom .wav files work.

Try using musica and see if it still cuts out. If so it's the file, if not then it's because you've been using snda.
Re: snda and mp3 [message #254685 is a reply to message #254577] Thu, 19 April 2007 07:30 Go to previous messageGo to next message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Are you talking about placing those speakers in level editor, because if you are then yes I know exactly what you are talking about, but its easier (and better) just to set up the scripts "JFW_Set_Background_Music" and have a timer turn it off after a certain amount of time with "JFW_Stop_Background_Music".

Re: snda and mp3 [message #254865 is a reply to message #254407] Fri, 20 April 2007 15:44 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
I'm not. I just want a short mp3 to play for all players, using a console command.

I did try the musica command, it plays the mp3 to the end, but it loops, wich I dont want.

Re: snda and mp3 [message #254883 is a reply to message #254407] Fri, 20 April 2007 18:05 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Find out the exact time (to the second) and play nomusica when that time i reached.
Re: snda and mp3 [message #254944 is a reply to message #254407] Sat, 21 April 2007 08:19 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
That would be very unpractical, since i have no clue on how to automate that process.
Re: snda and mp3 [message #254952 is a reply to message #254407] Sat, 21 April 2007 09:09 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Script. NR uses the same thing to play its music.
Re: snda and mp3 [message #254968 is a reply to message #254407] Sat, 21 April 2007 12:06 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
I know it needs to be automated using scrips, what i was referring to is that i have no clue on coding.

I need it to play numerous short fragments of sound, ranging from like 5 to 10 seconds, and some rare ones lasting for like a minue.

I will stick to Jerad's semi solution, re-encoding the mp3 file from wav (various settings) until it starts to play right.

[Updated on: Sat, 21 April 2007 12:10]

Report message to a moderator

Re: snda and mp3 [message #255003 is a reply to message #254407] Sat, 21 April 2007 17:23 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
what language are you using to code it in?
Re: snda and mp3 [message #255008 is a reply to message #255003] Sat, 21 April 2007 17:32 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
none...

What i need is:
F8 snda (or whatever works),
wich plays a short mp3 file to the end,
without cutting off in the middle of the file.

Some work, some don't, so I was just asking some help on tracing the problem. Seems like snda is just extremely picky on what files to play well and wich not.
Re: snda and mp3 [message #255009 is a reply to message #254407] Sat, 21 April 2007 17:46 Go to previous messageGo to next message
Genesis2001
Messages: 1397
Registered: August 2006
Karma: 0
General (1 Star)
I meant what language are you using to script in?


Use snda to play .wav files
Use musica to play .mp3 files
Re: snda and mp3 [message #255013 is a reply to message #254407] Sat, 21 April 2007 18:04 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
Instead of using mp3's use wav's with the snda command, especially for small time tracks. Mp3 is mainly used for music or dialoge backing tracks.
Re: snda and mp3 [message #255048 is a reply to message #254407] Sun, 22 April 2007 04:03 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
wav aint really a solution, 20 mb would become 120 mb, even when using adpcm.

using musica solves one problem, but introduces a new one, so it doesnt really help me any further.
Re: snda and mp3 [message #255058 is a reply to message #254407] Sun, 22 April 2007 06:49 Go to previous messageGo to next message
Zion is currently offline  Zion
Messages: 2722
Registered: April 2006
Karma: 1
General (2 Stars)
What, your mp3 is 20mb?!

I mean, a 3 minute mp3 file should be no more than 4mb. You've serisously screwed something up if you have a 10 second mp3 at 20mb.
Re: snda and mp3 [message #255061 is a reply to message #254407] Sun, 22 April 2007 07:31 Go to previous messageGo to next message
Slave is currently offline  Slave
Messages: 607
Registered: December 2006
Karma: 0
Colonel
oh cmon... all small ones together...
Quote:

I need it to play numerous short fragments of sound, ranging from like 5 to 10 seconds, and some rare ones lasting for like a minue.
Re: snda and mp3 [message #255241 is a reply to message #255061] Mon, 23 April 2007 09:12 Go to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3809
Registered: July 2006
Location: USA
Karma: 6
General (3 Stars)
Best possible solution, send me the music file through my email:

And I will take a look at it, and correct anything that would cause problems.

edit: removed public email.


[Updated on: Fri, 07 October 2011 00:04]

Report message to a moderator

Previous Topic: Laser Rifle
Next Topic: Vehicle bones
Goto Forum:
  


Current Time: Thu Nov 14 07:12:01 MST 2024

Total time taken to generate the page: 0.01167 seconds