UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Save Remote Video URL directly to Iphone (SwiftUI)

Forums > SwiftUI

Hello

I have been working on an app where I have to download remote videos from a website when the direct URL of course is known.

Example : www.sjak.dk/xx.mp4 <-- Not a working link - just to use as an example :)

How is this done so I can combine it with UISaveVideoAtPathToSavedPhotosAlbum

any tutorials or similar to work with? I have searched a lot of videos, but none is useful.

I know how to do it with images and UIImageWriteToSavedPhotosAlbum, but not with the video part.

Regards in advance

Morten, Denmark

1      

It depends…on whether or not it's a single video file or a streaming bundle (e.g., HLS).

Streaming bundles are a directory containing:

  • video in various resolutions segmented into little tiny pieces
  • audio for same, usually in multiple formats, and possibly multiple languages
  • captions
  • audio description (voice captions describing the sound)
  • snapshots that you see as you scrub through the video in the same resolution as the video
  • m3u8 files that give the priority order for all of the above.

My guess is that HLS would be far harder (I work on the other end of this, so have frankly never tried), but plain video in a single file is just like any other file on the server.

1      

It is not HLS. Just simple files (mostly mp4) so the user can download this file and save it directly on camera roll with just a simple click.

What way would be the easiest way to do it.

Can´t seem to find anything (other than apple documentation) on this topic anywhere and it is beginning to drive me a little crazy. :)

Is it because ppl don´t use this function alot?

1      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.