如何使用目标C将base64字节数组转换为ios中的视频

时间:2013-05-24 09:36:01

标签: iphone

但是在ios中如何将字节流转换为视频并在iphone中播放,任何人都可以帮助我

 stream   t =    new Filestream   ("video.mp4,   FileMode.Create);
 BinaryWriter b    =    new Binary_Writer(t);
 b.write(videoData);
 t.close();

1 个答案:

答案 0 :(得分:1)

解码b64,试试这个库:https://github.com/l4u/NSData-Base64

像这样使用它:

NSString *videoPath = '...'; //output path for the video.mp4 
NSString *encodedString = '...'; //the encoded "data"
NSData *decodedData = [NSData dataFromBase64String:encodedString];
[decodedData writeToFile:videoPath atomically:NO];