On Fri, 2009-01-09 at 19:33 +0100, Simon Loic wrote:
> Ok forget about it it was a problem of -fPic flag in the compilation
> of some libraries.
> The next step is to make osg framerate constant in order to get smooth
> videos. If I undertood well what was said before this consists in
> rewriting the Mainloop of the viewer. I'll try this soon.
It's much easier if you're using an NVidia card! :) Here are two bash
functions I wrote to help:
# Run an OpenGL application with antialiasing.
function __fsaa() {
if [ -z "${*}" ]; then
echo -e "usage: fsaa NUM CMDLINE\n"
echo -e "\t0 = FSAA disabled"
echo -e "\t1 = 2x Bilinear Multisampling"
echo -e "\t2 = 2x Quincunx Multisampling"
echo -e "\t3 = FSAA disabled"
echo -e "\t4 = 4x Bilinear Multisampling"
echo -e "\t5 = 4x Gaussian Multisampling"
echo -e "\t6 = 2x Bilinear Multisampling 4x SS"
echo -e "\t7 = 4x Bilinear Multisampling 4x SS"
echo -e "\t8 = 4x Bilinear Multisampling 2x SS\n"
return 1
else
local MODE="${1}"
shift 1
eval "__GL_FSAA_MODE=${MODE} ${*}"
fi
}
# Run an OpenGL application with vsync enabled.
function __glsync() {
eval "__GL_SYNC_TO_VBLANK=1 ${*}"
}
...
Once you've added these to your bashrc, you can do something like this:
# __glsync osgviewer
...or...
# __fsaa 4 __glsync osgviewer
The general idea is to export the __GL_* variables properly. :)
> Thanks once again.
>
> On Thu, Jan 8, 2009 at 10:56 AM, Simon Loic <[email protected]>
> wrote:
> Hi, I'm back at work and I can give you the details.
>
> The first problem I had was at compile time. I think it was
> linked with conflicting definitions. Here is the error
> message.
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> /bin/mkdir -p bc/gl
> perl ./gengl/gengl.perl --mode=alias "/usr/include/GL/gl.h"
> "/usr/include/GL/glx.h" "/usr/include/GL/glext.h"
> "/usr/include/GL/glxext.h" > bc/gl/alias.bc
> glFramebufferTextureLayerEXT is defined in both
> GL_NV_geometry_program4 and GL_EXT_texture_array
> at ./gengl/gengl.perl line 436, <H> line 10154.
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> To solve it I did something quite ugly : I commented the
> mentioned line 436 of gengl/gengl.perl. After that It
> compiles but I looking forward a better fix.
>
> The second problem I get is the more important. The bugle
> filterset associated with screen capture is not recognised.
> I get the following warning :
>
>
> >>> warning: ignoring unknown filter-set screenshot
>
> BTW, Im using the following command :
>
> >>> BUGLE_CHAIN=video LD_PRELOAD=libbugle.so my_application
>
> with the following chain:
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> # Captures a video file.
> chain video
> {
> # Press C-V to start and to stop recording. By removing
> the "inactive"
> # tag, recording will start immediately.
> filterset screenshot C-V inactive
> {
> video "yes"
> filename "bugle.avi"
>
> # You can in theory use any codec supported by ffmpeg
> codec "mpeg4"
>
> # Roughly DVD size, although no high quality options
> are set
> bitrate "7500000"
>
> # By default, a frame is captured every 30th of a
> second, with
> # frames skipped or duplicated as necessary. Uncomment
> this
> # line to instead capture every frame exactly once to
> the
> # output.
> # allframes "yes"
>
> # Control the encoding latency. A higher latency may
> give
> # better throughput, at the expense of more memory.
> # lag "1"
> }
> }
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> Just so you know, here is the recap of the configure script
> call (it may help):
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
> Configuration:
> libavcodec: yes
> readline: yes
> GUI: yes (with OpenGL)
> X event interception: yes
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> Thanks very much.
>
>
>
> On Wed, Jan 7, 2009 at 11:38 PM, Simon Loic
> <[email protected]> wrote:
> I tried it but I encountered few problems. I will send
> you the detailed tomorrow. Still thanks for the tip.
>
>
>
> On Tue, Jan 6, 2009 at 5:40 PM, Jeremy Moles
> <[email protected]> wrote:
> Not trying to hijack this thread--and I can't
> really read it all for now
> because I'm still fighting off lots of
> complications from a recent oral
> surgery--but what you want is called "bugle."
> I used it to make all of
> the old osgWidget and osgPango videos and it
> works like a charm.
>
> What it does is LD_PRELOAD's glSwap() or
> whatever and replaces it with a
> version that shimmies off data to ffmpeg for
> encoding. Simple, clean,
> and easy for basic usage.
>
>
> On Thu, 2008-12-18 at 20:38 +0100, Simon Loic
> wrote:
> > Hi,
> >
> > I apology in advance if this thread have
> been heavily answered before
> > (if so just tell where I can find the
> solution). Still I would like to
> > know the different alternative (the good
> ones) to record a video of my
> > scene.
> > So far I was using an external tool for
> screenCast (called istanbul).
> > But I'm not satisfied by this because when
> my scene is very complex,
> > my osg based application is lagging and this
> leads to a poor quality
> > of th video.
> >
> > I'm especially interested if there is a way
> to create an
> > RecordCameraPathHandler to record a path,
> and then instead of saving
> > it as a .path file compute the video in a
> batch mode. By batch mode I
> > mean that the creation of the video doesn't
> need to be real time. In
> > that way I could hopefully control the lag
> effects and eventually the
> > resolution of the video.
> >
> > Sincerely,
> >
> > --
> > Loïc Simon
>
>
> >
> _______________________________________________
> > 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
>
>
>
>
>
> --
> Loïc Simon
>
>
>
>
> --
> Loïc Simon
>
>
>
> --
> Loïc Simon
> _______________________________________________
> 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