Re: [osg-users] Rendering 2 video stream

2010-03-13 Thread cedric pinson
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi Adrian,

You can stream directly from the source, but in order to avoid the
same machine support the broadcasting and generating the stream, i
used two machine:
o the stream generator
o a server on the net that can send 100Mb/sec

If you have only a few client or if your stream needs to be view in
localnetwork then maybe you can avoid the broadcast server.

To use the flux on a webpage i used http://www.flumotion.net/ . You
can have a look on the web, then the html needed to use the flux is

video width=600 height=400 autoplay=yes
src=http://stream.pok.me/stream.ogg
view-source:http://stream.pok.me/stream.ogg tabindex=0 /video

Off course you will maybe need some fallback depending on your target.

Cheers,
Cedric


On 03/11/10 13:09, Adrian Egli OpenSceneGraph (3D) wrote:
 Hi Cedric,

 Sorry to interrupt you again. Well once i have the video rendered ,
  i launch gstreamer with gst-launch-0.10 and with the parameters
 you send me once. Now the gstream takes the input from location and
 streams it as a ogg video over network. Do i need a webserver
 instance to stream to or how does it work? own can i integrate it
 into a firefox html webpage. say i will stream it from localhost
 and watch on localhost with firefox -console my_Test_page.hmtl with
 the video display. and i have the osgviewer application running and
 i can navigate with my mouse (as common) and watch in real time the
 video beside with a copy of the osgviewer frame buffer output/

 /adrian


 Hi, I render a video game based on osg into a video stream, you can
 have an idea here http://plopbyte.net/?page_id=6/ you need a
 firefox plugin to watch it.

 The basic idea works on linux with gstreamer. Dont tested on
 windows but because there is gstreamer, maybe it works too.

 In the game code i added a thread that write image at a given rate.
 This file is written into a file descriptor created with mkfifo.
 Then i use a command line when the game is running: gst-launch-0.10
 filesrc location=myfifo ! videoparse width=800 height=600 format=15
 framerate=20/1 ! ffmpegcolorspace ! videoscale ! video/x-raw-yuv,
 width=800, height=600 ! videoflip method=5  ! theoraenc quality=40
 ! oggmux ! gdppay ! tcpserversink port=12000 21 log

 The advantage using gstreamer is that you can use the codec you
 want to encode the video and stream it over the web.

 The code is inside this project http://hg.plopbyte.net/pokme/

 Cheers, Cedric

 2010/2/6 Cedric Pinson cedric.pin...@plopbyte.net
 mailto:cedric.pin...@plopbyte.net

 Hi Adrian,

 I am sorry i dont have a small proof of concept only the code
 integrated to a project (pokme). I guess it would need one or two
 day of work to setup a small example.

 Cheers, Cedric

 -- Provide OpenGL services around OpenSceneGraph and more +33 659
 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
 mailto:cedric.pin...@plopbyte.net http://www.plopbyte.net


 On Sat, 2010-02-06 at 11:53 +0100, Adrian Egli OpenSceneGraph (3D)
 wrote:
 Hi all,

 thanks for the short answer. i am looking for a small test.cpp
 (osgviewer - render2video - stream) has someone still
 implemented
 such a demo?

 /adrian

 2010/2/2 Cedric Pinson cedric.pin...@plopbyte.net
 mailto:cedric.pin...@plopbyte.net
 Hi, I render a video game based on osg into a video
 stream, you
 can have an idea here http://plopbyte.net/?page_id=6/ you need a
 firefox
 plugin to watch it.

 The basic idea works on linux with gstreamer. Dont
 tested on
 windows but because there is gstreamer, maybe it works too.

 In the game code i added a thread that write image at
 a given
 rate. This file is written into a file descriptor created with
 mkfifo.
 Then i use a command line when the game is running:
 gst-launch-0.10 filesrc location=myfifo ! videoparse
 width=800
 height=600 format=15 framerate=20/1 ! ffmpegcolorspace !
 videoscale ! video/x-raw-yuv, width=800, height=600 ! videoflip
 method=5  !
 theoraenc quality=40  ! oggmux ! gdppay ! tcpserversink
 port=12000 21
 log

 The advantage using gstreamer is that you can use the
 codec
 you want to encode the video and stream it over the web.

 The code is inside this project
 http://hg.plopbyte.net/pokme/

 Cheers, Cedric

 -- Provide OpenGL services around OpenSceneGraph and more +33 659
 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
 mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net



 On Mon, 2010-02-01 at 17:39 -0500, r...@sensorstar.com
 mailto:r...@sensorstar.com wrote:
 Adrian - A way that I've used for that type of functionality
 is
 through a
 Camera::DrawCallback subclass.  You can get the rendered
 scene through
 an (osg::Image) readPixels() call and pass it out
 through
 whatever
 stream you like frame by frame.  It isn't extremely fast since
 it
 depends on the
 readPixels() call, but on a Quadro or the like it
 has always
 been 'fast
 enough' for my purposes.

 For the video stream output, I can't offer too
 much advice
 because I
 

