Hello Vincent,
I was wondering if anyone has tried back porting ffmpeg to 2.8.2? Please advise.
We have used the ffmpeg plugin in OSG versions as old as 2.6 without
problems (at least none I can recall now, so if we had any problems they
must have been easy to fix).
In theory all you should have to do is copy the plugin's directory
(src/osgPlugins/ffmpeg) to your OSG version's source tree, add that
directory to src/osgPlugins/CMakeLists.txt, see if there is any Find*
script for ffmpeg in the CMakeModules directory and if so, copy that
too, and then run CMake to generate build files. Make sure "Show
advanced values" is enabled in CMake and fill in any ffmpeg-related
fields to point to your ffmpeg includes/libs. Then generate, build and
install.
You might have to force OSG to use the ffmpeg plugin when using
osgDB::readImageFile() by appending ".ffmpeg" to the end of the path to
your movie. Or if you want to explicitly load something through the
ffmpeg plugin, you could do this (untested):
osgDB::ReaderWriter * reader =
osgDB::Registry::findReaderWriterForExtension("ffmpeg");
osgDB::ReaderWriter::ReadResult rr =
reader->readImage(reading->streamURL);
delete reader;
if (!rr.validImage())
{
// Print warning that the image couldn't be read.
}
else
{
osg::ref_ptr<osg::Image> image = rr.takeImage();
// Do something with it.
}
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org