Thanks all for your suggestions.<div><br><br><div class="gmail_quote">On Thu, Oct 6, 2011 at 9:18 PM, Icarus Alive <span dir="ltr">&lt;<a href="mailto:icarus.alive@gmail.com">icarus.alive@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On Thu, Oct 6, 2011 at 1:05 PM, Sudarshan Bisht<br>
&lt;<a href="mailto:bisht.sudarshan@gmail.com">bisht.sudarshan@gmail.com</a>&gt; wrote:<br>
&gt; I need to trim down size/duration  of an audio file, for example I have a 5<br>
&gt; MB audio file and I want to create an audio file having only 1 MB of size or<br>
&gt; 60 seconds of duration.<br>
&gt; So to do this I need to first decode original audio file<br>
&gt; completely/partially and then encode the raw samples again until it reaches<br>
&gt; 1MB/60 sec.<br>
&gt; Is there any other optimized way ?  For example playing with audio headers.<br>
&gt;<br>
<br>
</div></div>Not sure if your end goal is something like &quot;Audio thumbnails&quot; e.g.<br>
fixed size/duration audio samples, but if it is, you&#39;d find some good<br>
clues in here <a href="http://www.patentstorm.us/patents/7386357.html" target="_blank">http://www.patentstorm.us/patents/7386357.html</a><br>
But then, you see, it is patented :-). Never the less, you&#39;d note that<br>
fixed size, from the beginning of an audio file isn&#39;t a good idea, for<br>
example if vocals do not even start in the first 60 mins of a song<br>
(e.g. a song thumbnail/sampler).<br>
<br>
the &quot;mad&quot; element has a src query API that seems to permit determining<br>
the position, length -- which might come in handy to raise an event<br>
when you reach a certain position in the file, s.t. you terminate<br>
dumping it to file, and quit pipeline. This is coming from someone who<br>
has spent a very little time, that too only recently with gstreamer,<br>
and not very familiar with the API.<br>
<br>
And then you have this <a href="http://mp3splt.sourceforge.net/mp3splt_page/home.php" target="_blank">http://mp3splt.sourceforge.net/mp3splt_page/home.php</a><br>
<div><div></div><div class="h5">_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br><br>Sudarshan Bisht<br>
</div>