iphone流式传输视频/音频并保存

时间:2021-11-27 18:56:04

I would like to have nice player in the iPhone. The source is audio/video files from the server (for example, MP3/M4V). Let's imagine, the file is huge hence I need to stream it inside iPhone. I been researching and there are lots of possibility to do this, MPMoviePlayer or AVPlayer with AVURLAsset. I am able to do that, but now the challenge, how do you streaming the file and after finished download you save it to iphone? so that next time user does not need to re-download it again.

我想在iPhone中拥有漂亮的播放器。源是来自服务器的音频/视频文件(例如,MP3 / M4V)。让我们想象一下,文件很大,因此我需要在iPhone内部传输它。我一直在研究,有很多可能做到这一点,MPMoviePlayer或AVPlayer与AVURLAsset。我能够做到这一点,但现在挑战,你如何流媒体文件和完成下载后,你将它保存到iPhone?这样下次用户无需再次重新下载。

I been thinking to use AVAssetReader and AVAssetWriter and use CMSampleBufferRef. Anybody has another thought about this?

我一直在考虑使用AVAssetReader和AVAssetWriter并使用CMSampleBufferRef。有人想过这个吗?

Thanks!

谢谢!

1 个解决方案

#1


0  

I been communicating with Apple AV Developer and he confirmed that it is not possible to do this.

我一直在与Apple AV Developer进行沟通,他确认无法做到这一点。

#1


0  

I been communicating with Apple AV Developer and he confirmed that it is not possible to do this.

我一直在与Apple AV Developer进行沟通,他确认无法做到这一点。