Re: [osg-users] Rendering 2 video stream

2010-02-06 Thread Adrian Egli OpenSceneGraph (3D)
Hi all,

thanks for the short answer. i am looking for a small test.cpp (osgviewer -
render2video - stream) has someone still implemented such a demo?

/adrian

2010/2/2 Cedric Pinson cedric.pin...@plopbyte.net

 Hi,
 I render a video game based on osg into a video stream, you can have an
 idea here http://plopbyte.net/?page_id=6/ you need a firefox plugin to
 watch it.

 The basic idea works on linux with gstreamer. Dont tested on windows but
 because there is gstreamer, maybe it works too.

 In the game code i added a thread that write image at a given rate. This
 file is written into a file descriptor created with mkfifo.
 Then i use a command line when the game is running:
 gst-launch-0.10 filesrc location=myfifo ! videoparse width=800
 height=600 format=15 framerate=20/1 ! ffmpegcolorspace ! videoscale !
 video/x-raw-yuv, width=800, height=600 ! videoflip method=5  ! theoraenc
 quality=40  ! oggmux ! gdppay ! tcpserversink port=12000 21 log

 The advantage using gstreamer is that you can use the codec you want to
 encode the video and stream it over the web.

 The code is inside this project http://hg.plopbyte.net/pokme/

 Cheers,
 Cedric

 --
 Provide OpenGL services around OpenSceneGraph and more
 +33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net


 On Mon, 2010-02-01 at 17:39 -0500, r...@sensorstar.com wrote:
  Adrian -
A way that I've used for that type of functionality is through a
  Camera::DrawCallback subclass.  You can get the rendered scene through
  an (osg::Image) readPixels() call and pass it out through whatever
  stream you
  like frame by frame.  It isn't extremely fast since it depends on the
  readPixels() call, but on a Quadro or the like it has always been 'fast
  enough' for my purposes.
 
For the video stream output, I can't offer too much advice because I
  have usually been happy to work with the raw frames, but you can pretty
  much tie whatever you like at that point.
 
  Rudy
 
  On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli OpenSceneGraph (3D)
 wrote:
   Hello all,
  
   i am looking for a library or idea how we could render osg into a video
   stream?
  
   /adrian
  
   --
   
   Adrian Egli
 
   ___
   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




-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rendering 2 video stream

2010-02-06 Thread Cedric Pinson
Hi Adrian,

I am sorry i dont have a small proof of concept only the code integrated
to a project (pokme).
I guess it would need one or two day of work to setup a small example.

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Sat, 2010-02-06 at 11:53 +0100, Adrian Egli OpenSceneGraph (3D)
wrote:
 Hi all, 
 
 thanks for the short answer. i am looking for a small test.cpp
 (osgviewer - render2video - stream) has someone still implemented
 such a demo? 
 
 /adrian 
 
 2010/2/2 Cedric Pinson cedric.pin...@plopbyte.net
 Hi,
 I render a video game based on osg into a video stream, you
 can have an
 idea here http://plopbyte.net/?page_id=6/ you need a firefox
 plugin to
 watch it.
 
 The basic idea works on linux with gstreamer. Dont tested on
 windows but
 because there is gstreamer, maybe it works too.
 
 In the game code i added a thread that write image at a given
 rate. This
 file is written into a file descriptor created with mkfifo.
 Then i use a command line when the game is running:
 gst-launch-0.10 filesrc location=myfifo ! videoparse width=800
 height=600 format=15 framerate=20/1 ! ffmpegcolorspace !
 videoscale !
 video/x-raw-yuv, width=800, height=600 ! videoflip method=5  !
 theoraenc
 quality=40  ! oggmux ! gdppay ! tcpserversink port=12000 21
 log
 
 The advantage using gstreamer is that you can use the codec
 you want to
 encode the video and stream it over the web.
 
 The code is inside this project http://hg.plopbyte.net/pokme/
 
 Cheers,
 Cedric
 
 --
 Provide OpenGL services around OpenSceneGraph and more
 +33 659 598 614 Cedric Pinson
 mailto:cedric.pin...@plopbyte.net
 http://www.plopbyte.net
 
 
 
 On Mon, 2010-02-01 at 17:39 -0500, r...@sensorstar.com wrote:
  Adrian -
