Hi, I think this is not possible with the current avfoundation-plugin. If you reord a video in portrait mode, then the video-size is still 960 x 460. The ios stores the transformation of the video into as a video-property (called prefferedTransform).
This transform is used when playing back the video on ios-devices or with QTKit / Quicktime. The QTKit-pipeline can handle transforms when decoding video (you'll get a 460x960 image stream), the avfoundation AFAIK not, With avfoundation you'll get the raw pixels. Performancewise this makes sense especially for mobile devices. Do the decoding a fast as possible ond the cpu and do the transform in the UI with OpenGL ES. A workaround could be to convert the preferredTransform to an osg::Matrix and attach that as an UserData to the image-stream, so you can get the matrix from the imagestream and use it to transform your textured node/geometry. But currently i am too busy to implement this. cheers, Stephan Am 09.01.13 18:29, schrieb Alessandro Terenzi: > Hi again, > I managed to use the avfoundation plugin, everything seems to work fine but I > have an issue with a video that was recorded using an iPhone (portrait mode): > when it is played on a texture, it is rotated by 90 degrees. That same video > is not rotated if I play it for example on a PC or Mac using other plugins > different than avfoundation (in particular the quicktime plugin)...other > movies downloaded from the web are not rotated, as well as any movie recorded > by the iPhone in landscape mode. > > I guess that AVFoundation can find out that the video should be played > 'vertically' so it rotates it automatically (indeed it is played correctly by > QuickTime on my Mac) and this should be the correct behavior also if playing > in a media player on iOS, but what do you think the correct behavior should > be when the movie is applied to a 3D plane as a texture? Just let > AVFoundation rotate the video or not? If yes, is there a way to avoid this > (for instance by querying the movie file, just guessing...)? > > Thanks. > Alessandro > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51858#51858 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

