Skip to content

Instantly share code, notes, and snippets.

@Breakthrough
Breakthrough / pyscenedetect_json.py
Last active September 22, 2024 15:56
PySceneDetect JSON Output Example for @kusalavan
import json
from scenedetect import VideoManager
from scenedetect import SceneManager
from scenedetect.detectors import ContentDetector
from scenedetect.scene_manager import save_images
def get_scenes_json(video_path, threshold=30.0):
# Create our video & scene managers, then add the detector.
video_manager = VideoManager([video_path])
@nathakits
nathakits / README.md
Last active August 25, 2023 17:59
Creating a `.desktop` file in Ubuntu that launches a Python script

Creating a .desktop file in Ubuntu that launches a Python script

Here we will make two .desktop files that will launch Pupil Capture and Pupil Player.

Steps

  1. Right click on your desktop and create a new empty document.
  2. Set the document file type by Renaming the document that ends with .desktop
  3. Drag the document into a text editor and edit the document with the example code below

Note: Change the X-Icon-Path to the icon you want to use and Execpath to where Pupil Capturemain.py` is located on your machine (see example pupil.desktop for reference)