title: find duration of video using url in swift
body: <p>I have url of a video. 
  I want to know the duration of it without playing it.</p>
  
  <p>I tried this:</p>
  
  <pre><code>let data = "http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4"
  let a = NSURL(string: data)
  let asset = AVAsset(URL: a!)
  
  let duration = asset.duration
  let durationTime = CMTimeGetSeconds(duration)
  
  print("the duration is",durationTime)
  </code></pre>