Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am modifying the code of an existing application that supports conversion of audio files to different formats. One of the formats that needs to be supported is MP3 so I am using the MF API to handle the encoding to MP3. Although I have the logic working to encode to MP3, I have an issue that I am trying to work through. I was hoping someone might have encountered something similar and might have some ideas.

I need to ensure the ID3 tag is at the beginning of the file. As such, my utility is writing the ID3 tag data and then it is invoking the MF API to handle the encoding. Unfortunately, the encoding is overwriting the ID3 tag data. I am not having any luck finding a way to ensure the encoding to MP3 will skip the ID3 tag data in the file. I cannot find a means in the MF API to change the file position of the output file.

Is there any way to encode via the media foundation API and have it NOT overwrite the existing ID3 data?

If not, is there any way to write the ID3 data using the MF API? I can find articles that describe getting the metadata but little to nothing on writing the metadata.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900