This file contains 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 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 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 | |
[...] |