Re: Trimming approach
Re: Trimming approach
- Subject: Re: Trimming approach
- From: Santosh Kumar <email@hidden>
- Date: Wed, 1 Apr 2009 12:02:01 +0530
Hi James ,
Thanks for reply.
I am dealing with Uncompressed AIFF format.
For me trimming is happening correctly and i have implemented FadeIn/Out effects also. Only the problem is for larger file (say of size 150 MB ) this process takes around 35 secs. Because i am scanning the entire file thats why i was looking for some other approach through which i can optimize it and decrease the duration to 10 - 15 secs.
Regards, Santosh On 31-Mar-09, at 10:50 PM, James Chandler Jr wrote: Hi Santosh
I don't know if you mean copying packets from a compressed audio file (such as MP3 or M4a) or if you mean copying packets from an uncompressed file (such as WAV or AIF).
If you mean un-compressed data, one tweak would be to fade the ends where you cut out material. Unless you know that you are cutting in a very silent part of the source file, you will hear clicks in the audio at the splice points. Some clicks will be louder than other splice clicks, just depending on the random mis-match of the spliced waveforms.
Something as simple as a 10 ms linear fade or crossfade is sufficient to eliminate the majority of splicing clicks.
If you mean compressed audio data, then simply copying on the packet level MAY work fine, but as with uncompressed audio you may hear clicks or other oddities at the splice points. The behavior MAY depend on characteristics in the file player program. One player might handle the discontiguity better than another player.
I don't know if all compressed audio is 'streamable'. Many folks on this list can tell you more. I know that MP3 is 'streamable' and each packet contains sufficient format info for an MP3 decompressor to re-sync and begin to decompress at any packet boundary. With MP3, I think you could randomly hack out pieces of a file IGNORING packet boundaries, and many players could still play the stream. There is no guarantee that the splice point would sound pretty, though. It might be very ugly in some players <g>.
Hopefully someone who knows better can respond. If I had to trim compressed audio files, and wanted to do the job quick without turning it into a science project, I would decompress the audio, trim with fades, and then re-compress the audio. That has problems because you lose a little fidelity thataway.
So maybe there is a wonderful way to make clickless splices without decompressing the audio. Dunno.
James Chandler Jr.
O
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden