def test_stats(self):
        new_vid = Video("https://youtu.be/REnQ_gIh3Xo", "lecture1")
        new_vid.directory = "./test_vid_5.mp4"
        new_vid.fps = 30

        new_vid.parse_frames_without_saving()
        new_vid.read_preloaded_frame_data()
        new_vid.update_relevant_frames()

        print(new_vid.compile_stats())
Beispiel #2
0
def load_from_cache() -> None:
    new_vid = Video("https://youtu.be/REnQ_gIh3Xo", "lecture1")
    new_vid.directory = "./test_vid_5.mp4"
    new_vid.fps = 30

    new_vid.read_preloaded_frame_data()
    new_vid.update_relevant_frames()

    videos['lecture1'] = new_vid

    print(new_vid.compile_stats())
Beispiel #3
0
def test_keywords():

    new_vid = Video("insertlinkhere", "lecture1")
    new_vid.directory = "./test_vid_5.mp4"
    new_vid.fps = 30

    new_vid.read_preloaded_frame_data()
    new_vid.update_relevant_frames()

    for frame in new_vid.relevant_frames:
        frame.mark_keywords()
        for word in frame.keywords:
            print(word.text)
        print("")
        print("")
Beispiel #4
0
def test_filter_lines():

    new_vid = Video("insertlinkhere", "lecture1")
    new_vid.directory = "./test_vid_4.mp4"
    new_vid.fps = 30

    new_vid.parse_frames_without_saving()
    new_vid.read_preloaded_frame_data()
    new_vid.update_relevant_frames()

    for frame in new_vid.relevant_frames:
        frame.mark_keywords()
        frame.filter_keywords_from_lines()
        for line in frame.lines:
            print(line.text)
        print("")
        print("")
    def test_relevant_frames(self):

        d = enchant.Dict("en_US")

        new_vid = Video("insertlinkhere", "lecture1")
        new_vid.directory = "./test_vid_4.mp4"
        new_vid.fps = 30

        new_vid.parse_frames_without_saving()
        new_vid.read_preloaded_frame_data()
        new_vid.update_relevant_frames()

        for frame in new_vid.relevant_frames:
            for line in frame.lines:
                for word in line.words:
                    print(word.text)
                    print(d.check(word.text))
                    if not d.check(word.text):
                        print(d.suggest(word.text))