This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Parallel chunked scene detection experiment. | |
| Each thread opens the video independently, seeks to its chunk, and runs detection. | |
| Chunks are spaced every 30s with a small overlap so cuts near boundaries aren't missed. | |
| > time python parallel.py | |
| Video: 82.6s @ 24000/1001fps -> 3 chunks, 4 workers | |
| chunk 60s- end -> 5 cuts (541 frames @ 411.5 fps) | |
| chunk 0s- 32.0s -> 5 cuts (767 frames @ 440.0 fps) | |
| chunk 30s- 62.0s -> 11 cuts (767 frames @ 444.9 fps) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add --remote-debugging-port=9222 to launch args, run game | |
| // Go to http://localhost:9222 and select the main game window with Firefox/Chrome | |
| var connection = indexedDB.open('c3-localstorage-n3ijmdgu0mm', 2) | |
| connection.onsuccess = (e) => { | |
| var db = e.target.result; | |
| var txn = db.transaction('keyvaluepairs', 'readwrite') | |
| var o = txn.objectStore('keyvaluepairs') | |
| console.info('original config:') | |
| console.info(o.get('kinduoFrostSteam')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import threading | |
| import time | |
| import cv2 | |
| import numpy as np | |
| import queue | |
| class EndOfVideo: | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $> sudo strace -p `pidof "ntfsresize"` -e trace=write 2>&1 | grep 'write(1' | |
| [...] | |
| write(1, " 87.38 percent completed\r", 25) = 25 | |
| write(1, " 87.38 percent completed\r", 25) = 25 | |
| write(1, " 87.92 percent completed\r", 25) = 25 | |
| write(1, " 87.92 percent completed\r", 25) = 25 | |
| [...] |