Hi,
I am uploading a video file, i want to convert its extension from .mp4 to .avi without changing the other properties of the uploaded file.
How to convert .mp4 file to .avi format
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Eli Bangz2 pointsPosted May 27, 2015, 11:37 PM EDT
If you mean that you want to convert the MP4 video file to AVI file format before uploading it, you can achieve this using DirectShow, but it will be complicated if you are not familiar with DirectShow programming.
It will be easier if you use a higher-level programming toolkit like leadtools. the following link shows how to convert videos from AVI to MP4, and I think you can change it to do what you need:
http://support.leadtools.com/SupportPortal/CS/forums/35394/showpost.aspx
But if you mean that you want to change only the extension of the file from .MP4 or .AVI without changing the actual file data, you can use the File.Move with the Path.ChangeExtension methods as follows:
File.Move(myffile, Path.ChangeExtension(myffile, ".AVI"));