Hi,

maybe you can exercise the new ffmpeg plugin that Robert just comitted :)

Take your images and stick them into an avi file with mencoder, e.g.:

mencoder mf://*.jpg -ovc lavc -lavcopts vcodec=ljpeg:keyint=1 -mf fps=30 -o mynewavi.avi

you can select other codec if you want. If you can tolerate compression, try mjpeg instead of lossless (ljpeg). You will have to balance disk speed vs uncompress time on cpu.

If the ffmpeg plugin or ffplay or mplayer can play your avi at 30fps then at least you know your hardware can handle the rate.

Playing in reverse at full rate might be more difficult. Not sure if the plugin supports single frame step either.

jp


Francesco Argese wrote:
J.P. Delport wrote:
Hi,

are you creating a new image every time using osgDB::readImageFile? If so, then you might be just plain running out of memory if you are not destroying old images.



Yes, I load a certain number of images (a lot of images, for example 20.000 at 
1400x1050 resolution-jpg or tga) with readImageFile at the initialization of the 
application and I load them in memory (inside std::vector<osg::Image*>) at 
startup. To visualize all the images in a smoothing way (like a movie) with play, 
forward, rewind, skipToNextFrame, skipToPreviousFrame command I iterate the array 
elements. My problem is that I can load inside the vector a little number of images 
(about one hundred). Then I have not enough memory error.

I suppose that this error is normal because I load all the uncompressed images in memory (also with .jpg) and I'm looking for a method to solve this problem.
I have already tried to destroy old images but in that case there is the 
following problem: the process of loading images from my hard disk to ram 
require about two times the  time required for visualization at 30 fps so it 
arrives a moment where the buffer is full.

As regards ramdisk probably it could be a solution (implementing parallel 
threads) but on Windows it has portability problems due to the installation of 
a driver that probably I cannot install on target PC of my application.

Thanks all for the useful answers (you are giving me new roads to follow)
Francesco Argese

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=7514#7514





_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to