         }
 
         guard image.TIFFRepresentation?.writeToFile(tmpImagePath, atomically: true) == true else { return }
-        guard let session = AVAssetExportSession(asset: asset, presetName: AVAssetExportPresetPassthrough) else { return }
+        guard let session = AVAssetExportSession(asset: playerItem.asset, presetName: AVAssetExportPresetPassthrough) else { return }
         session.outputFileType = "com.apple.quicktime-movie"
         session.outputURL = NSURL(fileURLWithPath: tmpMoviePath)
         session.timeRange = CMTimeRange(start: player.currentTime(), duration: CMTime(value: 3*600, timescale: 600))

    }

    init!(movieURL: NSURL) {
        super.init(nibName: nil, bundle: nil)
        playerView.player = AVPlayer(URL: movieURL)
    }

    required init?(coder: NSCoder) {

    }

    @objc private func capturePosterFrame(sender: AnyObject?) {
        guard let cgImage = try? imageGenerator.copyCGImageAtTime(player.currentTime(), actualTime: nil) else { return }
        let image = NSImage(CGImage: cgImage, size: CGSize(width: CGImageGetWidth(cgImage), height: CGImageGetHeight(cgImage)))
        posterFrameView.image = image
    }

    @objc private func createLivePhoto(sender: AnyObject?) {
        guard let image = posterFrameView.image else { return }

        let outputDir = NSURL(fileURLWithPath: NSHomeDirectory()).URLByAppendingPathComponent("Pictures/LoveLiver")
