def test_recoding2(): a = Theora(test_files[1]) b = TheoraEncoder(VIDEO_DIR + "/b.ogv", a.width, a.height) a.seek(time=0.75) while a.read_frame() and a.time < 0.90: data = a.get_frame_data() b.write_frame_data(data)
def test_get_frame_data(): t = Theora(test_files[1]) t.read_frame() data = t.get_frame_data() assert isinstance(data, (list, tuple)) assert len(data) == 3 Y, Cb, Cr = data assert Y.shape == (240, 320) assert Cb.shape == (120, 160) assert Cr.shape == (120, 160)