A way that I've used for that type of functionality is
 through a
  Camera::DrawCallback subclass.  You can get the rendered
 scene through
  an (osg::Image) readPixels() call and pass it out through
 whatever
  stream you
  like frame by frame.  It isn't extremely fast since it
 depends on the
  readPixels() call, but on a Quadro or the like it has always
 been 'fast
  enough' for my purposes.
 
For the video stream output, I can't offer too much advice
 because I
  have usually been happy to work with the raw frames, but you
 can pretty
  much tie whatever you like at that point.
 
  Rudy
 
  On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli
 OpenSceneGraph (3D) wrote:
   Hello all,
  
   i am looking for a library or idea how we could render osg
 into a video
   stream?
  
   /adrian
  
   --
   
   Adrian Egli
 
   ___
   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
 
 
 
 
 -- 
 
 Adrian Egli


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Rendering 2 video stream

2010-02-01 Thread Adrian Egli OpenSceneGraph (3D)
Hello all,

i am looking for a library or idea how we could render osg into a video
stream?

/adrian

-- 

Adrian Egli
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] Rendering 2 video stream

2010-02-01 Thread rudy
Adrian -
   
  A way that I've used for that type of functionality is through a  
   
Camera::DrawCallback subclass.  You can get the rendered scene through  
   
an (osg::Image) readPixels() call and pass it out through whatever
stream you  
like frame by frame.  It isn't extremely fast since it depends on the   
   
readPixels() call, but on a Quadro or the like it has always been 'fast 
   
enough' for my purposes.
   

   
  For the video stream output, I can't offer too much advice because I  
   
have usually been happy to work with the raw frames, but you can pretty 
   
much tie whatever you like at that point. 

Rudy

On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli OpenSceneGraph (3D) wrote:
 Hello all,
 
 i am looking for a library or idea how we could render osg into a video
 stream?
 
 /adrian
 
 -- 
 
 Adrian Egli

 ___
 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] Rendering 2 video stream

2010-02-01 Thread Cedric Pinson
Hi,
I render a video game based on osg into a video stream, you can have an
idea here http://plopbyte.net/?page_id=6/ you need a firefox plugin to
watch it.

The basic idea works on linux with gstreamer. Dont tested on windows but
because there is gstreamer, maybe it works too.

In the game code i added a thread that write image at a given rate. This
file is written into a file descriptor created with mkfifo.
Then i use a command line when the game is running:
gst-launch-0.10 filesrc location=myfifo ! videoparse width=800
height=600 format=15 framerate=20/1 ! ffmpegcolorspace ! videoscale !
video/x-raw-yuv, width=800, height=600 ! videoflip method=5  ! theoraenc
quality=40  ! oggmux ! gdppay ! tcpserversink port=12000 21 log

The advantage using gstreamer is that you can use the codec you want to
encode the video and stream it over the web.

The code is inside this project http://hg.plopbyte.net/pokme/

Cheers,
Cedric

-- 
Provide OpenGL services around OpenSceneGraph and more
+33 659 598 614 Cedric Pinson mailto:cedric.pin...@plopbyte.net
http://www.plopbyte.net


On Mon, 2010-02-01 at 17:39 -0500, r...@sensorstar.com wrote:
 Adrian -  
  
   A way that I've used for that type of functionality is through a
  
 Camera::DrawCallback subclass.  You can get the rendered scene through
  
 an (osg::Image) readPixels() call and pass it out through whatever
 stream you  
 like frame by frame.  It isn't extremely fast since it depends on the 
  
 readPixels() call, but on a Quadro or the like it has always been 'fast   
  
 enough' for my purposes.  
  
   
  
   For the video stream output, I can't offer too much advice because I
  
 have usually been happy to work with the raw frames, but you can pretty   
  
 much tie whatever you like at that point. 
 
 Rudy
 
 On Mon, Feb 01, 2010 at 03:51:27PM +0100, Adrian Egli OpenSceneGraph (3D) 
 wrote:
  Hello all,
  
  i am looking for a library or idea how we could render osg into a video
  stream?
  
  /adrian
  
  -- 
  
  Adrian Egli
 
  ___
  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
 


signature.asc
Description: This is a digitally signed message part
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org