         if self.captureSession.canAddInput(captureInput) {
             self.captureSession.addInput(captureInput)
         }
-        
-        if self.captureSession.canAddOutput(self.videoStillImageOutput) {
-            self.captureSession.addOutput(self.videoStillImageOutput)
-        }
-        
+
         if self.captureSession.canAddOutput(self.videoMovieFileOutput) {
             self.captureSession.addOutput(self.videoMovieFileOutput)
         }

            delayTime: delayTime,
            loopCount: 0
        )
        
        let gifmovieURL = regift.createGif()
        //print("Gif saved to \(gifmovieURL)")

        // hide menu
        self.statusItem!.image = nil


extension AppDelegate: AVCaptureFileOutputRecordingDelegate {
    func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {

        let dateFormatter = DateFormatter()
        dateFormatter.dateFormat = "yyyyMMddHHmmss"
        let dateString = dateFormatter.string(from: Date())
        let pathString = "\(SengiriSavePath)/\(dateString).gif"
        let schemePathURL = URL(string: "file://\(pathString)")!

        if FileManager.default.fileExists(atPath: pathString) {
            try! FileManager.default.removeItem(atPath: pathString)
        }

        let secondPerFrame = UserDefaults.standard.float(forKey: "GifSecondPerFrame")
        let delayTime = UserDefaults.standard.float(forKey: "GifDelayTime")

