search for: get_frame_array

Displaying 2 results from an estimated 2 matches for "get_frame_array".

2009 Jun 14
3
python bindings to libtheora
...seek to 10s and convert the next 10s to a new a.ogv: -------------------- from theora import Theora, TheoraEncoder a = Theora("bbb_theora_325kbit.ogv") b = TheoraEncoder("a.ogv", a.width, a.height, quality=63) a.seek(time=10) while a.read_frame() and a.time < 20: A = a.get_frame_array() b.write_frame(A) ----------------------- And here is another example that shows an interactive usage in ipython, that reads tw.ogv, reads 2 frames, then gets the image data as a numpy array (this is the YCbCr colors), then ask to return it as a PIL (python imaging library) image and saves it...
2010 Jan 21
0
python-theora: some comments
...0..78722be 100644 --- a/theora.pyx +++ b/theora.pyx @@ -678,7 +678,7 @@ cdef class Theora: <Image.Image instance at 0x...> """ - from scipy.misc import toimage + from scipy.misc.pilutil import toimage return toimage(self.YCbCr2RGB(self.get_frame_array()), channel_axis=2) def read_headers(self): and was then able to run #!/usr/bin/python import theora import sys t = theora.Theora(sys.argv[1]) t.seek(frame=1200) img = t.get_frame_image() img.save(&qu...