I have a MPEG file which I have converted into a byte array. The intention is for a client to retrieve this byte array then save the MPEG file locally where it will be used in an WPF application.
I can convert the MPEG file to 开发者_运维问答a byte array, but I don't know how to convert the byte array back to MPEG or save the byte array as an MPEG file.
How do I do this?
BTW any infomation about converting a byte array to any video format which WPF supports would be helpful.
You can call File.WriteAllBytes
to write a byte array to a file.
If the byte array contains a different format (eg, DivX), you'll need to transcode the file to MPEG, perhaps using ffmpeg.
What about System.IO.File.WriteAllBytes(myFileName, mpegDataByteArray)
?
精彩评论