Yeah, that's what I'd recommend, too. And with raw ImageInput, the method is similar -- just seek_subimage to the frame you want, then read as you would a normal image.
The main thing to know is that OIIO's current support of movie files is just to treat it as a container of many individual images. If that's what you need, then have at it! But it doesn't understand any of the intricacies you might need in a proper video player (like sound). > On Dec 20, 2017, at 2:08 AM, Daniel Flehner Heen <[email protected]> > wrote: > > Hi! > I'm a bit out of my league here, but frames for video are stored as subimages > in an ImageBuf for instance. One way of iterating over the frames may be by > resetting the ImageBuf passing a "frame number" as subimage. > > Example in python since I don't know C++ that much: > > src = 'my_lovely_video_file.mov' > buf = oiio.ImageBuf(src) > > for frame in xrange(buf.nsubimages): > buf.reset(src, subimage=frame) > # Do something more useful with current frame in buf > print 'current frame:', buf.subimage > > Hope this points you in the right direction or I didn't offend you if this is > nothing new to you :) > > -Daniel > > > On Tue, Dec 19, 2017 at 2:40 AM, Yegor Swarovski <[email protected] > <mailto:[email protected]>> wrote: > Hello, > I am working on a small project to write a simple video/image sequence player > (like quicktime or RV). I have it working with image sequences but I want to > add support for mp4/mov playback. > > I am wondering if there are any good examples I can check to see how to > implement mov/mp4 files. I've found a mention that it supports mov/mp4s using > ffmpeg but am not sure where to go from here. > > Thanks! > > _______________________________________________ > Oiio-dev mailing list > [email protected] <mailto:[email protected]> > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org > <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org> > > > _______________________________________________ > Oiio-dev mailing list > [email protected] > http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org -- Larry Gritz [email protected]
_______________________________________________ Oiio-dev mailing list [email protected] http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
