Quoting Tomas Creemers <tomas.creem...@gmail.com> (from Wed, 14 Jan 2009 18:12:06 +0100):
> For those interested in the reason: I realize there are more efficient > ways to do this, but the programs are part of a larger framework that > adds information about the client device (e.g. whether it has only 1 > speaker) to a proxy (the transformer), which will then decide if the > audio should be re-encoded to reduce client bandwidth and CPU usage > (think mobile devices like PDA's and cell phones). Are you talking about NMM (http://www.motama.com/nmm.html, available as GPL and via a commercial license)? To your problem: reencoding of chunks is not that simple... you may get away with trying to do it with some frames at a time (stateless decoding), but to do it right you may need to really do it with the stream (statefull session based decoding). So the stream starts (send in chunks), you decode it (I suggest to use libmad instead of lame for the decoding), and you feed the PCM to limbmp3lame. At this point you have several options, you just try to get the best out of it (using the bit reservoir) with the hope that no data is hold back too long (to get data which can be used in the reservoir), or you disable the reservoir (and maybe other stuff which may cause latency in the encoding, you have to experiment with the options). For the pause feature you don't have to do much, just not sending more data to the transformer, and keeping the buffers which come back from the transformer until the user continues the playback. For skipping parts in the signal (fast forward or jumping to a specific point) it's not that easy. You can try to just start with the audio at this point, but it's better to decode some frames in advance and throw away what is not necessary (but if it is really a PDA with limited sound quality, you may not notice the difference, you have to experiment with this). Bye, Alexander. -- You will obey or molten silver will be poured into your ears. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137 _______________________________________________ mp3encoder mailing list mp3encoder@minnie.tuhs.org https://minnie.tuhs.org/mailman/listinfo/mp3encoder