         console.log error
 
       if not alreadyExists
-        video = youtubedl url,['--format='+videoFormat],{ cwd: __dirname }
+        video = youtubedl url,['--format='+videoFormat+'/[height <=? 720][filesize<=5M]'],{ cwd: __dirname }
         size = 0
+        @elements.modal.show()
         video.on 'info', (info)=>
           console.log 'Download started'
           console.log info


    ###

    gifPath = @elements.videoPath+ytid+'.gif'
    buf = @elements.encoder.out.getData()
    fs.writeFile gifPath, buf, (err) =>
      @elements.videoCanvas.remove()
      @elements.video.remove()
      delete @elements.encoder
      @elements.image.src = gifPath
      atom.config.set('editor-background.blurRadius',0)
      atom.config.set('editor-background.imageURL',gifPath)

  playVideo:->
    console.log 'playing video...'

          size = info.size
        pos=0
        video.on 'data', (data) =>
          percent = Math.round(pos / size * 100)
          @elements.modalElement.innerHTML="Downloading video... #{percent}%"
          pos += data.length
          console.log pos,size
          if pos==size
            console.log 'downloaded'

            @elements.modalElement.innerHTML="Rendering frames..."
            @insertVideo.apply @,[savePath]
        video.pipe fs.createWriteStream(savePath)
    else
