IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Encoding for a specific file size
Sensei-Hanzo
post Aug 12 2011, 02:23
Post #1





Group: Members
Posts: 5
Joined: 1-October 10
Member No.: 84254



Hi, I was wondering if there's any way to encode something in MP2 and have it come out to be a specific file size without a whole lot of trial and error. I'm trying to mod League of Legends to replace some voice files with new ones and I have it mostly figured out, but it's not working quite right. For instance, it will start playing some lines in the middle and then run into other lines at the end. The voice files are stored in a .fsb and I suspect it has something to do with the fact that the new files I'm inserting aren't the same size/length as the originals and therefore the offset isn't correct. To fix it I would need to have the new clips be exactly or nearly exactly the same length as the originals, which takes me back to my original question. I know practically nothing about .fsb files so this is pretty much purely speculation. Does anyone have a good way to do this or more information on how .fsbs work?

Thanks in advance.

(Note: I'm encoding it in MP2 simply because this guide said to. Other common file types may work as well)
Go to the top of the page
+Quote Post
klonuo
post Aug 12 2011, 03:52
Post #2





Group: Members
Posts: 258
Joined: 29-April 10
Member No.: 80274



QUOTE
Hi, I was wondering if there's any way to encode something in MP2 and have it come out to be a specific file size without a whole lot of trial and error.


It's simple math:

Let's say you have track length of 1h 02m, which in seconds is equal to:

T = 1x60x60 + 2x60 = 3720 seconds

Than lets assume we have limited storage of 150 MB, which we calculate in bytes:

S = 150x1024x1024 = 157286400 bytes

and we need this number in bits, which is bytes multiplied by 8, so we have:

S = 157286400x8 = 1258291200 bits

Now we can calculate target bitrate and set encoder to it:

B = S/T = 338250 b/s

or

B = 338250/1024 ~ 330 Kb/s

So we can set encoder with anything lower than 330 Kb/s in that limited space

This post has been edited by klonuo: Aug 12 2011, 03:55
Go to the top of the page
+Quote Post
Sensei-Hanzo
post Aug 12 2011, 04:29
Post #3





Group: Members
Posts: 5
Joined: 1-October 10
Member No.: 84254



Is there a specific encoder or program you could suggest for this? The one I was using just has a "quality" option that ranges from 0-100, which doesn't seem very useful.
Go to the top of the page
+Quote Post
saratoga
post Aug 12 2011, 04:56
Post #4





Group: Members
Posts: 4715
Joined: 2-September 02
Member No.: 3264



QUOTE (Sensei-Hanzo @ Aug 11 2011, 23:29) *
Is there a specific encoder or program you could suggest for this? The one I was using just has a "quality" option that ranges from 0-100, which doesn't seem very useful.


twolame is considered a pretty good mp2 encoder.

That said, I suspect that whatever software you're using isn't meant for mp2 if its giving you choices between 0-100.
Go to the top of the page
+Quote Post
Sensei-Hanzo
post Aug 12 2011, 17:05
Post #5





Group: Members
Posts: 5
Joined: 1-October 10
Member No.: 84254



Hm, it turns out the issue is actually that the fsb repacker I was using doesn't work right. Thanks to the people who replied, though.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2014 - 22:33