iOS video streaming and storing on device afterwards

前端 未结 5 834
情书的邮戳
情书的邮戳 2020-12-23 17:27

So far I know how to stream a video and how to download it and afterwards stream it, but here\'s the tricky bit: streaming it once, storing it on the device and in the futur

5条回答
  •  旧时难觅i
    2020-12-23 17:56

    Not quite sure here how you get your stream but look in to the AVAssetWriter, AVAssetWriterInput and AVAssetWriterPixelBufferAdaptor and as soon as you receive data you should be able to append the data to the to the pixel buffer adaptor using:

    appendPixelBuffer:withPresentationTime:
    

    not sure it will work for you but with some fiddling you should be able to adapt your input to match this method. There are lots of example code for setting up the writer

提交回复
热议问题