Re: [osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-26 Thread Philippe Renon
Good that you have something working. Makes it easier to try things.

Forgot to mention, but enabling some GStreamer degug options might help.
Try to "set GST_DEBUG=5" on CLI before launching osgmovie.
Miight give you some insight as to why things don't work.
This page is a must read: 
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gst-running.html

Using decodebin has the advantage, on paper, to be able to play any video 
supported by GStreamer.

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





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


Re: [osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-26 Thread Andrea Martini
Hi Filippe,
after some hours of disperate fighting against gstreamer pipeline, here the 
pipeline that works for play video and audio (mp4) in a correct way:


Code:
gchar *string = g_strdup_printf("filesrc location=%s ! qtdemux name=demux 
demux.video_0 ! queue ! video/x-h264 ! avdec_h264 ! videoconvert ! 
video/x-raw,format=RGB ! appsink name=sink emit-signals=true  demux.audio_0 ! 
queue! faad ! audioconvert ! audioresample ! autoaudiosink  ", 
filename.c_str());



I don't know if it is the right way, but it works for me. I modified 
GStreamerImageStream.cpp  , GStreamerImageStream::open  method.

Thank you!

Cheers,
Andrea

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





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


Re: [osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-26 Thread Andrea Martini
Hi Filippe,
another detail  i forgot to write in the previous post.
After OSGMOVIE execution, OSGDB::ReaderWriter  returns  FILE_NOT_HANDLED


Thank you!

Cheers,
Andrea

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





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


Re: [osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-26 Thread Andrea Martini
Hi Filippe,
thank you for your reply.
Well, i tried front slash string for osgMovie parameters:

C:/SVILUPPO/CommonData/Movie/surf360converted.ogg  --texture2D  --interactive 
--audio

but  _width and _height attribute in GStreamerImageStream::open method, 
continue to be equal to zero, and so this method returns false.

After that, i tried to call the same pipeline dynamically created in the open 
method, with gst_launch-1.0:

gst-launch-1.0.exe filesrc 
location=C:/SVILUPPO/CommonData/Movie/surf360converted.ogg ! decodebin 
name=deco deco. ! queue ! videoconvert ! video/x-raw,format=RGB ! 
appsink name=sink emit-signals=true

I get the following console message:

C:\gstreamer\1.0\x86_64\bin>gst-launch-1.0.exe filesrc 
location=C:/SVILUPPO/CommonData/Movie/surf360converted.ogg ! decodebin 
name=deco deco. ! queue ! videoconvert ! video/x-raw,format=RGB ! 
appsink name=sink emit-signals=true
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

and nothing happens. Then i substitued appsink name=sink  with autovideosink,  
but in this case i get the following error message:

C:\gstreamer\1.0\x86_64\bin>gst-launch-1.0.exe filesrc 
location=C:/SVILUPPO/CommonData/Movie/surf360converted.ogg ! decodebin 
name=deco deco. ! queue ! videoconvert ! video/x-raw,format=RGB ! 
autovideosink emit-signals=true

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
WARNING: from element /GstPipeline:pipeline0/GstDecodeBin:deco: Delayed linking 
failed.
Additional debug info:
./grammar.y(510): gst_parse_no_more_pads (): 
/GstPipeline:pipeline0/GstDecodeBin:deco:
failed delayed linking some pad of GstDecodeBin named deco to some pad of 
GstQueue named queue0
ERROR: from element 
/GstPipeline:pipeline0/GstDecodeBin:deco/GstOggDemux:oggdemux0: Internal data 
stream error.
Additional debug info:
gstoggdemux.c(4936): gst_ogg_demux_loop (): 
/GstPipeline:pipeline0/GstDecodeBin:deco/GstOggDemux:oggdemux0:
streaming stopped, reason not-linked (-1)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ..

And last, i removed   video/x-raw,format=RGB   getting the following command 
line:

gst-launch-1.0.exe filesrc 
location=C:/SVILUPPO/CommonData/Movie/surf360converted.ogg ! decodebin 
name=deco deco. ! queue ! videoconvert ! autovideosink emit-signals=true


In this case video starts correctly.

So, i tried to change the pipeline in GStreamerImageStream::open with the 
following:

filesrc location=C:/SVILUPPO/CommonData/Movie/surf360converted.ogg ! 
decodebin name=deco deco. ! queue ! videoconvert ! appsink name=sink 
emit-signals=true
 
But, i continue to get _width and _height equal to zero, and the open method 
returns false and no video play.



Cheers,
Andrea

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





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


Re: [osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-25 Thread Philippe Renon
I would try to call osgmovie with forward slashes in the file name.

Your test with gst-launch uses forward slashes and works.

And  GStreamerImageStream constructs a similar pipeline (using the same filesrc 
element) :

gchar *string = g_strdup_printf("filesrc location=%s ! \
decodebin name=deco \
deco. ! queue ! videoconvert ! video/x-raw,format=RGB ! appsink 
name=sink emit-signals=true \
%s", filename.c_str(), audio_pipe);

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





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


Re: [osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-25 Thread Philippe Renon
Hi,

I use GStreamer to play movies within an OSG and it works fine on Windows.

The errors you get seem to indicate that your video file cannot be located.
So I am a bit surprised you were able to debug anything as video playback 
should not even satart.

What exact command line did you use to test with osgmovie?
I'll try to reproduce your error.

Cheers,
Philippe

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





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


[osg-users] osgmovie - ffmpeg or Gstreamer

2018-06-22 Thread Andrea Martini
Dear All,
i would like to share with you some issues concerning play video streaming 
(with audio) starting from osgmovie.
I already used ffmpeg plugin with sdl2, but i get different results with the 
same application (osgmovie) and the same video (.mp4 extension) on different 
PCs:  
- HP Z440 with geforce gtx 1080
- Alianware (laptop) with 2 graphic board (nvidia geforce gtx 1080 and an 
internal intel board)

On HP, i play video correctly. On laptop video is playing faster.

Is it depends on video board configurations? 
Is there some parameters i can configure on osg:iamgestreamer class or 
FFmpegImageStream, in order to force frame rate to a specific value? 

Furthermore, i'm looking for another plugin to use with openscenegraph (i'm 
using openscenegraph 3.5.3 on windows 10) as alternative of ffmpeg. I see that 
cmake accepts gstreamer, so i downloaded gstreamer development 1.0. Cmake works 
correctly, but no change appears on solution sln. I don't know how to proceed 
to use gstreamer with osgmovie to test some video and audio streaming. Is there 
any example about?

Thank you in advance

Kind regards

Andrea






... 

Thank you!

Cheers,
Andrea

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





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