locked
extract a section of mp3/wma RRS feed

  • Question

  • Hi friends,

    I have a question for editting media stuff.  Say I have a binary stream of mp3/wma file and now I want to create another stream, which starts from 1 minute sharp of the original stream and last only 10 seconds.  How can I generate the second stream?  and also save that to a binary stream as well as in a file?

    Thanks a million,
    Ning
    Thursday, April 13, 2006 5:19 PM

Answers

  • Hi Ning,

    As this is the Media Foundation forum I will give you pointers on how to acheive your goal through it. You can write a program to clip your media using Media Foundation on Windows Vista. You should be able to setup a media pipeline and specify the MarkIn (1 second) and MarkOut (11 seconds) for the original file. The samples being sourced from this segment can be saved to a binary stream or to a file by providing the appropriate MediaSink for this data. You will have to understand more about setting up a media pipeline in Media Foundation. You can find documentation on this API at http://windowssdk.msdn.microsoft.com/library/default.asp?url=/library/en-us/MedFound/html/0d355ad1-d674-432e-809a-9fb27ac5f610.asp.

    If you just want to create a new file with the clip without having to write code, you can use Windows Media Encoder or Windows Movie Maker to do the work for you.

    Hope this helps.

    Shafiq

    Thursday, April 13, 2006 8:56 PM