[osg-users] How to send keyboard and mouse singal to osgviewer
Hello all: If I press P key in osgviewer, the osgviewer can pause or resume playing. But how to send keyboard or mouse signals such as P is being pressed to osgviewer in program? with best regards daniel___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] exception occurs when play video without audio
Robert: Thank you very much for your kindly support. osgmovie has no problem, only my application has problem. Daniel -- Original -- From: "Robert Osfield";<robert.osfi...@gmail.com>; Date: Thu, Feb 25, 2016 05:50 PM To: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; Subject: Re: [osg-users] exception occurs when play video without audio Hi Daniel, When I run osgmovie in testing it's always from the console, testing with and without SDL for audio, so far I haven't had a problem like your describe. The interaction with the DISPLAY variable is a bit odd, perhaps SDL/Audio subsystem on your system is doing something odd. FYI, I use Kubuntu for dev work, currently on 15.10. Robert. On 25 February 2016 at 08:05, Dan Liu <139250...@qq.com> wrote: Hello all: When I write a program according to osgmovie example using OSG 3.4 and SDL2. It works fine when I run it under GUI windows. But if I run my program in ssh terminal, an exception occurs, and video stops on first frame. And the original osgmovie has no problem. Does anybody know the reason? Below is the output: ffmpeg::open(/film/rio.mov) size(1920, 816) aspect ratio 1 Attaching FFmpegAudioStream FFmpegAudioStream::setAudioSink( 0x9d7f80) Assigning 0x9d7f80 GraphicsWindowX11::realizeImplementation() Already realized ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused FFmpegDecoderAudio::run : unhandled exception Finished FFmpegImageStream::run() FFmpegAudioStream::setAudioSink( 0) Assigning 0 Calling avformat_close_input(0x8c1fe8) With best regards daniel ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] exception occurs when play video without audio
The problem disappear after I run command: export DISPLAY=:0.0 under ssh window. But osgmovie runs fine without set DISPLAY enviroment. -- Original -- From: "Dan Liu";<139250...@qq.com>; Date: Thu, Feb 25, 2016 04:05 PM To: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; Subject: [osg-users] exception occurs when play video without audio Hello all: When I write a program according to osgmovie example using OSG 3.4 and SDL2. It works fine when I run it under GUI windows. But if I run my program in ssh terminal, an exception occurs, and video stops on first frame. And the original osgmovie has no problem. Does anybody know the reason? Below is the output: ffmpeg::open(/film/rio.mov) size(1920, 816) aspect ratio 1 Attaching FFmpegAudioStream FFmpegAudioStream::setAudioSink( 0x9d7f80) Assigning 0x9d7f80 GraphicsWindowX11::realizeImplementation() Already realized ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused FFmpegDecoderAudio::run : unhandled exception Finished FFmpegImageStream::run() FFmpegAudioStream::setAudioSink( 0) Assigning 0 Calling avformat_close_input(0x8c1fe8) With best regards daniel___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] exception occurs when play video without audio
Hello all: When I write a program according to osgmovie example using OSG 3.4 and SDL2. It works fine when I run it under GUI windows. But if I run my program in ssh terminal, an exception occurs, and video stops on first frame. And the original osgmovie has no problem. Does anybody know the reason? Below is the output: ffmpeg::open(/film/rio.mov) size(1920, 816) aspect ratio 1 Attaching FFmpegAudioStream FFmpegAudioStream::setAudioSink( 0x9d7f80) Assigning 0x9d7f80 GraphicsWindowX11::realizeImplementation() Already realized ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused FFmpegDecoderAudio::run : unhandled exception Finished FFmpegImageStream::run() FFmpegAudioStream::setAudioSink( 0) Assigning 0 Calling avformat_close_input(0x8c1fe8) With best regards daniel___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] osgmovie stop playing after long time pause
I'm using OSG 3.4 -- Original -- From: "Robert Osfield";<robert.osfi...@gmail.com>; Date: Wed, Feb 24, 2016 05:55 PM To: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; Subject: Re: [osg-users] osgmovie stop playing after long time pause HI Daniel, Which OSG version are you using? I recall improvements to the ffmpeg in the OSG-3.4 release, so if you aren't using this I'd recommend upgrading. Robert. On 24 February 2016 at 09:36, Dan Liu <139250...@qq.com> wrote: Dear All: When I use osgmovie to play videos which are about 1 minute long, if the key P is pressed and pause playing for long time, such as 1-2 minute, then the osgmovie will finish playing at once. This case is not what I need. If the pause key is not pressed, the video can be played repeatedly. If the pause time is short, osgmove can continue to play video. How to resolve this problem, let the osgmovie play video repeatedly after long time pause? Below is the output of osgmovie: # osgmovie -e ffmpeg /film/1080p30.mp4 ffmpeg::open(/film/1080p30.mp4) size(1920, 1080) aspect ratio 1 image->s()1920 image-t()=1080 aspectRatio=1 0x23206e0 Pause 0x23206e0 Play Finished FFmpegImageStream::run() Calling avformat_close_input(0x2320e08) with best regards daniel ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] osgmovie stop playing after long time pause
Dear All: When I use osgmovie to play videos which are about 1 minute long, if the key P is pressed and pause playing for long time, such as 1-2 minute, then the osgmovie will finish playing at once. This case is not what I need. If the pause key is not pressed, the video can be played repeatedly. If the pause time is short, osgmove can continue to play video. How to resolve this problem, let the osgmovie play video repeatedly after long time pause? Below is the output of osgmovie: # osgmovie -e ffmpeg /film/1080p30.mp4 ffmpeg::open(/film/1080p30.mp4) size(1920, 1080) aspect ratio 1 image->s()1920 image-t()=1080 aspectRatio=1 0x23206e0 Pause 0x23206e0 Play Finished FFmpegImageStream::run() Calling avformat_close_input(0x2320e08) with best regards daniel___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] How to setup multi channel
Hi, Robert: Thanks for your remind and support. Yes, one display card can support multiple monitors. I want to split the master viewer screen which in the same plane into M rows and N columns equally. For example, M=5 and N=10. addSlave is the good way as you recommend. But I don't know how to setup the value of projectionOffsetMatrix. Is there a formula to calculate projectionOffsetMatrix for one sub-node(row=i, column=j)? With best regards Daniel -- Original -- From: "Robert Osfield";<robert.osfi...@gmail.com>; Date: Thu, Jan 14, 2016 03:43 AM To: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; Subject: Re: [osg-users] How to setup multi channel Hi Daniel, These days most decent graphics cards can push multiple displays at a solid 60Hz so rather than 20 computers for 5x4 display wall you could have 5 computers pushing 4 displays each or a similar arrangement. You could look to mix and matching osgcluster style approach with a viewer with multiple slave Camera's to achieve this. When using slave Camera's you provide a matrix to multiple the view and projection matrices via the View::addSlave(camera, projectionOffsetMatrix, viewOffsetMatrix), you'll find this defined in include/osg/View. Using addSlave when implementing a cluster rather than just setting the master Camera is generally better as it means that the master can dispatch the same updates to the master Camera to all slaves and the individual slaves that apply this to their Viewer.getCamera() while the individual Slave camera offsets at set up once at start up. The settings to use with addSlave will depend on the master Camera's projection matrix set up - is it set to have a field of view of a single display or for the whole display region? Also on whether the display are all in the same plane or not - in the same plane you simply need to modify the projection matrix offset, but if you have a cylindrical display then you just modify the view matrix. Robert. On 13 January 2016 at 17:01, Dan Liu <139250...@qq.com> wrote: > Dear Robert: > Thank you very much! > I have studied osgwindow. If I have 20 computer, each computer has 1 > monitor. And my screen wall is 4 rows, 5 columns. Should I setup > osg::GraphicsContext::Traits if I run viewer in full screen mode? For > example, a screen's row_no=2 and column_no=2(index begin from 0), it should > display x range from 50% to 75% and y range from 40% to 60%, and scale > aspect ratio to 5/4=1.2. > I don't know how to change matrix in below line: > viewer.addSlave(camera.get(), osg::Matrixd::translate(1.0,0.0,0.0), > osg::Matrixd()); > > And scale function does not work: > viewer.getCamera()->getProjectionMatrix() *= osg::Matrix::scale(1.2, 1.0, > 1.0) has no effect, x scale is not changed. But > viewer.getCamera()->getProjectionMatrix() *= osg::Matrix::scale(1.2, 1.2, > 1.2) can works, the earth becomes bigger in both x, y, z dimension. > > With best regards > Daniel > -- Original -- > From: "Robert Osfield";<robert.osfi...@gmail.com>; > Date: Wed, Jan 13, 2016 05:29 PM > To: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; > Subject: Re: [osg-users] How to setup multi channel > > Hi Daniel, > > The OSG is designed for handling multi-channel system and provides the > support via the osgVIewer support for master + slave Camera. > > The osgwindow example is probably the most straight forward > implementation to look at - this creates two windows and assign these > to two slave osg::Camera, which are both assigned to a single > osgViewer::Viewer (subclass from osgViewer::View which subclasses from > osg::View) which provides the master Camera. > > The overall view is controlled by the master Camera attached to the > View(er) which provides the main view and projection matrices. The > slave Camera's that are assigned to the View(er) have offset matrices > that multiplied by the master's view and projection matrices to give > the final view and projection matrices that the Slave camera will use. > > Other examples of the slave camera in action can be seen in the > osgViewer::ViewConfig implementations found in the > src/osgViewer/config directory. The neatest way to implement what you > need would be to implement your own custom osgViewer::ViewConfig that > sets up the appropriate Slave Camera you need, then when you want to > set up your viewer for this display system you simply pass in this > ViewConfig and have it configure the View(er) as required. > > Robert. > > > > On 13 January 2016 at 03:50, Dan Liu <139250...@qq.com> wrote: >> Dear all: >> Hello! I'm using OSG to develop an applicatio
Re: [osg-users] How to setup multi channel
Dear Robert: Thank you very much! I have studied osgwindow. If I have 20 computer, each computer has 1 monitor. And my screen wall is 4 rows, 5 columns. Should I setup osg::GraphicsContext::Traits if I run viewer in full screen mode? For example, a screen's row_no=2 and column_no=2(index begin from 0), it should display x range from 50% to 75% and y range from 40% to 60%, and scale aspect ratio to 5/4=1.2. I don't know how to change matrix in below line: viewer.addSlave(camera.get(), osg::Matrixd::translate(1.0,0.0,0.0), osg::Matrixd()); And scale function does not work: viewer.getCamera()->getProjectionMatrix() *= osg::Matrix::scale(1.2, 1.0, 1.0) has no effect, x scale is not changed. But viewer.getCamera()->getProjectionMatrix() *= osg::Matrix::scale(1.2, 1.2, 1.2) can works, the earth becomes bigger in both x, y, z dimension. With best regards Daniel -- Original -- From: "Robert Osfield";<robert.osfi...@gmail.com>; Date: Wed, Jan 13, 2016 05:29 PM To: "OpenSceneGraph Users"<osg-users@lists.openscenegraph.org>; Subject: Re: [osg-users] How to setup multi channel Hi Daniel, The OSG is designed for handling multi-channel system and provides the support via the osgVIewer support for master + slave Camera. The osgwindow example is probably the most straight forward implementation to look at - this creates two windows and assign these to two slave osg::Camera, which are both assigned to a single osgViewer::Viewer (subclass from osgViewer::View which subclasses from osg::View) which provides the master Camera. The overall view is controlled by the master Camera attached to the View(er) which provides the main view and projection matrices. The slave Camera's that are assigned to the View(er) have offset matrices that multiplied by the master's view and projection matrices to give the final view and projection matrices that the Slave camera will use. Other examples of the slave camera in action can be seen in the osgViewer::ViewConfig implementations found in the src/osgViewer/config directory. The neatest way to implement what you need would be to implement your own custom osgViewer::ViewConfig that sets up the appropriate Slave Camera you need, then when you want to set up your viewer for this display system you simply pass in this ViewConfig and have it configure the View(er) as required. Robert. On 13 January 2016 at 03:50, Dan Liu <139250...@qq.com> wrote: > Dear all: > Hello! I'm using OSG to develop an application which run as screen > wall(M rows, N columns). I studied the osgcluster example. But still don't > know how to split master screen into MXN sub screens, and scale the screen > according to the screen wall's real resolution. > > With best regards > Daniel > > ___ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
[osg-users] How to setup multi channel
Dear all:Hello! I'm using OSG to develop an application which run as screen wall(M rows, N columns). I studied the osgcluster example. But still don't know how to split master screen into MXN sub screens, and scale the screen according to the screen wall's real resolution. With best regards Daniel___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org