1

I am creating an app on windows phone 8 which needs to download large video files (>1GB or 2 GB) from dropbox, skydrive etc, and save them into windows phone music and video folder.

So my problems are:

  1. How to download large files into chunks so that i can avoid outofmemoryExcepetion.
  2. Right now I am able to save smaller video files into camera roll folder. How can i save video file into windows music-video folder?
Rudi Visser
  • 21,350
  • 5
  • 71
  • 97
vijay053
  • 822
  • 3
  • 18
  • 36
  • you state that you were successful in saving video to the camera roll, I have not been able to get past the unauthorized access exception (because the stream is a video, the same stream as a photo works). Can you share how you did this? I'm recording video, then save to isostorage. – Lance McCarthy May 20 '13 at 03:02

2 Answers2

0

Never needed to do it so please excuse the accuracy of my answer

I would suggest that you try getting hand to the underlying stream. if its a web request, try plugging into response stream. Next up, Open stream (to file in isostore) and append to it.

I have only used LiveConnect to upload.. never to download, however check live connect / rest api to see whether you can easily make a web request.

have a look at this SO post How to split a large file into chunks in c#?

Community
  • 1
  • 1
Hermit Dave
  • 3,036
  • 1
  • 13
  • 13
0
  1. Assuming that the server supports it, you can use the HTTP Range header to specify which bytes of a file the server should return in response to a request.
    You then make multiple requests to get the file in pieces and then put it all back together on the device.

  2. The SDK does not currently support a way for saving video into the device library. The nearest thing you can do is save the file within the IsolatedStorage of your app and then add the item to the new list in the library (via WriteAcquiredItem).

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143